ca.odell.glazedlists.matchers

Class AbstractMatcherEditor<E>

Implemented Interfaces:
MatcherEditor<E>
Known Direct Subclasses:
CompositeMatcherEditor<E>, RangeMatcherEditor<D,extends,Comparable,E>, TextMatcherEditor<E>, ThreadedMatcherEditor<E>, ThresholdMatcherEditor<E>

public abstract class AbstractMatcherEditor<E>
extends java.lang.Object
implements MatcherEditor<E>

Basic building block for MatcherEditor implementations that handles the details of dealing with registered MatcherEditor.Listeners. All MatcherEditor implementations should extend this class for its convenience methods.

Extending classes can fire events to registered listeners using the "fire" methods:

Author:
Rob Eden

Field Summary

protected Matcher
currentMatcher
the current Matcher in effect

Method Summary

void
addMatcherEditorListener(ca.odell.glazedlists.matchers.MatcherEditor.Listener listener)
protected void
fireChanged(Matcher matcher)
Indicates that the filter has changed in an indeterminate way.
protected void
fireChangedMatcher(ca.odell.glazedlists.matchers.MatcherEditor.Event event)
protected void
fireConstrained(Matcher matcher)
Indicates that the filter has changed to be more restrictive.
protected void
fireMatchAll()
Indicates that the filter matches all.
protected void
fireMatchNone()
Indicates that the filter matches none.
protected void
fireRelaxed(Matcher matcher)
Indicates that the filter has changed to be less restrictive.
Matcher
getMatcher()
void
removeMatcherEditorListener(ca.odell.glazedlists.matchers.MatcherEditor.Listener listener)

Field Details

currentMatcher

protected Matcher currentMatcher
the current Matcher in effect

Method Details

addMatcherEditorListener

public final void addMatcherEditorListener(ca.odell.glazedlists.matchers.MatcherEditor.Listener listener)

fireChanged

protected final void fireChanged(Matcher matcher)
Indicates that the filter has changed in an indeterminate way.

fireChangedMatcher

protected final void fireChangedMatcher(ca.odell.glazedlists.matchers.MatcherEditor.Event event)

fireConstrained

protected final void fireConstrained(Matcher matcher)
Indicates that the filter has changed to be more restrictive. This should only be called if all currently filtered items will remain filtered.

fireMatchAll

protected final void fireMatchAll()
Indicates that the filter matches all.

fireMatchNone

protected final void fireMatchNone()
Indicates that the filter matches none.

fireRelaxed

protected final void fireRelaxed(Matcher matcher)
Indicates that the filter has changed to be less restrictive. This should only be called if all currently unfiltered items will remain unfiltered.

getMatcher

public Matcher getMatcher()
Specified by:
getMatcher in interface MatcherEditor<E>

removeMatcherEditorListener

public final void removeMatcherEditorListener(ca.odell.glazedlists.matchers.MatcherEditor.Listener listener)

Glazed Lists, Copyright © 2003-2006 publicobject.com, O'Dell Engineering.
Documentation build by pbuilder at 2007-12-21 23:49