Class ChartColorAttribute
java.lang.Object
org.graffiti.attributes.AbstractAttribute
org.graffiti.attributes.StringAttribute
de.ipk_gatersleben.ag_nw.graffiti.plugins.editcomponents.chart_colors.ChartColorAttribute
- All Implemented Interfaces:
Attribute
,DeepCopy
,Displayable
public class ChartColorAttribute extends StringAttribute
All StringAttributes with the name id "chart_colors" will be converted into a
ChartColorAttribute (see ChartAttributePlugin, where the mapping information
from id to class type is initialized.
- Author:
- Christian Klukas (c) 2004 IPK-Gatersleben
-
Field Summary
Fields Modifier and Type Field Description static String
attributeFolder
static String
attributeName
-
Constructor Summary
Constructors Constructor Description ChartColorAttribute()
ChartColorAttribute(String id)
ChartColorAttribute(String id, String value)
-
Method Summary
Modifier and Type Method Description Object
copy()
Returns a deep copy of this instance.void
ensureMinimumColorSelection(int barCount)
static ChartColorAttribute
getAttribute(Graph graph)
int
getDefinedBarCount()
ArrayList<String>
getIdList(int minimumReturn)
Color
getSeriesColor(String serie, Color returnIfNotDefined)
ArrayList<Color>
getSeriesColors(Collection<String> idList)
Color
getSeriesOutlineColor(String serie, Color returnIfNotDefined)
ArrayList<Color>
getSeriesOutlineColors(Collection<String> idList)
String
getString()
Returns the value of this object.Object
getValue()
Returns the value of this attribute, i.e.static boolean
hasAttribute(Graph graph)
void
setDefaultValue()
The attribute's value is set so that itsgetValue()
method will not returnnull
.void
setSeriesColor(int series, Color color)
void
setSeriesColor(String serie, Color color)
void
setSeriesOutlineColor(int series, Color color)
void
setString(String value)
Sets the value of this object.String
toString(int n)
Returns a string representation prepended byn
spaces of this attribute.String
toXMLString()
Returns a well-formed XML string representing the Displayable.Methods inherited from class org.graffiti.attributes.StringAttribute
getTypedStringAttribute, getTypedStringAttribute, putAttributeType
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
-
Field Details
-
attributeName
-
attributeFolder
-
-
Constructor Details
-
ChartColorAttribute
public ChartColorAttribute() -
ChartColorAttribute
-
ChartColorAttribute
-
-
Method Details
-
setDefaultValue
public void setDefaultValue()Description copied from interface:Attribute
The attribute's value is set so that itsgetValue()
method will not returnnull
.- Specified by:
setDefaultValue
in interfaceAttribute
- Overrides:
setDefaultValue
in classStringAttribute
- See Also:
Attribute.setDefaultValue()
-
getAttribute
-
hasAttribute
-
setString
Description copied from class:StringAttribute
Sets the value of this object. TheListenerManager
is informed by the methodsetValue()
.- Overrides:
setString
in classStringAttribute
- Parameters:
value
- the new value of this object.
-
getString
Description copied from class:StringAttribute
Returns the value of this object.- Overrides:
getString
in classStringAttribute
- Returns:
- the value of this object.
-
getValue
Description copied from class:StringAttribute
Returns the value of this attribute, i.e. contained Sting object.- Specified by:
getValue
in interfaceAttribute
- Specified by:
getValue
in interfaceDisplayable
- Overrides:
getValue
in classStringAttribute
- Returns:
- the value of the attribute, i.e. contained String object.
-
copy
Description copied from class:StringAttribute
Returns a deep copy of this instance.- Specified by:
copy
in interfaceDeepCopy
- Overrides:
copy
in classStringAttribute
- Returns:
- a deep copy of this instance.
-
toString
Description copied from interface:Attribute
Returns a string representation prepended byn
spaces of this attribute.- Specified by:
toString
in interfaceAttribute
- Overrides:
toString
in classStringAttribute
- Returns:
- DOCUMENT ME!
- See Also:
Attribute.toString(int)
-
toXMLString
Description copied from interface:Displayable
Returns 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:
toXMLString
in interfaceDisplayable
- Overrides:
toXMLString
in classStringAttribute
- Returns:
- string holding an XML representation of this Displayable
- See Also:
Displayable.toXMLString()
-
getSeriesColors
-
getSeriesOutlineColors
-
ensureMinimumColorSelection
public void ensureMinimumColorSelection(int barCount) -
getDefinedBarCount
public int getDefinedBarCount() -
setSeriesColor
-
setSeriesOutlineColor
-
getIdList
-
getSeriesColor
-
getSeriesOutlineColor
-
setSeriesColor
-