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 boolean
m_Enabled
whether 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 boolean
doFilter(String item)
Performs the actual filtering.boolean
filter(String item)
Checks an item whether it should be displayed or not.protected void
initialize()
Initializes the filter.boolean
isEnabled()
Returns whether the filter is enabled.void
setEnabled(boolean value)
Sets whether the filter is enabled.abstract String
toString()
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
-
-