quoggles.auxiliary.attributes
Class ObjectAttribute

java.lang.Object
  |
  +--org.graffiti.attributes.AbstractAttribute
        |
        +--quoggles.auxiliary.attributes.ObjectAttribute
All Implemented Interfaces:
org.graffiti.attributes.Attribute, org.graffiti.core.DeepCopy, org.graffiti.plugin.Displayable

public class ObjectAttribute
extends org.graffiti.attributes.AbstractAttribute

Contains a Object.

Version:
$Revision: 1.4 $

Field Summary
private  java.lang.Object value
          The value of this ObjectAttribute.
 
Fields inherited from class org.graffiti.attributes.AbstractAttribute
id
 
Fields inherited from interface org.graffiti.attributes.Attribute
SEPARATOR
 
Constructor Summary
ObjectAttribute(java.lang.String id)
          Constructs a new instance of a ObjectAttribute.
ObjectAttribute(java.lang.String id, java.lang.Object value)
          Constructs a new instance of a ObjectAttribute with the given value.
 
Method Summary
 java.lang.Object copy()
          Returns a deep copy of this instance.
protected  void doSetValue(java.lang.Object o)
          Sets the value of the Attribute.
 java.lang.Object getObject()
          Returns the value of this object.
 java.lang.Object getValue()
          Returns the value of this attribute, i.e. contained Sting object.
 void setDefaultValue()
           
 void setObject(java.lang.Object value)
          Sets the value of this object.
 java.lang.String toString(int n)
           
 java.lang.String 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, setValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

private java.lang.Object value
The value of this ObjectAttribute.

Constructor Detail

ObjectAttribute

public ObjectAttribute(java.lang.String id)
Constructs a new instance of a ObjectAttribute.

Parameters:
id - the id of the Attribute.

ObjectAttribute

public ObjectAttribute(java.lang.String id,
                       java.lang.Object value)
Constructs a new instance of a ObjectAttribute with the given value.

Parameters:
id - the id of the attribute.
value - the value of the Attribute.
Method Detail

setDefaultValue

public void setDefaultValue()
See Also:
Attribute.setDefaultValue()

setObject

public void setObject(java.lang.Object value)
Sets the value of this object. The ListenerManager is informed by the method setValue().

Parameters:
value - the new value of this object.

getObject

public java.lang.Object getObject()
Returns the value of this object.

Returns:
the value of this object.

getValue

public java.lang.Object getValue()
Returns the value of this attribute, i.e. contained Sting object.

Returns:
the value of the attribute, i.e. contained String object.

copy

public java.lang.Object copy()
Returns a deep copy of this instance.

Returns:
a deep copy of this instance.

toString

public java.lang.String toString(int n)
Specified by:
toString in interface org.graffiti.attributes.Attribute
Overrides:
toString in class org.graffiti.attributes.AbstractAttribute
See Also:
Attribute.toString(int)

doSetValue

protected void doSetValue(java.lang.Object o)
                   throws java.lang.IllegalArgumentException
Sets the value of the Attribute. The ListenerManager is informed by the method setValue().

Specified by:
doSetValue in class org.graffiti.attributes.AbstractAttribute
Parameters:
o - the new value of the attribute.
Throws:
java.lang.IllegalArgumentException - if the parameter has not the appropriate class for this Attribute.

toXMLString

public java.lang.String toXMLString()
Specified by:
toXMLString in interface org.graffiti.plugin.Displayable
Overrides:
toXMLString in class org.graffiti.attributes.AbstractAttribute
See Also:
Displayable.toXMLString()