ca.odell.glazedlists.matchers
Class TextMatcherEditor<E>
- MatcherEditor<E>
public class TextMatcherEditor<E>
A matcher editor that matches Objects that contain a filter text string.
This
TextMatcherEditor
is not coupled with any UI component that
allows the user to edit the filter text. That job is left to subclasses.
This matcher editor is fully concrete, and may be used directly by headless
applications.
The
TextMatcherEditor
requires that either a
TextFilterator
be specified in its constructor, or that every Object
to be matched implements the
TextFilterable
interface. These are
used to extract the searchable
String
s for each Object.
TextMatcherEditor
is able to operate in one of two modes.
CONTAINS
will produce Matcher
objects that test if
at least one searchable string for an Object contains one of the
filter strings anywhere within itself.
STARTS_WITH
will produce Matcher
objects that test
if at least one searchable string for an Object
begins with at least one of the filter strings.
static int | CONTAINS - Matching mode where items are considered a match if at least one of the
filter strings extracted from an object contains one of the given search
strings.
|
static int | STARTS_WITH - Matching mode where items are considered a match if at least one of the
filter strings extracted from an object starts with one of the given search
strings.
|
CONTAINS
public static final int CONTAINS
Matching mode where items are considered a match if at least one of the
filter strings extracted from an object contains one of the given search
strings.
STARTS_WITH
public static final int STARTS_WITH
Matching mode where items are considered a match if at least one of the
filter strings extracted from an object starts with one of the given search
strings.
TextMatcherEditor
public TextMatcherEditor()
TextMatcherEditor
public TextMatcherEditor(TextFilterator filterator)
filterator
- the object that will extract filter Strings from each
object in the source
; null
indicates the
list elements implement TextFilterable
getFilterator
public TextFilterator getFilterator()
Get the filterator used to extract Strings from the matched elements.
getMode
public int getMode()
setFilterText
public void setFilterText(String[] newFilters)
newFilters
- the String
s representing all of the filter values
setMode
public void setMode(int mode)
Glazed Lists, Copyright © 2003-2006 publicobject.com, O'Dell Engineering.
Documentation build by buildd at 2008-01-04 14:38