Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.filter
Class TypeFilterField

java.lang.Object
  extended by org.eclipse.swt.widgets.Widget
      extended by org.eclipse.swt.widgets.Control
          extended by org.eclipse.swt.widgets.Scrollable
              extended by org.eclipse.swt.widgets.Composite
                  extended by eu.esdihumboldt.hale.ui.filter.TypeFilterField
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable

public class TypeFilterField
extends org.eclipse.swt.widgets.Composite

Field for editing a type filter.

Author:
Simon Templer, Sebastian Reinhardt
Partner:
01 / Fraunhofer Institute for Computer Graphics Research

Nested Class Summary
static class TypeFilterField.FilterType
          The supported filter types.
 
Field Summary
static String PROPERTY_FILTER
          Property name of the filter property (as used in PropertyChangeEvents)
static String PROPERTY_VALID
          Property name of the valid property (as used in PropertyChangeEvents)
 
Fields inherited from class org.eclipse.swt.widgets.Composite
embeddedHandle
 
Fields inherited from class org.eclipse.swt.widgets.Widget
handle
 
Constructor Summary
TypeFilterField(TypeDefinition type, org.eclipse.swt.widgets.Composite parent, int style, SchemaSpaceID ssid, TypeFilterField.FilterType filterType)
          Create a new filter field for a given type.
 
Method Summary
 void addListener(PropertyChangeListener listener)
          Add a filter listener
 void dispose()
           
 Filter getFilter()
          Get the filter.
 String getFilterExpression()
          Get the filter expression.
 boolean isValid()
          States if the current filter expression is valid and
protected  void notifyListeners(PropertyChangeEvent evt)
          Notify the listeners of a property change.
 void removeListener(PropertyChangeListener listener)
          Remove a filter listener
 void setFilterExpression(String filterExpression)
          Set the filter expression.
 void setType(TypeDefinition type)
          Set the feature type
protected  void updateFilter()
          Update the filter and valid properties.
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getBorderWidth, getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTY_FILTER

public static final String PROPERTY_FILTER
Property name of the filter property (as used in PropertyChangeEvents)

See Also:
Constant Field Values

PROPERTY_VALID

public static final String PROPERTY_VALID
Property name of the valid property (as used in PropertyChangeEvents)

See Also:
Constant Field Values
Constructor Detail

TypeFilterField

public TypeFilterField(TypeDefinition type,
                       org.eclipse.swt.widgets.Composite parent,
                       int style,
                       SchemaSpaceID ssid,
                       TypeFilterField.FilterType filterType)
Create a new filter field for a given type.

Parameters:
type - the type definition
parent - the parent composite
style - the composite style
ssid - the schema space, may be null
filterType - the filter type
Method Detail

updateFilter

protected void updateFilter()
Update the filter and valid properties.


setType

public void setType(TypeDefinition type)
Set the feature type

Parameters:
type - the feature type

getFilterExpression

public String getFilterExpression()
Get the filter expression.

Returns:
the filter expression

getFilter

public Filter getFilter()
Get the filter.

Returns:
the filter or null

isValid

public boolean isValid()
States if the current filter expression is valid and

Returns:
the valid

setFilterExpression

public void setFilterExpression(String filterExpression)
Set the filter expression.

Parameters:
filterExpression - the filter expression

dispose

public void dispose()
Overrides:
dispose in class org.eclipse.swt.widgets.Widget
See Also:
Widget.dispose()

addListener

public void addListener(PropertyChangeListener listener)
Add a filter listener

Parameters:
listener - the filter listener

removeListener

public void removeListener(PropertyChangeListener listener)
Remove a filter listener

Parameters:
listener - the filter listener

notifyListeners

protected void notifyListeners(PropertyChangeEvent evt)
Notify the listeners of a property change.

Parameters:
evt - the property change event

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d