ca.odell.glazedlists.matchers
Class SearchEngineTextMatcherEditor<E>
- MatcherEditor<E>
public class SearchEngineTextMatcherEditor<E>
A MatcherEditor that matches Objects against search text in a format similiar
to search engines. It supports fielded data and search terms (
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.
- James Lemieux
- Holger Brands
Set> | getFields()
|
void | refilter(String inputText) - Creates and applies a new
TextMatcher based on the given input
text.
|
void | setFields(Set> fields) - Replaces the current set of search fields.
|
addMatcherEditorListener , fireChanged , fireChangedMatcher , fireConstrained , fireMatchAll , fireMatchNone , fireRelaxed , getMatcher , isCurrentlyMatchingAll , isCurrentlyMatchingNone , removeMatcherEditorListener |
SearchEngineTextMatcherEditor
public SearchEngineTextMatcherEditor()
Creates a SearchEngineTextMatcherEditor whose Matchers can test only
elements which implement the
TextFilterable
interface.
SearchEngineTextMatcherEditor
public SearchEngineTextMatcherEditor(E> textFilterator)
Creates a SearchEngineTextMatcherEditor with the given
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
.
getFields
public Set> getFields()
- a copy of the defined search fields
refilter
public void refilter(String inputText)
Creates and applies a new TextMatcher
based on the given input
text.
inputText
- input text (not null
) that is parsed
into search terms for the new text matcher
setFields
public void setFields(Set> fields)
Replaces the current set of search fields. This method does not trigger a refilter.
fields
- the new search fields to use
Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by pbuilder at 2009-07-14 22:05