ca.odell.glazedlists.matchers

Class SearchEngineTextMatcherEditor<E>

Implemented Interfaces:
MatcherEditor<E>
Known Direct Subclasses:
SearchEngineTextFieldMatcherEditor<E>

public class SearchEngineTextMatcherEditor<E>
extends TextMatcherEditor<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.

Authors:
James Lemieux
Holger Brands
See Also:
refilter(String)

Nested Class Summary

static class
SearchEngineTextMatcherEditor.Field
A Field object contains information specific to a given field found within the Objects being text matched.

Field Summary

Fields inherited from class ca.odell.glazedlists.matchers.TextMatcherEditor<E>

CONTAINS, EXACT, IDENTICAL_STRATEGY, NORMALIZED_STRATEGY, REGULAR_EXPRESSION, STARTS_WITH

Fields inherited from class ca.odell.glazedlists.matchers.AbstractMatcherEditor<E>

currentMatcher

Constructor Summary

SearchEngineTextMatcherEditor()
Creates a SearchEngineTextMatcherEditor whose Matchers can test only elements which implement the TextFilterable interface.
SearchEngineTextMatcherEditor(E> textFilterator)
Creates a SearchEngineTextMatcherEditor with the given textFilterator.

Method Summary

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.

Methods inherited from class ca.odell.glazedlists.matchers.TextMatcherEditor<E>

getCurrentTextMatcher, getMode, getStrategy, setFilterText, setFilterator, setMode, setStrategy, setTextMatcher, super E> getFilterator

Methods inherited from class ca.odell.glazedlists.matchers.AbstractMatcherEditor<E>

addMatcherEditorListener, fireChanged, fireChangedMatcher, fireConstrained, fireMatchAll, fireMatchNone, fireRelaxed, getMatcher, isCurrentlyMatchingAll, isCurrentlyMatchingNone, removeMatcherEditorListener

Constructor Details

SearchEngineTextMatcherEditor

public SearchEngineTextMatcherEditor()

SearchEngineTextMatcherEditor

public SearchEngineTextMatcherEditor(E> textFilterator)
Creates a SearchEngineTextMatcherEditor with the given textFilterator.

Method Details

getFields

public Set> getFields()
Returns:
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.
Parameters:
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.
Parameters:
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