|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.text.JTextComponent
javax.swing.JTextField
com.byteslooser.filters.gui.editors.TextFilterEditor
public class TextFilterEditor
Table filter editor based on text parsing, represented by a JTextField with a
contextual menu to hold previous parsing expressions.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JTextField |
|---|
JTextField.AccessibleJTextField |
| Nested classes/interfaces inherited from class javax.swing.text.JTextComponent |
|---|
JTextComponent.AccessibleJTextComponent, JTextComponent.DropLocation, JTextComponent.KeyBinding |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
DEFAULT_HISTORY
Default number of elements to keep on the contextual menu holding previous correctly parsed entries. |
| Fields inherited from class javax.swing.JTextField |
|---|
notifyAction |
| Fields inherited from class javax.swing.text.JTextComponent |
|---|
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
TextFilterEditor()
Default constructor. |
|
TextFilterEditor(IFilterTextParser parser)
Full constructor, where the filter position is IFilterTextParser.NO_FILTER_POSITION |
|
TextFilterEditor(IFilterTextParser parser,
int filterPosition)
Full constructor. |
|
| Method Summary | |
|---|---|
void |
addToHistoric(String text)
Adds an expression to the historic entries. |
Component |
getComponent()
Provides the GUI component associated to the given editor |
Color |
getErrorBackground()
Returns the background color used to represent error conditions. |
Color |
getErrorForeground()
Returns the foreground color used to represent error conditions. |
IFilterObservable |
getFilterObservable()
Provides the IFilterObservable associated to the given
instance |
int |
getFilterPosition()
Returns the filter position |
int |
getHistoricLength()
Returns the history length |
IFilterTextParser |
getTextParser()
Returns the used parser |
void |
resetFilter()
It sets the current filter text as an empty string, removing any previous entries from the historic -from the associated popup menu- |
void |
setBackgroundColor(Color bg)
|
void |
setEnabled(boolean enabled)
|
void |
setErrorBackground(Color bg)
Sets the background color to be used on error conditions |
void |
setErrorForeground(Color fg)
Sets the foreground color to be used on error conditions |
void |
setFilterBackground(Color bg)
Sets the background color to be used on no error conditions |
void |
setFilterForeground(Color fg)
Sets the foreground color to be used on no error conditions |
void |
setFilterPosition(int identifier)
Sets the filter position associated to this editor. |
void |
setForegroundColor(Color fg)
|
void |
setHistoricLength(int length)
Sets the historic length, that is, it controls the number of elements kept on the contextual menu holding previous correctly parsed entries. |
void |
setTextParser(IFilterTextParser parser)
Sets the parser used to parse the text. |
void |
updateFilter()
It reparses the text and propagates the filter to any observers. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_HISTORY
| Constructor Detail |
|---|
public TextFilterEditor()
public TextFilterEditor(IFilterTextParser parser)
IFilterTextParser.NO_FILTER_POSITION
public TextFilterEditor(IFilterTextParser parser, int filterPosition)
IFilterTextParser.NO_FILTER_POSITION, if no identifier is to be assumed
setFilterPosition(int)| Method Detail |
|---|
public void setTextParser(IFilterTextParser parser)
ITableFilterTextBasedEditor
setTextParser in interface ITableFilterTextBasedEditorpublic IFilterTextParser getTextParser()
ITableFilterTextBasedEditor
getTextParser in interface ITableFilterTextBasedEditorpublic void setFilterPosition(int identifier)
Sets the filter position associated to this editor.
This is the filter position passed to the text parser; it corresponds, in the case of a table, to the column to which this editor is associated.
It is not mandatory to specify this position. In the case of a standalone editor, which
could be not associated to any specific column, this position can be given as or IFilterTextParser.NO_FILTER_POSITION
public int getFilterPosition()
setFilterPosition(int)public Component getComponent()
ITableFilterEditor
getComponent in interface ITableFilterEditorITableFilterEditor.getComponent()public void updateFilter()
It reparses the text and propagates the filter to any observers.
updateFilter in interface ITableFilterEditorITableFilterEditor.upd