public class AstAxisLabels extends AbstractPlotControlsModel
Modifier and Type | Field and Description |
---|---|
static int |
BOTTOM
Description of the Field
|
protected Color |
colour
The colour of the labels.
|
protected Font |
font
The Font used to display the labels.
|
static double |
GAP_MAX
The suggested maximum gap.
|
static double |
GAP_MIN
The suggested minimum gap.
|
static double |
GAP_STEP
The suggested gap resolution (i.e.
|
protected DefaultGrfFontManager |
grfFontManager
Reference to the GrfFontManager object.
|
protected boolean |
isXSet
Whether X label is set or unset.
|
protected boolean |
isYSet
Whether Y label is set or unset.
|
static int |
LEFT
Enumerations of the possible edges.
|
static String |
NULL_LABEL
A label to show that is the same as null.
|
static int |
RIGHT
Description of the Field
|
protected boolean |
showXUnits
Whether the X label should also have the units displayed.
|
protected boolean |
showYUnits
Whether the Y label should also have the units displayed.
|
static int |
TOP
Description of the Field
|
protected int |
xEdge
The edge that the X label should be displayed on.
|
protected double |
xGap
The gap between X label and plot border.
|
protected String |
xLabel
The value for the X label.
|
protected boolean |
xShown
Whether X label should be shown.
|
protected int |
yEdge
The edge that the Y label should be displayed on.
|
protected double |
yGap
The gap between Y label and the plot border.
|
protected String |
yLabel
The value for the Y label.
|
protected boolean |
yShown
Whether Y label should be shown.
|
listeners
Constructor and Description |
---|
AstAxisLabels()
Create an empty instance.
|
AstAxisLabels(String xLabel,
String yLabel)
Create an instance with initial values.
|
Modifier and Type | Method and Description |
---|---|
void |
encode(Element rootElement)
Description of the Method
|
String |
getAstOptions()
Get the AST plot options description of this object.
|
Color |
getColour()
Get the colour of the labels.
|
Font |
getFont()
Get the Font used to draw the labels.
|
boolean |
getShowXUnits()
Get whether we're displaying the units string on the X axis.
|
boolean |
getShowYUnits()
Get whether we're displaying the units string on the Y axis.
|
String |
getTagName()
The name of our enclosing tag.
|
int |
getXEdge()
Get the edge used to display the X axis.
|
double |
getXGap()
Get the gap between X label and border.
|
String |
getXLabel()
Get the current X label.
|
boolean |
getXShown()
Return if the X label is to be shown.
|
boolean |
getXState()
Return if the X label is set or unset.
|
int |
getYEdge()
Get the edge used to display the Y axis.
|
double |
getYGap()
Get the gap between Y label and border.
|
String |
getYLabel()
Get the current Y label.
|
boolean |
getYShown()
Return if the Y labels is to be shown.
|
boolean |
getYState()
Return if the Y label is set or unset.
|
void |
setColour(Color colour)
Set the colour of the labels.
|
void |
setDefaults()
Set/reset all values to their defaults.
|
void |
setFont(Font font)
Set the Font to be used when displaying the labels.
|
void |
setFromString(String name,
String value)
Set the value of a member variable by matching its name to a known
local property string.
|
void |
setShowXUnits(boolean showXUnits)
Set whether to display the units string on the X axis.
|
void |
setShowYUnits(boolean showYUnits)
Set whether to display the units string on the Y axis.
|
void |
setXEdge(int xEdge)
Set the edge to display the X label.
|
void |
setXGap(double xGap)
Set the gap between X label and border.
|
void |
setXLabel(String xLabel)
Set the X label.
|
void |
setXShown(boolean xShown)
Set whether the X label should be shown.
|
void |
setXState(boolean isXSet)
Set whether the X label is set or unset (unset implies that all label
properties should remain at their AST defaults).
|
void |
setYEdge(int yEdge)
Set the edge to display the Y label.
|
void |
setYGap(double yGap)
Set the gap between Y label and border.
|
void |
setYLabel(String yLabel)
Set the Y label.
|
void |
setYShown(boolean yShown)
Set whether the Y label should be shown.
|
void |
setYState(boolean isYSet)
Set whether the Y label is set or unset (unset implies that all label
properties should remain at their AST defaults).
|
String |
toString()
Get a string representation of the AST options.
|
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
protected boolean isXSet
protected boolean isYSet
protected boolean xShown
protected boolean yShown
protected String xLabel
protected String yLabel
protected Font font
protected Color colour
protected double xGap
protected double yGap
public static final double GAP_MIN
public static final double GAP_MAX
public static final double GAP_STEP
public static final String NULL_LABEL
protected int xEdge
protected int yEdge
protected boolean showXUnits
protected boolean showYUnits
public static final int LEFT
public static final int RIGHT
public static final int TOP
public static final int BOTTOM
protected DefaultGrfFontManager grfFontManager
public void setDefaults()
public void setXState(boolean isXSet)
isXSet
- The new xState valuepublic boolean getXState()
public void setYState(boolean isYSet)
isYSet
- The new yState valuepublic boolean getYState()
public void setXShown(boolean xShown)
xShown
- The new xShown valuepublic boolean getXShown()
public void setYShown(boolean yShown)
yShown
- The new yShown valuepublic boolean getYShown()
public void setXLabel(String xLabel)
xLabel
- The new xLabel valuepublic String getXLabel()
public void setYLabel(String yLabel)
yLabel
- The new yLabel valuepublic String getYLabel()
public void setFont(Font font)
font
- The new font valuepublic Font getFont()
public void setColour(Color colour)
colour
- The new colour valuepublic Color getColour()
public void setXGap(double xGap)
xGap
- The new xGap valuepublic double getXGap()
public void setYGap(double yGap)
yGap
- The new yGap valuepublic double getYGap()
public void setXEdge(int xEdge)
xEdge
- The new xEdge valuepublic int getXEdge()
public void setYEdge(int yEdge)
yEdge
- The new yEdge valuepublic int getYEdge()
public void setShowXUnits(boolean showXUnits)
showXUnits
- The new showXUnits valuepublic boolean getShowXUnits()
public void setShowYUnits(boolean showYUnits)
showYUnits
- The new showYUnits valuepublic boolean getShowYUnits()
public String getAstOptions()
public String toString()
public String getTagName()
public void encode(Element rootElement)
encode
in interface XMLEncodeDecode
encode
in class AbstractPlotControlsModel
rootElement
- Description of the Parameterpublic void setFromString(String name, String value)
setFromString
in class AbstractPlotControlsModel
name
- The new fromString valuevalue
- The new fromString valueCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.