net.coderazzi.filters.gui
Interface IFilterEditor


public interface IFilterEditor

Public interface of the editors associated to each table's column.


Method Summary
 AutoChoices getAutoChoices()
          Returns the autoChoices mode.
 Comparator getComparator()
          Returns the associated Comparator, which is never null.
 Object getContent()
          Returns the current editor's content.
 Set<CustomChoice> getCustomChoices()
          Returns the current choices.
 IFilter getFilter()
          Returns the IFilter associated to the editor's content
The returned instance can then be used to enable or disable the filter and its GUI component.
 Format getFormat()
          Returns the associated Format.
 List<Object> getHistory()
          Returns the current history contents
 Look getLook()
          Returns the current editor's look.
 int getMaxHistory()
          Returns the maximum history size, as defined by the user.
This is not the real maximum history size, as it depends on the max number of visible rows and whether the popup contains only history or also choices
 Class<?> getModelClass()
          Returns the class associated to the editor on the model.
 int getModelIndex()
          Returns the model position associated to this editor.
 ChoiceRenderer getRenderer()
          Returns the associated ChoiceRenderer.
 boolean isAutoCompletion()
          Returns the auto completion flag.
 boolean isEditable()
          Returns the editable flag.
 boolean isIgnoreCase()
          Returns the ignore case flag.
 boolean isInstantFiltering()
          Returns the instant filtering flag.
 boolean isUserInteractionEnabled()
          Returns the user interaction mode.
 void resetFilter()
          Resets the filter, which implies set its content to empty and reset its history choices.
 void setAutoChoices(AutoChoices mode)
          Using autoChoices, the choices displayed on the popup menu are automatically extracted from the associated TableModel.
For editors associated to boolean or short enumerations, if AutoCompletion is not set, setting the AutoChoices automatically changes the editable flag to true, unless AutoChoices has the DISABLED value
 void setAutoCompletion(boolean enable)
          Sets the auto completion flag.
 void setComparator(Comparator comparator)
          Sets the Comparator required to compare (and sort) instances of the associated class in the table model.
Setting a comparator to null resets the used comparator (i.e: the comparator is never null)
 void setContent(Object content)
          Sets the content, adapted to the editors' type.
 void setCustomChoices(Set<CustomChoice> choices)
          Sets the available choices, shown on the popup menu.
 void setEditable(boolean enable)
          Defines the editor, if text based -i.e., without associated ChoiceRenderer, as editable: this flag means that the user can enter any text, not being limited to the existing choices
 void setFormat(Format format)
          Sets the Format required by the editor to handle the user's input when the associated class is not a String
It is initially retrieved from the IParserModel.
 void setHistory(List<Object> history)
          Sets the history contents.
 void setIgnoreCase(boolean set)
          Sets the ignore case flag.
 void setInstantFiltering(boolean enable)
          Sets the instant filtering flag.
 void setMaxHistory(int size)
          Limits the history size.
This limit is only used when the popup contains also choices.
 void setRenderer(ChoiceRenderer renderer)
          Sets the ChoiceRenderer for the choices / history.
 void setUserInteractionEnabled(boolean enable)
          Enables or disables the user's interaction; if disabled, the control is disabled but the associated filter remains in place.
 

Method Detail

getModelIndex

int getModelIndex()
Returns the model position associated to this editor.


getModelClass

Class<?> getModelClass()
Returns the class associated to the editor on the model.


getFilter

IFilter getFilter()
Returns the IFilter associated to the editor's content
The returned instance can then be used to enable or disable the filter and its GUI component.


resetFilter

void resetFilter()
Resets the filter, which implies set its content to empty and reset its history choices.


setContent

void setContent(Object content)
Sets the content, adapted to the editors' type.


getContent

Object getContent()
Returns the current editor's content.


setAutoChoices

void setAutoChoices(AutoChoices mode)
Using autoChoices, the choices displayed on the popup menu are automatically extracted from the associated TableModel.
For editors associated to boolean or short enumerations, if AutoCompletion is not set, setting the AutoChoices automatically changes the editable flag to true, unless AutoChoices has the DISABLED value


getAutoChoices

AutoChoices getAutoChoices()
Returns the autoChoices mode.


setCustomChoices

void setCustomChoices(Set<CustomChoice> choices)
Sets the available choices, shown on the popup menu.


getCustomChoices

Set<CustomChoice> getCustomChoices()
Returns the current choices.


setUserInteractionEnabled

void setUserInteractionEnabled(boolean enable)
Enables or disables the user's interaction; if disabled, the control is disabled but the associated filter remains in place.


isUserInteractionEnabled

boolean isUserInteractionEnabled()
Returns the user interaction mode.


setEditable

void setEditable(boolean enable)
Defines the editor, if text based -i.e., without associated ChoiceRenderer, as editable: this flag means that the user can enter any text, not being limited to the existing choices


isEditable

boolean isEditable()
Returns the editable flag.

See Also:
setEditable(boolean)

setIgnoreCase

void setIgnoreCase(boolean set)
Sets the ignore case flag.


isIgnoreCase

boolean isIgnoreCase()
Returns the ignore case flag.


setFormat

void setFormat(Format format)
Sets the Format required by the editor to handle the user's input when the associated class is not a String
It is initially retrieved from the IParserModel.


getFormat

Format getFormat()
Returns the associated Format.


setComparator

void setComparator(Comparator comparator)
Sets the Comparator required to compare (and sort) instances of the associated class in the table model.
Setting a comparator to null resets the used comparator (i.e: the comparator is never null)


getComparator

Comparator getComparator()
Returns the associated Comparator, which is never null.


setAutoCompletion

void setAutoCompletion(boolean enable)
Sets the auto completion flag.


isAutoCompletion

boolean isAutoCompletion()
Returns the auto completion flag.


setInstantFiltering

void setInstantFiltering(boolean enable)
Sets the instant filtering flag.


isInstantFiltering

boolean isInstantFiltering()
Returns the instant filtering flag.


setMaxHistory

void setMaxHistory(int size)
Limits the history size.
This limit is only used when the popup contains also choices. Otherwise, the maximum history size is to the maximum number of visible rows
The max history cannot be greater than the max visible rows


getMaxHistory

int getMaxHistory()
Returns the maximum history size, as defined by the user.
This is not the real maximum history size, as it depends on the max number of visible rows and whether the popup contains only history or also choices


setHistory

void setHistory(List<Object> history)
Sets the history contents.

Since:
4.3.1.0

getHistory

List<Object> getHistory()
Returns the current history contents

Since:
4.3.1.0

setRenderer

void setRenderer(ChoiceRenderer renderer)
Sets the ChoiceRenderer for the choices / history.

It also affectes to how the content is rendered
If not null, the content cannot be text-edited anymore

Parameters:
renderer -

getRenderer

ChoiceRenderer getRenderer()
Returns the associated ChoiceRenderer.


getLook

Look getLook()
Returns the current editor's look.