public class PlotConfiguration extends Object implements XMLEncodeDecode
The specific configurations for classes of objects are controlled by a series of container objects that can be accessed individually as required, or queried as a whole (for instance to get the complete AST description).
Each Plot should have one of these objects associated with it (which can be viewed and changed using a PlotConfigurator window).
The total state of configuration can be saved and restored from an XML snippet attached to a given XML Element.
PlotConfigurator
,
Plot
,
AstTitle
,
AstStrings
,
AstAxisLabels
,
AstNumberLabels
,
AstGrid
,
AstAxes
,
AstBorder
,
AstTicks
Modifier and Type | Field and Description |
---|---|
protected AstAxes |
astAxes
AST model of the axes.
|
protected AstAxisLabels |
astAxisLabels
AST model of the axis labels.
|
protected AstBorder |
astBorder
AST model of the border.
|
protected ArrayList |
astConfigObjects
Array of AbstractPlotControlsModel objects that are genuine Ast
related parts (i.e.
|
protected AstGrid |
astGrid
AST model of the grid.
|
protected AstNumberLabels |
astNumberLabels
AST model of the number labels.
|
protected AstStrings |
astStrings
AST model of the text strings.
|
protected AstTicks |
astTicks
AST model of the plot ticks.
|
protected AstTitle |
astTitle
AST model of the title.
|
protected ArrayList |
configObjects
Array of AbstractPlotControlsModel objects that are storing
the configuration parts.
|
Constructor and Description |
---|
PlotConfiguration()
Create an instance.
|
Modifier and Type | Method and Description |
---|---|
void |
add(AbstractPlotControlsModel model)
Add an AbstractPlotControlsModel to the list.
|
void |
decode(Element rootElement)
Decode (i.e.
|
void |
encode(Element rootElement)
Encode the internal state of this object into an XML snippet
rooted in an Element.
|
String |
getAst()
Get the complete AST description of all AST components.
|
String |
getAst(boolean passone)
Get the complete AST description (see
getAst broken into two
passes. |
AbstractPlotControlsModel |
getControlsModel(Class clazz)
Get an AbstractPlotControlsModel by class
|
String |
getTagName()
The name for the parent tag of all stored elements.
|
Iterator |
iterator()
Return an Iterator for the list of AbstractPlotControlsModels.
|
protected AstTitle astTitle
protected AstStrings astStrings
protected AstAxisLabels astAxisLabels
protected AstNumberLabels astNumberLabels
protected AstGrid astGrid
protected AstAxes astAxes
protected AstBorder astBorder
protected AstTicks astTicks
protected ArrayList configObjects
protected ArrayList astConfigObjects
public String getAst()
Plot
.public String getAst(boolean passone)
getAst
broken into two
passes. The two passes are used so that a different set of coordinates
can be drawn along the top and bottom axes, without interfering with
each other.public void add(AbstractPlotControlsModel model)
public Iterator iterator()
public AbstractPlotControlsModel getControlsModel(Class clazz)
public void encode(Element rootElement)
encode
in interface XMLEncodeDecode
rootElement
- the Element within which the object should
store its configuration.public void decode(Element rootElement)
decode
in interface XMLEncodeDecode
rootElement
- the element to which a previous object this
this type has attached its configuration.public String getTagName()
getTagName
in interface XMLEncodeDecode
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.