public class TextInputControlMatcherEditor<E> extends TextMatcherEditor<E>
TextInputControl.
This matcher is fully concrete and is expected to be used by JavaFx applications.
The TextInputControlMatcherEditor constructors require that a TextInputControl
and TextFilterator be specified.
The MatcherEditor registers itself as a ChangeListener on the
text-property of the text control for live-filtering. For non-live filtering, the text control must be of type TextField,
because the matcher editor then registers as EventHandler on the action-property of the text field.
If this MatcherEditor must be garbage collected before the underlying
TextInputControl, the listeners can be unregistered by calling dispose().
MatcherEditor.Event<E>, MatcherEditor.Listener<E>CONTAINS, EXACT, IDENTICAL_STRATEGY, NORMALIZED_STRATEGY, REGULAR_EXPRESSION, STARTS_WITH| Constructor and Description |
|---|
TextInputControlMatcherEditor(javafx.scene.control.TextInputControl textControl,
TextFilterator<? super E> textFilterator)
Creates a TextMatcherEditor bound to the
TextInputControl with the given
textFilterator. |
TextInputControlMatcherEditor(javafx.scene.control.TextInputControl textControl,
TextFilterator<? super E> textFilterator,
boolean live)
Creates a TextMatcherEditor bound to the
TextInputControl with the given
textFilterator. |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
A cleanup method which stops this MatcherEditor from listening to
changes on the underlying
Document, thus freeing the
MatcherEditor or Document to be garbage collected. |
javafx.scene.control.TextInputControl |
getTextControl() |
boolean |
isLive()
Whether filtering occurs by the keystroke or not.
|
void |
setLive(boolean live)
Toggle between filtering by the keystroke and not.
|
getCurrentTextMatcher, getFilterator, getMode, getStrategy, setFilterator, setFilterText, setMode, setStrategy, setTextMatcherfireChanged, fireConstrained, fireMatchAll, fireMatchNone, fireRelaxed, getMatcher, isCurrentlyMatchingAll, isCurrentlyMatchingNoneaddMatcherEditorListener, createChangedEvent, createConstrainedEvent, createMatchAllEvent, createMatchNoneEvent, createRelaxedEvent, fireChangedMatcher, removeMatcherEditorListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfromMatcherpublic TextInputControlMatcherEditor(javafx.scene.control.TextInputControl textControl,
TextFilterator<? super E> textFilterator)
TextInputControl with the given
textFilterator.textControl - the text component that is the source of text filter valuestextFilterator - an object capable of producing Strings from the
objects being filtered. If textFilterator is
null then all filtered objects are expected to
implement TextFilterable.public TextInputControlMatcherEditor(javafx.scene.control.TextInputControl textControl,
TextFilterator<? super E> textFilterator,
boolean live)
TextInputControl with the given
textFilterator.textControl - the text component that is the source of text filter valuestextFilterator - an object capable of producing Strings from the
objects being filtered. If textFilterator is
null then all filtered objects are expected to
implement TextFilterable.live - true to filter by a change to the text property of the textinput control
. Note that non-live filtering is only supported if textControl is a TextField.java.lang.IllegalArgumentException - if the textControl
is not a TextField and non-live filtering is specified.public boolean isLive()
public void setLive(boolean live)
live - true to filter by keystroke (change of the text property) or false
to filter only when ENTER is pressed within the TextField (action event).
Note that non-live filtering is only supported if textControl is a TextField.public javafx.scene.control.TextInputControl getTextControl()
public void dispose()
Document, thus freeing the
MatcherEditor or Document to be garbage collected.Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by swimmesberger at Wed Feb 13 09:45:20 CET 2019