public class SearchEngineTextFieldMatcherEditor<E> extends SearchEngineTextMatcherEditor<E>
JTextField
. This TextMatcherEditor
is directly
coupled with a JTextField that is meant to emulate a search engine's text
box. This matcher is fully concrete and is expected to be used
by Swing applications that want to present a text filtering interface
similar to that of Google and other search engines.
The MatcherEditor registers itself as an ActionListener
on the
given JTextField. If this MatcherEditor must be garbage collected before
the underlying JTextField, the listener can be unregistered by calling
dispose()
.
SearchEngineTextMatcherEditor.Field<E>
MatcherEditor.Event<E>, MatcherEditor.Listener<E>
CONTAINS, EXACT, IDENTICAL_STRATEGY, NORMALIZED_STRATEGY, REGULAR_EXPRESSION, STARTS_WITH
Constructor and Description |
---|
SearchEngineTextFieldMatcherEditor(JTextField textField,
TextFilterator<? super E> textFilterator)
Creates a TextMatcherEditor bound to the given
textField with the given
textFilterator . |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
A cleanup method which stops this MatcherEditor from listening to
the underlying
JTextField , thus freeing the
SearchEngineTextMatcherEditor to be garbage collected. |
getFields, refilter, setFields
getCurrentTextMatcher, getFilterator, getMode, getStrategy, setFilterator, setFilterText, setMode, setStrategy, setTextMatcher
fireChanged, fireConstrained, fireMatchAll, fireMatchNone, fireRelaxed, getMatcher, isCurrentlyMatchingAll, isCurrentlyMatchingNone
addMatcherEditorListener, createChangedEvent, createConstrainedEvent, createMatchAllEvent, createMatchNoneEvent, createRelaxedEvent, fireChangedMatcher, removeMatcherEditorListener
public SearchEngineTextFieldMatcherEditor(JTextField textField, TextFilterator<? super E> textFilterator)
textField
with the given
textFilterator
.textField
- the text component that edits and supplies 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 void dispose()
JTextField
, thus freeing the
SearchEngineTextMatcherEditor to be garbage collected.Copyright © 2024 levigo holding gmbh. All rights reserved.