com.tensegrity.generic.attribute
Interface AttributableOnSet

All Superinterfaces:
Attributable
All Known Subinterfaces:
BaseComposite, Composite, CompositeControl, CompositeGroup, CompositeLabel, CompositeLine, CompositeSwimLane, CompositeSwimLanePool, CompositeTable, CompositeViewGrid, CompositeViewMeasurementObject, CompositeViewRuler, Edge, Graph, GraphObject, Node, PortDenotation, Primitive, Subgraph, VisualEdge, VisualEdgeComposite, VisualGraphObject, VisualGraphObjectComposite, VisualNode, VisualNodeComposite, VisualSubgraph, VisualSubgraphComposite
All Known Implementing Classes:
AbstractPrimitive, AttributableOnSetCollection, AttributableOnSetList, AttributeTreeCategory, EditorStateAttributableOnSet, ElementDefinitionUtil.RenameAttributable, GenericAttributableOnSet, HiddenSlidesAttributableOnSet, LayoutController, TemplateAttributableOnSet

public interface AttributableOnSet
extends Attributable

REVIEWJAVADOC The interface description below sounds a lot like the parent interface.

This interface marks an object to be attributable. It defines all methods needed by an implementing object to work within AttributeSets.

Version:
$Id: AttributableOnSet.java,v 1.19 2005/10/24 07:20:56 MichaelKegel Exp $
Author:
MichaelKegel

Field Summary
static java.lang.String TREE_SUBSET_POSTFIX
          global constant that is used to represent the treelike structure
 
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.
 void disableAttributableEvents()
          Disables events for the registered listeners.
 void enableAttributableEvents()
          Enables the transmission of events to registered listeners.
 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.
 void removeAttributableOnSetListener(AttributableOnSetListener attributableOnSetListener)
          Removes a listener from the attributable on set instance.
 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 getAttributesTree().
 
Methods inherited from interface com.tensegrity.generic.attribute.Attributable
getAttribute, getAttributeType, getAttributeValue, setAttribute, setAttributeValue
 

Field Detail

TREE_SUBSET_POSTFIX

public static final java.lang.String TREE_SUBSET_POSTFIX
global constant that is used to represent the treelike structure

See Also:
Constant Field Values
Method Detail

getAttributes

public AttributeSet getAttributes()
Returns an AttributeSet consisting of all attributes of this AttributableOnSet.

Returns:
AttributeSet an AttributeSet with all attributes.

Find more information in the class documentation


setAttributes

public 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. 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.

Parameters:
attributes - the AttributeSet consisting of the attributes whose values to set.

Find more information in the class documentation


getAttributesTree

public AttributeSet getAttributesTree()
Returns an AttributeSet containing all Attributes of this AttributableOnSet in a treelike structure.
Treelike means that each attribute can have a subset that contains subsequent Attributes for an Attribute of this AttributableOnSet.
Since an 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 TREE_SUBSET_POSTFIX.

Returns:
AttributeSet an AttributeSet with the attributes in a treelike structure

setAttributesTree

public 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().

Parameters:
attributes - the AttributeSet containing the attributes whose values to set.

addAttributableOnSetListener

public void addAttributableOnSetListener(AttributableOnSetListener attributableOnSetListener)
Adds a listener to the attributable on set instance.

Parameters:
attributableOnSetListener - an AttributableOnSet listener listening for changes

removeAttributableOnSetListener

public void removeAttributableOnSetListener(AttributableOnSetListener attributableOnSetListener)
Removes a listener from the attributable on set instance.

Parameters:
attributableOnSetListener - the AttributableOnSet to be removed from the list of listeners.

enableAttributableEvents

public void enableAttributableEvents()
Enables the transmission of events to registered listeners.


disableAttributableEvents

public void disableAttributableEvents()
Disables events for the registered listeners.


areAttributableEventsEnabled

public boolean areAttributableEventsEnabled()
Returns a boolean that indicates whether generating of events is enabled or not.

Returns:
boolean flag that indicates whether event generation is active or not


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.