org.graffiti.graphics.grid
Class GridParametersAttribute

java.lang.Object
  extended by org.graffiti.attributes.AbstractAttribute
      extended by org.graffiti.attributes.AbstractCollectionAttribute
          extended by org.graffiti.attributes.LinkedHashMapAttribute
              extended by org.graffiti.graphics.grid.GridParametersAttribute
All Implemented Interfaces:
Attribute, CollectionAttribute, SortedCollectionAttribute, DeepCopy, Displayable<Object>

public final class GridParametersAttribute
extends LinkedHashMapAttribute

Attribute representing the parameters specific to the type of a grid.

Version:
$Revision$ $Date$
Author:
Andreas Gleißner

Field Summary
 
Fields inherited from class org.graffiti.attributes.AbstractCollectionAttribute
attributes
 
Fields inherited from class org.graffiti.attributes.AbstractAttribute
id
 
Fields inherited from interface org.graffiti.attributes.Attribute
SEPARATOR
 
Constructor Summary
protected GridParametersAttribute(GridAttribute gridAttribute, Grid grid, CollectionAttribute prevParameters)
          Construct a GridParametersAttribute.
 
Method Summary
 GridParameter getGridParameter(String id)
          Returns the annotation of the field holding the parameter represented by the attribute specified by the id.
protected  void setFromGrid(Grid grid)
          Makes this attribute to represent the type specific parameters of the specified grid.
 void setParent(CollectionAttribute parent)
          Sets the attribute's parent.
 
Methods inherited from class org.graffiti.attributes.LinkedHashMapAttribute
copy, doSetValue, getCollection, setCollection, setDefaultValue, toXMLString
 
Methods inherited from class org.graffiti.attributes.AbstractCollectionAttribute
add, add, containsAttribute, getAttributable, getAttribute, getValue, isEmpty, remove, remove, setAttributable, toString
 
Methods inherited from class org.graffiti.attributes.AbstractAttribute
callPostAttributeAdded, callPostAttributeChanged, callPostAttributeRemoved, callPreAttributeAdded, callPreAttributeChanged, callPreAttributeRemoved, getDescription, getId, getName, getParent, getPath, getSpaces, getStandardXML, setDescription, setValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.graffiti.attributes.CollectionAttribute
add, add, containsAttribute, getAttribute, isEmpty, remove, remove, setAttributable
 
Methods inherited from interface org.graffiti.attributes.Attribute
getAttributable, getId, getParent, getPath, getValue, setValue, toString
 
Methods inherited from interface org.graffiti.plugin.Displayable
getDescription, getName, setDescription
 

Constructor Detail

GridParametersAttribute

protected GridParametersAttribute(GridAttribute gridAttribute,
                                  Grid grid,
                                  CollectionAttribute prevParameters)
Construct a GridParametersAttribute.

Parameters:
gridAttribute - the parent of the GridParametersAttribute.
grid - the grid whose parameters are to be represented.
prevParameters - attribute representing grid parameters to optionally copy from. May be null.
Method Detail

setFromGrid

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

Parameters:
grid - the grid whose parameters are to be represented.

setParent

public void setParent(CollectionAttribute parent)
               throws FieldAlreadySetException
Sets the attribute's parent.

Implementation Notes: This method should only be called once and only by an addAttribute() method! The ListenerManager is already informed by the calling addAttribute method that the Attribute is now added to the hierarchy. Therefore no event is generated by this method.

Specified by:
setParent in interface Attribute
Overrides:
setParent in class AbstractAttribute
Parameters:
parent - the new parent of the Attribute.
Throws:
FieldAlreadySetException - DOCUMENT ME!

getGridParameter

public GridParameter getGridParameter(String id)
Returns the annotation of the field holding the parameter represented by the attribute specified by the id.

Parameters:
id - the id of the attribute representing the parameter held be field whose annotation is to be returned.
Returns:
the annotation of the field holding the parameter represented by the attribute specified by the id or null if the attribute or the annotation is not present.


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