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_Acceptsthe classes that the actor must accept, null if not relevant.protected static Map<Class,Actor>m_ClassActorCachefor caching class/instance relationship.protected Compatibilitym_Compatibilityfor checking the compatibility.protected Class[]m_Generatesthe classes that the actor must generate, null if not relevant.protected static Map<String,Class>m_ItemClassCachefor caching item/class relationship.protected Class[]m_Restrictionswhether we are restricted to classes/interfaces.protected booleanm_SourcesAllowedwhether sources are allowed.protected booleanm_StandalonesAllowedwhether 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 booleandoFilter(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.booleangetSourcesAllowed()Returns whether sources are allowed.booleangetStandalonesAllowed()Returns whether standalones are allowed.protected voidinitialize()Initializes the filter.booleanisStrict()Returns whether strict or relaxed filtering is used.voidsetAccepts(Class[] value)Sets the classes that the actor must accept.voidsetGenerates(Class[] value)Sets the classes that the actor must generate.voidsetRestrictions(Class[] value)Sets the classes/interfaces that are allowed.voidsetSourcesAllowed(boolean value)Sets whether sources are allowed.voidsetStandalonesAllowed(boolean value)Sets whether standalones are allowed.voidsetStrict(boolean value)Sets whether to use strict or relaxed filtering.StringtoString()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:
initializein classAbstractItemFilter
-
setStrict
public void setStrict(boolean value)
Sets whether to use strict or relaxed filtering.- Specified by:
setStrictin interfaceStrictClassTreeFilter- Parameters:
value- if true strict mode is enabled
-
isStrict
public boolean isStrict()
Returns whether strict or relaxed filtering is used.- Specified by:
isStrictin 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:
doFilterin 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:
toStringin classAbstractItemFilter- Returns:
- the representation
-
-