public abstract class TypeFilterField
extends org.eclipse.swt.widgets.Composite
Modifier and Type | Class and Description |
---|---|
static class |
TypeFilterField.FilterType
The supported filter types.
|
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_FILTER
Property name of the filter property (as used in
PropertyChangeEvent s) |
static String |
PROPERTY_VALID
Property name of the valid property (as used in
PropertyChangeEvent s) |
Constructor and Description |
---|
TypeFilterField(org.eclipse.swt.widgets.Composite parent,
int style)
Create a new filter field for a given type.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(PropertyChangeListener listener)
Add a filter listener
|
protected abstract Filter |
createFilter(String filterString)
Creates a
Filter from the given filter string.If the string is no valid input, any exception may be thrown. |
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
|
protected abstract String |
selectVariable()
Returns a string to insert to the filter that the user selected.
|
void |
setFilterExpression(String filterExpression)
Set the filter expression.
|
protected void |
setVariableSelectEnabled(boolean enabled)
Enables/Disables the button for variable selection.
|
protected void |
updateFilter()
Update the filter and valid properties.
|
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
computeTrim, getBorderWidth, getHorizontalBar, getVerticalBar
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
public static final String PROPERTY_FILTER
PropertyChangeEvent
s)public static final String PROPERTY_VALID
PropertyChangeEvent
s)public TypeFilterField(org.eclipse.swt.widgets.Composite parent, int style)
parent
- the parent compositestyle
- the composite styleprotected abstract String selectVariable()
null
protected abstract Filter createFilter(String filterString) throws Exception
Filter
from the given filter string.filterString
- the filter stringException
- if creation of the filter failsprotected void updateFilter()
protected final void setVariableSelectEnabled(boolean enabled)
enabled
- the enable statuspublic String getFilterExpression()
public Filter getFilter()
null
public boolean isValid()
public void setFilterExpression(String filterExpression)
filterExpression
- the filter expressionpublic void dispose()
dispose
in class org.eclipse.swt.widgets.Widget
Widget.dispose()
public void addListener(PropertyChangeListener listener)
listener
- the filter listenerpublic void removeListener(PropertyChangeListener listener)
listener
- the filter listenerprotected void notifyListeners(PropertyChangeEvent evt)
evt
- the property change eventBuild 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a