|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.citra.filter.VisualFilter
com.citra.filter.StringVisualFilter
com.citra.filter.GenericVisualFilter
public class GenericVisualFilter
GenericVisualFilter is a VisualFilter suitable for filtering Objects other than Strings, Numbers, Boolean and Dates.
Its behaviour is similar to StringVisualFilter
, from which it extends.
However, it uses a combo box as input for the filter values only. Additionally, GenericVisualFilter
uses a Format
in order to convert the Objects to Strings and vice-versa.
The default format is one that parses and formats strings with no alteration, so that in this case, GenericVisualFilter is identical
to StringVisualFilter. Developers however can assign their own Format using the setFormat
method.
Field Summary | |
---|---|
protected Format |
objectFormatter
the format used to convert Objects to strings and vice-versa |
Fields inherited from class com.citra.filter.StringVisualFilter |
---|
caseSensitive, expression, expressionBox, fieldBoxOptions, filterLabel, stringFilter, useComboBox |
Fields inherited from class com.citra.filter.VisualFilter |
---|
anyKey, filterModel |
Constructor Summary | |
---|---|
GenericVisualFilter()
Creates a new GenericVisualFilter. |
Method Summary | |
---|---|
Format |
getFormat()
Retrieves the format that will be used to convert Objects to strings and vice-versa. |
TableFilter |
getTableFilter()
Returns a table filter object corresponding to the visual controls of the filter. |
void |
setFormat(Format objectFormatter)
Assigns a new format that will be used to convert Objects to strings and vice-versa. |
void |
setTableFilter(TableFilter tf)
This method should modify the visual control's values to those corresponding to the supplied TableFilter object. |
void |
setUseComboBox(boolean useComboBox)
Determines whether a text field or a combo box is used to enter filter values. |
boolean |
shouldApplyFilter()
Returns true if the current filter should be applied, false otherwise. Sometimes, can opt NOT to filter, e.g. if a number or a date is not parseable. |
Methods inherited from class com.citra.filter.StringVisualFilter |
---|
fireFilter, getCaseSensitive, getExpression, getExpressionBox, getFieldBoxOptions, getFilter, getFilterLabel, getPanel, getUseComboBox, setFilter |
Methods inherited from class com.citra.filter.VisualFilter |
---|
getFilterModel, getFilterOnKey, setFilterOnKey |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Format objectFormatter
Constructor Detail |
---|
public GenericVisualFilter()
Method Detail |
---|
public Format getFormat()
public TableFilter getTableFilter()
getTableFilter
in class StringVisualFilter
public void setUseComboBox(boolean useComboBox)
setUseComboBox
in class StringVisualFilter
useComboBox
- true if a combo box is used, or false, in the case of a text fieldpublic void setFormat(Format objectFormatter)
objectFormatter
- the format used to convert Objects to strings and vice-versapublic void setTableFilter(TableFilter tf)
setTableFilter
in class StringVisualFilter
tf
- the TableFilter to set.public boolean shouldApplyFilter()
shouldApplyFilter
in class StringVisualFilter
|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |