com.levigo.util.swing.glazedlists
Class SearchEngineTextFieldMatcherEditor<E>

java.lang.Object
  extended by com.levigo.util.base.glazedlists.matchers.AbstractMatcherEditor<E>
      extended by com.levigo.util.base.glazedlists.matchers.TextMatcherEditor<E>
          extended by com.levigo.util.base.glazedlists.matchers.SearchEngineTextMatcherEditor<E>
              extended by com.levigo.util.swing.glazedlists.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 a 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().

Author:
James Lemieux

Nested Class Summary
 
Nested classes/interfaces inherited from class com.levigo.util.base.glazedlists.matchers.SearchEngineTextMatcherEditor
SearchEngineTextMatcherEditor.Field<E>
 
Nested classes/interfaces inherited from interface com.levigo.util.base.glazedlists.matchers.MatcherEditor
MatcherEditor.Event<E>, MatcherEditor.Listener<E>
 
Field Summary
 
Fields inherited from class com.levigo.util.base.glazedlists.matchers.TextMatcherEditor
CONTAINS, EXACT, IDENTICAL_STRATEGY, NORMALIZED_STRATEGY, REGULAR_EXPRESSION, STARTS_WITH
 
Fields inherited from class com.levigo.util.base.glazedlists.matchers.AbstractMatcherEditor
currentMatcher
 
Constructor Summary
SearchEngineTextFieldMatcherEditor(JTextField textField, TextFilterator<? super E> textFilterator)
          Creates a TextMatcherEditor bound to the given textField with the given textFilterator.
 
Method Summary
 void dispose()
          A cleanup method which stops this MatcherEditor from listening to the underlying JTextField, thus freeing the SearchEngineTextMatcherEditor to be garbage collected.
 
Methods inherited from class com.levigo.util.base.glazedlists.matchers.SearchEngineTextMatcherEditor
getFields, refilter, setFields
 
Methods inherited from class com.levigo.util.base.glazedlists.matchers.TextMatcherEditor
getCurrentTextMatcher, getFilterator, getMode, getStrategy, setFilterator, setFilterText, setMode, setStrategy, setTextMatcher
 
Methods inherited from class com.levigo.util.base.glazedlists.matchers.AbstractMatcherEditor
addMatcherEditorListener, fireChanged, fireChangedMatcher, fireConstrained, fireMatchAll, fireMatchNone, fireRelaxed, getMatcher, isCurrentlyMatchingAll, isCurrentlyMatchingNone, removeMatcherEditorListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchEngineTextFieldMatcherEditor

public SearchEngineTextFieldMatcherEditor(JTextField textField,
                                          TextFilterator<? super E> textFilterator)
Creates a TextMatcherEditor bound to the given textField with the given textFilterator.

Parameters:
textField - the text component that edits and supplies text filter values
textFilterator - an object capable of producing Strings from the objects being filtered. If textFilterator is null then all filtered objects are expected to implement TextFilterable.
Method Detail

dispose

public void dispose()
A cleanup method which stops this MatcherEditor from listening to the underlying JTextField, thus freeing the SearchEngineTextMatcherEditor to be garbage collected.



Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.