org.graffiti.graphics.grid
Class GridClassAttribute

java.lang.Object
  extended by org.graffiti.attributes.AbstractAttribute
      extended by org.graffiti.attributes.StringAttribute
          extended by org.graffiti.graphics.grid.GridClassAttribute
All Implemented Interfaces:
Attribute, DeepCopy, Displayable<Object>

public final class GridClassAttribute
extends StringAttribute

Attribute representing the type of a grid.

Version:
$Revision$ $Date$
Author:
Kathrin Hanauer, Andreas Gleißner

Field Summary
 
Fields inherited from class org.graffiti.attributes.AbstractAttribute
id
 
Fields inherited from interface org.graffiti.attributes.Attribute
SEPARATOR
 
Constructor Summary
protected GridClassAttribute(GridAttribute gridAttribute)
          Constructs a GridClassAttribute with the specified parent.
 
Method Summary
 GridClassAttribute copy()
          Returns a deep copy of this instance.
protected  void setFromGrid(Grid grid)
          Makes this attribute to represent the type of the specified grid.
 void setString(String value)
          Sets the value of this object.
 void setValue(Object v)
          Sets the value of this Attribute to the given value.
 
Methods inherited from class org.graffiti.attributes.StringAttribute
doSetValue, getString, getValue, setDefaultValue, toString, toXMLString
 
Methods inherited from class org.graffiti.attributes.AbstractAttribute
callPostAttributeAdded, callPostAttributeChanged, callPostAttributeRemoved, callPreAttributeAdded, callPreAttributeChanged, callPreAttributeRemoved, getAttributable, getDescription, getId, getName, getParent, getPath, getSpaces, getStandardXML, setDescription, setParent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GridClassAttribute

protected GridClassAttribute(GridAttribute gridAttribute)
Constructs a GridClassAttribute with the specified parent.

Parameters:
gridAttribute -
Method Detail

setString

public void setString(String value)
Sets the value of this object. The ListenerManager is informed by the method setValue().

Overrides:
setString in class StringAttribute
Parameters:
value - the new value of this object.

setValue

public void setValue(Object v)
              throws IllegalArgumentException
Sets the value of this Attribute to the given value. If the value is set via att.setValue(x) and then retrieved via y=att.getValue() it is only guaranteed that x.equals(y) not x==y, i.e. some particular concret classes can provide x==y but this behaviour is not general, in contrast x.equals(y) must be always guaranteed.

Specified by:
setValue in interface Attribute
Specified by:
setValue in interface Displayable<Object>
Overrides:
setValue in class AbstractAttribute
Parameters:
v - the new value.
Throws:
IllegalArgumentException - if v is not of the apropriate type.

setFromGrid

protected void setFromGrid(Grid grid)
Makes this attribute to represent the type of the specified grid.

Parameters:
grid - the grid whose type is to be represented.

copy

public GridClassAttribute copy()
Returns a deep copy of this instance.

Specified by:
copy in interface DeepCopy
Overrides:
copy in class StringAttribute
Returns:
a deep copy of this instance.


Generated at 2012-05-30 11:00:36 PM CEST