|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ast.gui.AbstractPlotControlsModel
uk.ac.starlink.ast.gui.ColourStore
public class ColourStore
Store a java.awt.Color. Offers the ability for ChangeListeners to be informed when the Color changes and the encode and decode of the Color as an integer XML snippet.
This model is not directly related an AST plot.
Field Summary | |
---|---|
protected Color |
colour
The Color. |
protected String |
tagName
Name of the tag. |
Fields inherited from class uk.ac.starlink.ast.gui.AbstractPlotControlsModel |
---|
listeners |
Constructor Summary | |
---|---|
ColourStore()
Create an instance with the default color and tag name. |
|
ColourStore(String tagName)
Create an instance with the default color. |
|
ColourStore(String tagName,
Color colour)
Create an instance with a given colour. |
Method Summary | |
---|---|
void |
encode(Element rootElement)
Encode this value in an XML snippet. |
Color |
getColour()
Get the colour. |
int |
getIntColour()
Get the colour as an RGB integer (can be used by DefaultGrf). |
String |
getTagName()
The name of our enclosing tag. |
void |
setColor(Color colour)
Set the colour. |
void |
setFromString(String name,
String value)
Set the colour from an integer encode as a String. |
void |
setIntColour(int icolour)
Set the colour from an RGB integer (supplied from DefaultGrf). |
void |
setTagName(String tagName)
The name of our enclosing tag. |
Methods inherited from class uk.ac.starlink.ast.gui.AbstractPlotControlsModel |
---|
addChangeListener, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, booleanFromString, booleanToString, colorFromString, colorToString, decode, doubleFromString, doubleToString, fireChanged, fontFromString, fontToString, getChildren, getElementName, getElementValue, intFromString, intToString, longFromString, longToString, removeChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Color colour
protected String tagName
Constructor Detail |
---|
public ColourStore()
public ColourStore(String tagName)
public ColourStore(String tagName, Color colour)
Method Detail |
---|
public void setColor(Color colour)
public Color getColour()
public void setIntColour(int icolour)
public int getIntColour()
public String getTagName()
public void setTagName(String tagName)
public void encode(Element rootElement)
encode
in interface XMLEncodeDecode
encode
in class AbstractPlotControlsModel
rootElement
- the Element within which the object should
store its configuration.public void setFromString(String name, String value)
setFromString
in class AbstractPlotControlsModel
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |