public class AstNumberLabels extends AbstractPlotControlsModel
Modifier and Type | Field and Description |
---|---|
protected Color |
colour
The colour of the labels.
|
protected int |
digits
The number of digits used to determine gap between major axes.
|
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 numeric labels are set or unset.
|
protected boolean |
isYSet
Whether Y numeric labels are set or unset.
|
protected boolean |
logLabelSet
Whether log-style labelling control is set.
|
protected double |
xGap
The gap between X labels and plot border.
|
protected boolean |
xLogLabel
Whether X numeric labels should use log-style labelling.
|
protected boolean |
xRotated
Whether X numeric labels are drawn rotated.
|
protected boolean |
xShown
Whether X numeric labels should be shown.
|
protected double |
yGap
The gap between Y labels and the plot border.
|
protected boolean |
yLogLabel
Whether Y numeric labels should use log-style labelling.
|
protected boolean |
yRotated
Whether Y numeric labels are drawn rotated.
|
protected boolean |
yShown
Whether Y numeric labels should be shown.
|
listeners
Constructor and Description |
---|
AstNumberLabels()
Create an empty instance.
|
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.
|
int |
getDigits()
Get the number of digits of precision.
|
Font |
getFont()
Get the Font used to draw the labels.
|
boolean |
getLogLabelSet()
Get whether the X label log labelling is set or unset.
|
String |
getTagName()
The name of our enclosing tag.
|
double |
getXGap()
Get the gap between X labels and border.
|
boolean |
getXLogLabel()
Return if the X labels are to be drawing using log-labelling.
|
boolean |
getXRotated()
Return if the X labels are drawn rotated if possible.
|
boolean |
getXShown()
Return if the X labels are to be shown.
|
boolean |
getXState()
Return if the X labels are set or unset.
|
double |
getYGap()
Get the gap between Y labels and border.
|
boolean |
getYLogLabel()
Return if the Y labels are to be drawing using log-labelling.
|
boolean |
getYRotated()
Return if the Y labels are drawn rotated if possible.
|
boolean |
getYShown()
Return if the Y labels are to be shown.
|
boolean |
getYState()
Return if the Y labels are set or unset.
|
void |
setColour(Color colour)
Set the colour of the labels.
|
void |
setDefaults()
Set/reset all values to their defaults.
|
void |
setDigits(int digits)
Set the number of digits of precision that may be used in the numeric
labels.
|
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 |
setLogLabelSet(boolean logLabelSet)
Set whether the X label log labelling is set or unset (unset implies
that label properties should remain at their AST defaults).
|
void |
setXGap(double xGap)
Set the gap between X labels and border.
|
void |
setXLogLabel(boolean xLogLabel)
Set whether the X labels should use log-labelling.
|
void |
setXRotated(boolean xRotated)
Set whether X labels are drawn rotated if possible (only really
useful for interior axis).
|
void |
setXShown(boolean xShown)
Set whether the X labels should be shown.
|
void |
setXState(boolean isXSet)
Set whether the X labels are set or unset (unset implies that all label
properties should remain at their AST defaults).
|
void |
setYGap(double yGap)
Set the gap between Y labels and border.
|
void |
setYLogLabel(boolean yLogLabel)
Set whether the Y labels should use log-labelling.
|
void |
setYRotated(boolean yRotated)
Set whether Y labels are drawn rotated if possible (only really
useful for interior axis).
|
void |
setYShown(boolean yShown)
Set whether the Y labels should be shown.
|
void |
setYState(boolean isYSet)
Set whether the Y labels are 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 boolean logLabelSet
protected boolean xLogLabel
protected boolean yLogLabel
protected Font font
protected Color colour
protected double xGap
protected double yGap
protected int digits
protected boolean yRotated
protected boolean xRotated
public static final double GAP_MIN
public static final double GAP_MAX
public static final double GAP_STEP
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 setLogLabelSet(boolean logLabelSet)
logLabelSet
- The new value.public boolean getLogLabelSet()
public void setXLogLabel(boolean xLogLabel)
xLogLabel
- The new xLogLabel valuepublic boolean getXLogLabel()
public void setYLogLabel(boolean yLogLabel)
yLogLabel
- The new yLogLabel valuepublic boolean getYLogLabel()
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 setDigits(int digits)
digits
- The new digits valuepublic int getDigits()
public void setXRotated(boolean xRotated)
xRotated
- The new rotated valuepublic boolean getXRotated()
public void setYRotated(boolean yRotated)
yRotated
- The new rotated valuepublic boolean getYRotated()
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.