public class SearchEngineTextMatcherEditor<E> extends TextMatcherEditor<E>
city:Toronto
),
phrases (city:"New York"
), the "+" or required operator as
well as the "-" or prohibit operator.
This MatcherEditor is fully concrete, but GUI toolkit agnostic, as the search
text is passed into the refilter
method.
Subclasses for Swing and SWT applications are provided that present a text filtering interface similar to that of Google and other search engines.
refilter(String)
Modifier and Type | Class and Description |
---|---|
static class |
SearchEngineTextMatcherEditor.Field<E>
A Field object contains information specific to a given field found
within the Objects being text matched.
|
MatcherEditor.Event<E>, MatcherEditor.Listener<E>
CONTAINS, EXACT, IDENTICAL_STRATEGY, NORMALIZED_STRATEGY, REGULAR_EXPRESSION, STARTS_WITH
Constructor and Description |
---|
SearchEngineTextMatcherEditor()
Creates a SearchEngineTextMatcherEditor whose Matchers can test only
elements which implement the
TextFilterable interface. |
SearchEngineTextMatcherEditor(TextFilterator<? super E> textFilterator)
Creates a SearchEngineTextMatcherEditor with the given
textFilterator . |
Modifier and Type | Method and Description |
---|---|
java.util.Set<SearchEngineTextMatcherEditor.Field<E>> |
getFields() |
void |
refilter(java.lang.String inputText)
Creates and applies a new
TextMatcher based on the given input
text. |
void |
setFields(java.util.Set<SearchEngineTextMatcherEditor.Field<E>> fields)
Replaces the current set of search fields.
|
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 SearchEngineTextMatcherEditor()
TextFilterable
interface.public SearchEngineTextMatcherEditor(TextFilterator<? super E> textFilterator)
textFilterator
.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
.public void setFields(java.util.Set<SearchEngineTextMatcherEditor.Field<E>> fields)
fields
- the new search fields to userefilter(String)
public java.util.Set<SearchEngineTextMatcherEditor.Field<E>> getFields()
public void refilter(java.lang.String inputText)
TextMatcher
based on the given input
text.inputText
- input text (not null
) that is parsed
into search terms for the new text matcherGlazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by mockbuild at 2016-06-08 1:09