Package ca.odell.glazedlists.swing
Class SearchEngineTextFieldMatcherEditor<E>
- java.lang.Object
-
- ca.odell.glazedlists.matchers.AbstractMatcherEditorListenerSupport<E>
-
- ca.odell.glazedlists.matchers.AbstractMatcherEditor<E>
-
- ca.odell.glazedlists.matchers.TextMatcherEditor<E>
-
- ca.odell.glazedlists.matchers.SearchEngineTextMatcherEditor<E>
-
- ca.odell.glazedlists.swing.SearchEngineTextFieldMatcherEditor<E>
-
- All Implemented Interfaces:
MatcherEditor<E>
public class SearchEngineTextFieldMatcherEditor<E> extends SearchEngineTextMatcherEditor<E>
A MatcherEditor that matches Objects that contain the filter text located within aJTextField
. ThisTextMatcherEditor
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 callingdispose()
.- Author:
- James Lemieux
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ca.odell.glazedlists.matchers.SearchEngineTextMatcherEditor
SearchEngineTextMatcherEditor.Field<E>
-
Nested classes/interfaces inherited from interface ca.odell.glazedlists.matchers.MatcherEditor
MatcherEditor.Event<E>, MatcherEditor.Listener<E>
-
-
Field Summary
-
Fields inherited from class ca.odell.glazedlists.matchers.TextMatcherEditor
CONTAINS, EXACT, IDENTICAL_STRATEGY, NORMALIZED_STRATEGY, REGULAR_EXPRESSION, STARTS_WITH
-
-
Constructor Summary
Constructors Constructor Description SearchEngineTextFieldMatcherEditor(javax.swing.JTextField textField, TextFilterator<? super E> textFilterator)
Creates a TextMatcherEditor bound to the giventextField
with the giventextFilterator
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
A cleanup method which stops this MatcherEditor from listening to the underlyingJTextField
, thus freeing the SearchEngineTextMatcherEditor to be garbage collected.-
Methods inherited from class ca.odell.glazedlists.matchers.SearchEngineTextMatcherEditor
getFields, refilter, setFields
-
Methods inherited from class ca.odell.glazedlists.matchers.TextMatcherEditor
getCurrentTextMatcher, getFilterator, getMode, getStrategy, setFilterator, setFilterText, setMode, setStrategy, setTextMatcher
-
Methods inherited from class ca.odell.glazedlists.matchers.AbstractMatcherEditor
fireChanged, fireConstrained, fireMatchAll, fireMatchNone, fireRelaxed, getMatcher, isCurrentlyMatchingAll, isCurrentlyMatchingNone
-
Methods inherited from class ca.odell.glazedlists.matchers.AbstractMatcherEditorListenerSupport
addMatcherEditorListener, createChangedEvent, createConstrainedEvent, createMatchAllEvent, createMatchNoneEvent, createRelaxedEvent, fireChangedMatcher, removeMatcherEditorListener
-
-
-
-
Constructor Detail
-
SearchEngineTextFieldMatcherEditor
public SearchEngineTextFieldMatcherEditor(javax.swing.JTextField textField, TextFilterator<? super E> textFilterator)
Creates a TextMatcherEditor bound to the giventextField
with the giventextFilterator
.- Parameters:
textField
- the text component that edits and supplies text filter valuestextFilterator
- an object capable of producing Strings from the objects being filtered. IftextFilterator
isnull
then all filtered objects are expected to implementTextFilterable
.
-
-