|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.gui.graphdocument.ElementDefinitionUtil.RenameAttributable
Abstract class for an AttributableOnSet that can be used to rename multiple items in the context of an AttributeEditor. Implementations of this are used during conflict resolving.
| Field Summary | |
protected java.util.HashMap |
mapRename
mapRename maps all old names to the new names |
| Fields inherited from interface com.tensegrity.generic.attribute.AttributableOnSet |
TREE_SUBSET_POSTFIX |
| Constructor Summary | |
protected |
ElementDefinitionUtil.RenameAttributable()
Constructor |
| Method Summary | |
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. |
boolean |
containsName(java.lang.String name)
Returns true, if the given name is part of this rename attributable |
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 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. |
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. |
java.lang.String |
getNewName(java.lang.String name)
Returns the new name for the given old name |
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(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 AttributableOnSet.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 |
| Methods inherited from interface com.tensegrity.generic.attribute.AttributableOnSet |
getAttributesTree |
| Field Detail |
protected java.util.HashMap mapRename
mapRename maps all old names to the new names
| Constructor Detail |
protected ElementDefinitionUtil.RenameAttributable()
| Method Detail |
public 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 java.lang.String getNewName(java.lang.String name)
name - the old name
public boolean containsName(java.lang.String name)
name - the name to check
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 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)
throws IllegalValueException,
ConstraintViolationException
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.
ConstraintViolationException - is thrown when the value of the
given Attribute violates the constraint of the
Attribute to set.
IllegalValueException - is thrown when the value of the given
Attribute is illegal (for instance when it is null).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)
throws IllegalValueException,
ConstraintViolationException
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.
ConstraintViolationException - is thrown when the given
value violates the constraint of the
Attribute to set.
IllegalValueException - is thrown when the given value
is illegal (for instance when it is null).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 | ||||||||||