Package adams.gui.goe.classtree
Class ActorClassTreeFilter
- java.lang.Object
-
- adams.gui.core.dotnotationtree.AbstractItemFilter
-
- adams.gui.goe.classtree.ActorClassTreeFilter
-
- All Implemented Interfaces:
StrictClassTreeFilter
public class ActorClassTreeFilter extends AbstractItemFilter implements StrictClassTreeFilter
Filter for actors. Takes the generates/accepts of each actor into account and compares it against the- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description protected Class[]
m_Accepts
the classes that the actor must accept, null if not relevant.protected static Map<Class,Actor>
m_ClassActorCache
for caching class/instance relationship.protected Compatibility
m_Compatibility
for checking the compatibility.protected Class[]
m_Generates
the classes that the actor must generate, null if not relevant.protected static Map<String,Class>
m_ItemClassCache
for caching item/class relationship.protected Class[]
m_Restrictions
whether we are restricted to classes/interfaces.protected boolean
m_SourcesAllowed
whether sources are allowed.protected boolean
m_StandalonesAllowed
whether standalones are allowed.-
Fields inherited from class adams.gui.core.dotnotationtree.AbstractItemFilter
m_Enabled
-
-
Constructor Summary
Constructors Constructor Description ActorClassTreeFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
doFilter(String item)
Performs the actual filtering.Class[]
getAccepts()
Returns the classes that the actor must accept.Class[]
getGenerates()
Returns the classes that the actor must generate.Class[]
getRestrictions()
Returns the classes/interfaces that are allowed.boolean
getSourcesAllowed()
Returns whether sources are allowed.boolean
getStandalonesAllowed()
Returns whether standalones are allowed.protected void
initialize()
Initializes the filter.boolean
isStrict()
Returns whether strict or relaxed filtering is used.void
setAccepts(Class[] value)
Sets the classes that the actor must accept.void
setGenerates(Class[] value)
Sets the classes that the actor must generate.void
setRestrictions(Class[] value)
Sets the classes/interfaces that are allowed.void
setSourcesAllowed(boolean value)
Sets whether sources are allowed.void
setStandalonesAllowed(boolean value)
Sets whether standalones are allowed.void
setStrict(boolean value)
Sets whether to use strict or relaxed filtering.String
toString()
Returns a short representation of the filter.-
Methods inherited from class adams.gui.core.dotnotationtree.AbstractItemFilter
filter, isEnabled, setEnabled
-
-
-
-
Field Detail
-
m_Accepts
protected Class[] m_Accepts
the classes that the actor must accept, null if not relevant.
-
m_Generates
protected Class[] m_Generates
the classes that the actor must generate, null if not relevant.
-
m_Compatibility
protected Compatibility m_Compatibility
for checking the compatibility.
-
m_StandalonesAllowed
protected boolean m_StandalonesAllowed
whether standalones are allowed.
-
m_SourcesAllowed
protected boolean m_SourcesAllowed
whether sources are allowed.
-
m_Restrictions
protected Class[] m_Restrictions
whether we are restricted to classes/interfaces.
-
m_ItemClassCache
protected static Map<String,Class> m_ItemClassCache
for caching item/class relationship.
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the filter.- Overrides:
initialize
in classAbstractItemFilter
-
setStrict
public void setStrict(boolean value)
Sets whether to use strict or relaxed filtering.- Specified by:
setStrict
in interfaceStrictClassTreeFilter
- Parameters:
value
- if true strict mode is enabled
-
isStrict
public boolean isStrict()
Returns whether strict or relaxed filtering is used.- Specified by:
isStrict
in interfaceStrictClassTreeFilter
- Returns:
- true if strict mode is enabled
-
setStandalonesAllowed
public void setStandalonesAllowed(boolean value)
Sets whether standalones are allowed.- Parameters:
value
- if true then standalones are allowed
-
getStandalonesAllowed
public boolean getStandalonesAllowed()
Returns whether standalones are allowed.- Returns:
- true if standalones are allowed
-
setSourcesAllowed
public void setSourcesAllowed(boolean value)
Sets whether sources are allowed.- Parameters:
value
- if true then sources are allowed
-
getSourcesAllowed
public boolean getSourcesAllowed()
Returns whether sources are allowed.- Returns:
- true if sources are allowed
-
setAccepts
public void setAccepts(Class[] value)
Sets the classes that the actor must accept.- Parameters:
value
- the classes, null if to ignore
-
getAccepts
public Class[] getAccepts()
Returns the classes that the actor must accept.- Returns:
- the classes, null if ignored
-
setGenerates
public void setGenerates(Class[] value)
Sets the classes that the actor must generate.- Parameters:
value
- the classes, null if to ignore
-
getGenerates
public Class[] getGenerates()
Returns the classes that the actor must generate.- Returns:
- the classes, null if ignored
-
setRestrictions
public void setRestrictions(Class[] value)
Sets the classes/interfaces that are allowed.- Parameters:
value
- the classes, null if to ignore
-
getRestrictions
public Class[] getRestrictions()
Returns the classes/interfaces that are allowed.- Returns:
- the classes, null if ignored
-
doFilter
protected boolean doFilter(String item)
Performs the actual filtering.- Specified by:
doFilter
in classAbstractItemFilter
- Parameters:
item
- the class to check- Returns:
- true if class can be displayed in the ClassTree
-
toString
public String toString()
Returns a short representation of the filter.- Specified by:
toString
in classAbstractItemFilter
- Returns:
- the representation
-
-