|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.generic.attribute.AttributableOnSetCollection
AttributableOnSet implementation which itself contains some
AttributableOnSets. The AttributeSet
structures of the single AttributableOnSet s will be merged,
if possible, so the getter functions return a structure representing the
values in all elements of this collection. Some of the values might be in an
undefined state, if they differ in the single elements.
| Field Summary |
| Fields inherited from interface com.tensegrity.generic.attribute.AttributableOnSet |
TREE_SUBSET_POSTFIX |
| Constructor Summary | |
AttributableOnSetCollection()
Constructor |
|
AttributableOnSetCollection(AttributableOnSetCollectionFeedback feedback)
Constructor |
|
| Method Summary | |
void |
addAttributableOnSet(AttributableOnSet aos)
Add an AttributableOnSet to the collection |
void |
addAttributableOnSetListener(AttributableOnSetListener attributableOnSetListener)
Adds a listener to the attributable on set instance. |
boolean |
areAttributableEventsEnabled()
Returns a boolean that indicates whether generating of
events is enabled or not. |
void |
disableAttributableEvents()
Disables events for the registered listeners. |
void |
disableTypeRemoval()
Disables the automatic removal of the type node, which is the root of an attribute tree |
void |
enableAttributableEvents()
Enables the transmission of events to registered listeners. |
void |
enableTypeRemoval()
Enables the automatic removal of the type node, which is the root of an attribute tree |
static Attribute |
findAttribute(AttributeSet parent,
java.lang.String path)
Deprecated. Use AttributeOperations.findByPath(AttributeSet, String). |
AttributableOnSet |
get(int i)
Retrieves the AttributableOnSet at the given index. |
Attribute |
getAttribute(java.lang.String name)
Returns the attribute with the given name or null if there
is no Attribute with the given name. |
AttributeSet |
getAttributes()
Returns an AttributeSet consisting of all attributes of this
AttributableOnSet. |
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. |
static java.lang.String |
getPath(AttributeSet set,
Attribute attrib)
Returns the full qualified path of the given attribute in the given set. |
static java.lang.String |
getTypeName(AttributableOnSet onset)
Returns the type name of the given AttributableOnSet. |
java.lang.String |
getTypeName(int index)
Returns the type name of the AttributableOnSet at the
given index. |
java.util.Collection |
getTypeNames()
Returns a list of all type nams in this collection, so there are no duplicate elements in the list. |
boolean |
isTypeRemovalEnabled()
Returns true, if the automatic type removal is enabled |
boolean |
isUndefinedState(java.lang.String path)
Checks whether the value of the attribute identified by the given path is in an undefined state. |
void |
removeAttributableOnSet(AttributableOnSet aos)
Removes an AttributableOnSet from the collection |
void |
removeAttributableOnSetListener(AttributableOnSetListener attributableOnSetListener)
Removes a listener from the attributable on set instance. |
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)
Searches within the AttributeSet given by
attributes for attributes that have the same name as the
attributes of this AttributableOnSet holds. |
void |
setAttributesTree(AttributableOnSet attributable,
AttributeSet attributes)
Sets the attributes to a specific attributable. |
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. |
int |
size()
Returns the size of this collection |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AttributableOnSetCollection()
public AttributableOnSetCollection(AttributableOnSetCollectionFeedback feedback)
feedback - The feedback for notifications| Method Detail |
public void addAttributableOnSet(AttributableOnSet aos)
AttributableOnSet to the collection
aos - The AttributableOnSet to addpublic void removeAttributableOnSet(AttributableOnSet aos)
AttributableOnSet from the collection
aos - The AttributableOnSet to removepublic int size()
public AttributableOnSet get(int i)
AttributableOnSet at the given index.
i - The index to retrieve
public java.lang.String getTypeName(int index)
AttributableOnSet at the
given index.
index - The index of the AttributableOnSet
getAttributesTree() (typename)public boolean isUndefinedState(java.lang.String path)
path - The complete path of the attribute
public boolean isTypeRemovalEnabled()
public void enableTypeRemoval()
public void disableTypeRemoval()
public static final Attribute findAttribute(AttributeSet parent,
java.lang.String path)
AttributeOperations.findByPath(AttributeSet, String).
parent - The parent set to start searchpath - The path to the attribute to look for
public static final java.lang.String getPath(AttributeSet set,
Attribute attrib)
set - The set that has to contain the attribute in its substructureattrib - The attribute to look for
public static final java.lang.String getTypeName(AttributableOnSet onset)
AttributableOnSet.
onset - The AttributableOnSet
getAttributesTree() (typename)public AttributeSet getAttributes()
AttributableOnSetAttributeSet consisting of all attributes of this
AttributableOnSet.
getAttributes in interface AttributableOnSetAttributeSet with all attributes.public void setAttributes(AttributeSet attributes)
AttributableOnSetAttributeSet given by
attributes for attributes that have the same name as the
attributes of this AttributableOnSet holds. The value of
every attribute that has the same name is used as the new value for the
corresponding attribute of this AttributableOnSet.
An Attribute within the given AttributeSet that
is not an attribute of the object that implements the
AttributableOnSet interface is not handled by nor added
to the specific implementor of the AttributableOnSet
interface.
setAttributes in interface AttributableOnSetattributes - the AttributeSet consisting of the attributes
whose values to set.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 structure
public void setAttributesTree(AttributableOnSet attributable,
AttributeSet attributes)
attributable - The attributable to apply the attributes toattributes - The attributes to applypublic 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)
AttributableOnSet
addAttributableOnSetListener in interface AttributableOnSetattributableOnSetListener - an AttributableOnSet
listener listening for changespublic void removeAttributableOnSetListener(AttributableOnSetListener attributableOnSetListener)
AttributableOnSet
removeAttributableOnSetListener in interface AttributableOnSetattributableOnSetListener - the AttributableOnSet to
be removed from the list of listeners.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)
Attributablenull if there
is no Attribute with the given name.
getAttribute in interface Attributablename - name of the attribute to return.
null.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.
public java.util.Collection getTypeNames()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||