|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.odell.glazedlists.matchers.AbstractMatcherEditor<E>
ca.odell.glazedlists.matchers.RangeMatcherEditor<D,E>
public class RangeMatcherEditor<D extends Comparable,E>
A MatcherEditor that produces Matchers which match Objects if they lie
within a range of Comparables. This RangeMatcherEditor is
not coupled with any UI component that allows the user to edit the range.
That job is left to subclasses. This MatcherEditor is fully concrete, and
may be used directly by headless applications.
The RangeMatcherEditor requires that either a Filterator
appropriate for extracting Comparable objects be specified in its
constructor, or that every Object to be matched is a Comparable.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface ca.odell.glazedlists.matchers.MatcherEditor |
|---|
MatcherEditor.Event<E>, MatcherEditor.Listener<E> |
| Field Summary |
|---|
| Fields inherited from class ca.odell.glazedlists.matchers.AbstractMatcherEditor |
|---|
currentMatcher |
| Constructor Summary | |
|---|---|
RangeMatcherEditor()
Creates a RangeMatcherEditor whose Matchers can test only elements which
are Comparable objects. |
|
RangeMatcherEditor(Filterator<D,E> filterator)
Creates a RangeMatcherEditor that matches Objects using the
specified Filterator to get the Comparables to search. |
|
| Method Summary | |
|---|---|
Filterator<D,E> |
getFilterator()
Get the filterator used to extract Comparables from the matched elements. |
void |
setRange(D newStart,
D newEnd)
This method is used to change the range currently matched by this MatcherEditor. |
| Methods inherited from class ca.odell.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 |
|---|
public RangeMatcherEditor()
RangeMatcherEditor whose Matchers can test only elements which
are Comparable objects.
The Matchers from this MatcherEditor will throw a
ClassCastException when Matcher.matches(E) is called with
an Object that is not a Comparable.
public RangeMatcherEditor(Filterator<D,E> filterator)
RangeMatcherEditor that matches Objects using the
specified Filterator to get the Comparables to search.
filterator - the object that will extract filter Comparables from
each object in the source; null indicates
the list elements are Comparables| Method Detail |
|---|
public Filterator<D,E> getFilterator()
public void setRange(D newStart,
D newEnd)
null values for either newStart or
newEnd indicate there is no start of end to the range
respectively. Consequently, calling setRange(null, null)
causes this matcher editor match all values it filters.
Note: if newStart and newEnd are out of
their natural order with respect to each other, their values are swapped.
For example, setRange(Jan 1, 2006, Jan 1, 1955) would swap
the values so newStart is Jan 1, 1955 and
newEnd is Jan 1, 2006.
newStart - the new value marking the start of the range;
null indicates there is no startnewEnd - the new value marking the start of the range;
null indicates there is no start
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||