pl.edu.agh.cast.model.visual
Interface AttributeValueContainer

All Known Subinterfaces:
IDiagram
All Known Implementing Classes:
ConnectionGroup, Diagram, Legend, ModelElement, Node

public interface AttributeValueContainer

An interface to be implemented by elements containing attributes.

Author:
awos

Method Summary
 java.util.List<AttributeValue> getAllValues()
          Returns complete list of attribute values in this container.
 AttributeManager getAttributeManager()
           
 AttributeValue getAttributeValue(java.lang.String name)
           
 boolean isAttributeEditable(java.lang.String attributeName)
           
 AttributeValue removePropertyValue(java.lang.String name)
          Removes attribute value from this container.
 void setAttributeValue(java.lang.String name, java.lang.Object newValue)
          Sets a new attribute value, fires change event.
 void setAttributeValue(java.lang.String name, java.lang.Object newValue, AttributeMergePolicy policy)
          Sets a new attribute value according to given AttributeMergePolicy, fires change event.
 

Method Detail

getAttributeValue

AttributeValue getAttributeValue(java.lang.String name)

setAttributeValue

void setAttributeValue(java.lang.String name,
                       java.lang.Object newValue)
Sets a new attribute value, fires change event.

Parameters:
name - name of the attribute to change
newValue - new value of the attribute
Throws:
java.lang.UnsupportedOperationException - if attribute is not editable

setAttributeValue

void setAttributeValue(java.lang.String name,
                       java.lang.Object newValue,
                       AttributeMergePolicy policy)
Sets a new attribute value according to given AttributeMergePolicy, fires change event. If policy is null then acts the same as setAttributeValue(String, Object).

Parameters:
name - name of the attribute to change
newValue - new value of the attribute
policy - merge policy
Throws:
java.lang.UnsupportedOperationException - if attribute is not editable

isAttributeEditable

boolean isAttributeEditable(java.lang.String attributeName)

getAllValues

java.util.List<AttributeValue> getAllValues()
Returns complete list of attribute values in this container. Takes into consideration that registered properties may have changed in the manager, i.e. some values may be obsolete.


removePropertyValue

AttributeValue removePropertyValue(java.lang.String name)
Removes attribute value from this container.

Parameters:
name - name of attribute to remove
Returns:
removed AttributeValue, or null if this attribute's value was not set (see Collection.remove(Object))

getAttributeManager

AttributeManager getAttributeManager()


Copyright © 2007-2008 AGH University of Science and Technology. All Rights Reserved.