Package adams.gui.core.dotnotationtree
Class AbstractItemFilter
- java.lang.Object
-
- adams.gui.core.dotnotationtree.AbstractItemFilter
-
- Direct Known Subclasses:
AcceptAllItemFilter,ActorClassTreeFilter
public abstract class AbstractItemFilter extends Object
Ancestor for filtering the items of a DotNotationTree.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
DotNotationTree
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_Enabledwhether the filter is enabled.
-
Constructor Summary
Constructors Constructor Description AbstractItemFilter()Initializes the filter.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract booleandoFilter(String item)Performs the actual filtering.booleanfilter(String item)Checks an item whether it should be displayed or not.protected voidinitialize()Initializes the filter.booleanisEnabled()Returns whether the filter is enabled.voidsetEnabled(boolean value)Sets whether the filter is enabled.abstract StringtoString()Returns a short representation of the filter.
-
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the filter.
-
setEnabled
public void setEnabled(boolean value)
Sets whether the filter is enabled.- Parameters:
value- if true the filter is enabled and checks classes
-
isEnabled
public boolean isEnabled()
Returns whether the filter is enabled. If a filter is not enabled, all checks will return "true".- Returns:
- true if the filter is enabled
-
doFilter
protected abstract boolean doFilter(String item)
Performs the actual filtering.- Parameters:
item- the item to check- Returns:
- true if label can be displayed in the tree
-
filter
public boolean filter(String item)
Checks an item whether it should be displayed or not.- Parameters:
item- the item to check- Returns:
- true if item can be displayed in the tree
-
-