public class AdaptiveTreeComposite extends TreeComposite
TreeComposite
to create TreeComposites that have
adaptive properties based on a currently selected type. This class maintains
a map of all available TreeComposites (keyed on name), that the current
AdaptiveTreeComposite can be.iComponentVisitor
iComponentListener
Constructor and Description |
---|
AdaptiveTreeComposite()
Nullary constructor.
|
AdaptiveTreeComposite(java.util.ArrayList<TreeComposite> types)
Parameterized constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(IComponentVisitor visitor)
(non-Javadoc)
|
AdaptiveTreeComposite |
clone()
Performs a deep copy and returns a newly instantiated object.
|
void |
copy(AdaptiveTreeComposite otherObject)
Performs a deep copy.
|
boolean |
equals(java.lang.Object otherObject)
Performs an equality check between two AdaptiveTreeComposites.
|
java.lang.String |
getType()
Returns the name of the current AdaptiveTreeComposite's type, or null if
not set.
|
java.util.ArrayList<java.lang.String> |
getTypes()
Returns a list of names representing all TreeComposite types that this
AdaptiveTreeComposite can take on.
|
int |
hashCode()
Returns the hashcode of the object.
|
boolean |
setType(java.lang.String type)
Sets the current type based a name String passed in.
|
addChildExemplar, addComponent, allowActiveDataNodes, copy, copy, getActiveDataNode, getChildAtIndex, getChildExemplars, getComponent, getComponents, getDataNodes, getNextChild, getNextSibling, getNumberOfChildren, getNumberOfComponents, getNumberOfDataNodes, getParent, getPreviousChild, getPreviousSibling, hasChildExemplars, isActive, register, removeChild, removeComponent, resetChildIterator, setActive, setActiveDataNode, setChildExemplars, setNextChild, setParent, unregister, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
copy, getDescription, getId, getName, setDescription, setId, setName, update
getClass, notify, notifyAll, toString, wait, wait, wait
update
getDescription, getId, getName, setDescription, setId, setName
public AdaptiveTreeComposite()
public AdaptiveTreeComposite(java.util.ArrayList<TreeComposite> types)
types
- An ArrayList of TreeComposites that the AdaptiveTreeComposite
may use as its type. The ArrayList must be both non-null AND
non-empty, otherwise the typesMap will remain uninstantiated.public java.lang.String getType()
public boolean setType(java.lang.String type)
type
- Name of the type. Must be in the AdaptiveTreeComposite's Map
of types.public java.util.ArrayList<java.lang.String> getTypes()
public void copy(AdaptiveTreeComposite otherObject)
otherObject
- The AdaptiveTreeComposite to copy the contents of.public AdaptiveTreeComposite clone()
clone
in interface Identifiable
clone
in class TreeComposite
public boolean equals(java.lang.Object otherObject)
equals
in interface Identifiable
equals
in class TreeComposite
otherObject
- The other AdaptiveTreeComposite to compare against.Identifiable.equals(Object otherObject)
public int hashCode()
hashCode
in interface Identifiable
hashCode
in class TreeComposite
Identifiable.hashCode()
public void accept(IComponentVisitor visitor)
accept
in interface Component
accept
in class TreeComposite
visitor
- The visitor
Component.accept(IComponentVisitor visitor)