|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.gui.template.AttributableOnSetList
The class AttributableOnSetList allows you to merge
AttributableOnSet instances. This can be useful, if you need
to combine several AttributableOnSet's without manually
merging their attributes.
| Field Summary |
| Fields inherited from interface com.tensegrity.generic.attribute.AttributableOnSet |
TREE_SUBSET_POSTFIX |
| Constructor Summary | |
AttributableOnSetList()
Creates a new AttributableOnSetList. |
|
| Method Summary | |
void |
add(AttributableOnSet onSet)
Adds a given AttributableOnSet to the internal list of elements. |
void |
addAttributableOnSetListener(AttributableOnSetListener attributableOnSetListener)
Adds the given listener to *all* listed Attributable's. |
boolean |
areAttributableEventsEnabled()
Returns a boolean that indicates whether generating of
events is enabled or not. |
void |
disableAttributableEvents()
Disables events for the registered listeners. |
void |
enableAttributableEvents()
Enables the transmission of events to registered listeners. |
Attribute |
getAttribute(java.lang.String name)
Returns the first occurrency of an attribute with the parameter name. |
AttributeSet |
getAttributes()
Manually merges all the AttributeSets of the currently listed attributables and returns the resulting Set. |
AttributeSet |
getAttributesTree()
Returns an AttributeSet containing all
Attributes of this AttributableOnSet in a
treelike structure.
|
AttributeType |
getAttributeType(java.lang.String name)
Returns the AttributeType of the attribute with the given
name. |
java.lang.Object |
getAttributeValue(java.lang.String name)
Return the value of the attribute with the given name. |
void |
removeAttributableOnSetListener(AttributableOnSetListener attributableOnSetListener)
Remove the given listener from *all* listed Attributable's. |
void |
setAttribute(Attribute attribute)
Sets the value of the attribute with the same name to the value of the given attribute. |
void |
setAttributes(AttributeSet attributes)
Passes the given AttributeSet to all listed Attributable's. |
void |
setAttributesTree(AttributeSet attributes)
Performs the same operation as the setAttributes(com.tensegrity.generic.attribute.AttributeSet) method with
the difference that the AttributeSet given to this method
must provide the treelike structure mentioned in the documentation of
the getAttributesTree(). |
void |
setAttributeValue(java.lang.String name,
java.lang.Object value)
Sets the value of the attribute with the name to the given value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AttributableOnSetList()
AttributableOnSetList. This constructor does
intentionally nothing.
| Method Detail |
public void add(AttributableOnSet onSet)
AttributableOnSet to the internal list of elements.
onSet - the AttributableOnSet to add to the
internal list.public AttributeSet getAttributes()
getAttributes in interface AttributableOnSetAttributeSet with all attributes.AttributableOnSet.getAttributes()public void setAttributes(AttributeSet attributes)
AttributeSet to all listed Attributable's. Each
of the Attributable's can decide which attributes to pick from that set.
setAttributes in interface AttributableOnSetattributes - the AttributeSet consisting of the attributes
whose values to set.AttributableOnSet.setAttributes(com.tensegrity.generic.attribute.AttributeSet)public AttributeSet getAttributesTree()
AttributableOnSetAttributeSet containing all
Attributes of this AttributableOnSet in a
treelike structure.
Attributes for an Attribute of this
AttributableOnSet.
Attribute can only
have one value (in this case an object or the Attributes
for an object) the subsequent attributes are plugged into the returned
AttributeSet as a new Attribute with the same
name and the AttributableOnSet.TREE_SUBSET_POSTFIX.
getAttributesTree in interface AttributableOnSetAttributeSet with the attributes
in a treelike structurepublic void setAttributesTree(AttributeSet attributes)
AttributableOnSetAttributableOnSet.setAttributes(com.tensegrity.generic.attribute.AttributeSet) method with
the difference that the AttributeSet given to this method
must provide the treelike structure mentioned in the documentation of
the AttributableOnSet.getAttributesTree().
setAttributesTree in interface AttributableOnSetattributes - the AttributeSet containing the attributes
whose values to set.public void addAttributableOnSetListener(AttributableOnSetListener attributableOnSetListener)
addAttributableOnSetListener in interface AttributableOnSetattributableOnSetListener - an AttributableOnSet
listener listening for changesAttributableOnSet.addAttributableOnSetListener(com.tensegrity.generic.attribute.event.AttributableOnSetListener)public void removeAttributableOnSetListener(AttributableOnSetListener attributableOnSetListener)
removeAttributableOnSetListener in interface AttributableOnSetattributableOnSetListener - the AttributableOnSet to
be removed from the list of listeners.AttributableOnSet.removeAttributableOnSetListener(com.tensegrity.generic.attribute.event.AttributableOnSetListener)public void enableAttributableEvents()
AttributableOnSet
enableAttributableEvents in interface AttributableOnSetpublic void disableAttributableEvents()
AttributableOnSet
disableAttributableEvents in interface AttributableOnSetpublic boolean areAttributableEventsEnabled()
AttributableOnSetboolean that indicates whether generating of
events is enabled or not.
areAttributableEventsEnabled in interface AttributableOnSetpublic Attribute getAttribute(java.lang.String name)
name.
getAttribute in interface Attributablename - name of the attribute to return.
null.Attributable.getAttribute(java.lang.String)public void setAttribute(Attribute attribute)
AttributableAttributable interface doesn't support an
Attribute with the name of the Attribute given
by attribute, the given attribute is not
handled by nor added to the attributes of the Attributable.
setAttribute in interface Attributableattribute - the attribute to be set.public java.lang.Object getAttributeValue(java.lang.String name)
Attributable
getAttributeValue in interface Attributablename - the name of the attribute to return the value from.
public void setAttributeValue(java.lang.String name,
java.lang.Object value)
AttributableAttributable interface doesn't support an
Attribute with the name given by name,
the attribute given through name and value
is not handled nor created by Attributable.
setAttributeValue in interface Attributablename - the name of the attribute.value - the value to set the attributes value to.public AttributeType getAttributeType(java.lang.String name)
AttributableAttributeType of the attribute with the given
name.
getAttributeType in interface Attributablename - the name of the attribute.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||