Package org.graffiti.attributes
Class StringAttribute
java.lang.Object
org.graffiti.attributes.AbstractAttribute
org.graffiti.attributes.StringAttribute
- All Implemented Interfaces:
Attribute,DeepCopy,Displayable
- Direct Known Subclasses:
ArrowShapeAttribute,ChartAttribute,ChartColorAttribute,ClusterColorAttribute,CompoundAttribute,CompoundPositionAttribute,EdgeShapeAttribute,FontAttribute,KeggGroupPartAttribute,KeggIdAttribute,KeggReactionIdAttribute,KeggReactionTypeAttribute,KeggRelationSrcTgtAttribute,KeggRelationSubTypeAttribute,KeggRelationTypeAttribute,KeggTypeAttribute,LabelAlignmentAttribute,LabelColorAttribute,LabelFontAttribute,LabelStyleAttribute,NodePathwayLinkVisualizationAttribute,NodeShapeAttribute,ObjectAttribute,SourceDockingAttribute,TargetDockingAttribute,URLAttribute,XMLAttribute
public class StringAttribute extends AbstractAttribute
Contains a String.
- Version:
- $Revision: 1.8 $
-
Field Summary
-
Constructor Summary
Constructors Constructor Description StringAttribute()StringAttribute(String id, String value)Constructs a new instance of aStringAttributewith the given value. -
Method Summary
Modifier and Type Method Description Objectcopy()Returns a deep copy of this instance.StringgetString()Returns the value of this object.static AttributegetTypedStringAttribute(String id)static AttributegetTypedStringAttribute(String id, String value)ObjectgetValue()Returns the value of this attribute, i.e.static voidputAttributeType(String id, Class<? extends Attribute> attributeType)voidsetDefaultValue()The attribute's value is set so that itsgetValue()method will not returnnull.voidsetString(String value)Sets the value of this object.StringtoString(int n)Returns a string representation prepended bynspaces of this attribute.StringtoXMLString()Returns a well-formed XML string representing the Displayable.Methods inherited from class org.graffiti.attributes.AbstractAttribute
addEdgeAttributeType, addNodeAttributeType, getAttributable, getDescription, getIcon, getId, getName, getParent, getPath, getTypedAttribute, isDeleted, isTypedAttributeFromID, setDeleted, setDescription, setId, setParent, setValue, toString
-
Constructor Details
-
StringAttribute
Constructs a new instance of aStringAttributewith the given value.- Parameters:
id- the id of the attribute.value- the value of theAttribute.
-
StringAttribute
public StringAttribute()
-
-
Method Details
-
getTypedStringAttribute
-
getTypedStringAttribute
-
setDefaultValue
public void setDefaultValue()Description copied from interface:AttributeThe attribute's value is set so that itsgetValue()method will not returnnull.- See Also:
Attribute.setDefaultValue()
-
setString
Sets the value of this object. TheListenerManageris informed by the methodsetValue().- Parameters:
value- the new value of this object.
-
getString
Returns the value of this object.- Returns:
- the value of this 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
Returns a deep copy of this instance.- Returns:
- a deep copy of this instance.
-
toString
Description copied from interface:AttributeReturns a string representation prepended bynspaces of this attribute.- Specified by:
toStringin interfaceAttribute- Overrides:
toStringin classAbstractAttribute- Returns:
- DOCUMENT ME!
- See Also:
Attribute.toString(int)
-
toXMLString
Description copied from interface:DisplayableReturns a well-formed XML string representing the Displayable. The Displayable should be reconstructable via this representation. Therefore it must at least include the type of Displayable (classname) and a representation of its value. PROBABLE FUTURE DESIGN: The Displayables themselves will provide a method to reconstruct their value from the XML representation they provided.- Specified by:
toXMLStringin interfaceDisplayable- Overrides:
toXMLStringin classAbstractAttribute- Returns:
- string holding an XML representation of this Displayable
- See Also:
Displayable.toXMLString()
-
putAttributeType
-