public class BaseAxis
extends java.lang.Object
implements java.io.Serializable
BarStyle
belongs to the plot BarPlot
.
This uses a GroupAxis
as category axis (see BarPlot.setCategoryAxis(GroupAxis)
)
and a ContinuousNumberAxis
as data axis (see BarPlot.setDataAxis(ContinuousNumberAxis)
).ContinuousAxis
,
ContinuousDateAxis
,
ContinuousNumberAxis
,
DiscreteNumberAxis
,
GroupAxis
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
DEFAULT_AXIS_LINE_COLOR
The default axis color (the ABGR value representation).
|
static int |
DEFAULT_GRIDLINE_COLOR
The default grid lines color (the ABGR value representation).
|
static int |
DEFAULT_TICK_LABEL_COLOR
The default axis label color (the ABGR value representation).
|
static java.awt.Font |
DEFAULT_TICK_LABEL_FONT
The default axis tick labels font.
|
static ChartTitle |
DEFAULT_TITLE
Default title of this axis.
|
static java.lang.String |
TOKEN_CATEGORY_AXIS
XML token for a category axis element.
|
static java.lang.String |
TOKEN_DATA_AXIS
XML token for a data axis element.
|
static java.lang.String |
TOKEN_SERIES_AXIS
XML token for a series axis element.
|
Constructor and Description |
---|
BaseAxis()
Creates a instance of BaseAxis, sets the default properties.
|
Modifier and Type | Method and Description |
---|---|
void |
copyTo(BaseAxis that)
Copies the properties of this axis to the new axis.
|
int |
getAxisLineColor()
Returns the ABGR value representing the axis line color.
|
AxisPosition |
getAxisPosition()
Returns the relative position of this axis on the chart.
|
int |
getGridlineColor()
Returns the ABGR value representing the grid lines color.
|
java.util.List<java.lang.Object> |
getReferencedObjects()
Get FormulaFields referenced by this Axis.
|
protected java.lang.StringBuilder |
getSubProperties(int depth)
Returns the serialized properties of subclasses.
|
int |
getTickLabelColor()
Returns the color as ABGR value of tick labels on this axis.
|
java.awt.Font |
getTickLabelFont()
Returns the font of tick labels on this axis.
|
ChartFormat |
getTickLabelFormat()
Returns a tick label format of this axis.
|
ChartTitle |
getTitle()
Gets the title of this axis
|
boolean |
isGridlinesVisible()
Returns whether or not the axis grid lines are visible.
|
boolean |
isInverseOrder()
Returns the orientation of the values on the axis.
|
void |
readProperties(org.w3c.dom.Element element,
Chart2 chart)
Loads the XML properties of a chart axis.
|
void |
saveProperties(java.io.PrintWriter out,
int depth,
java.lang.String axisType)
Writes the axis properties to the output stream as XML
|
protected void |
saveSubProperties(java.io.PrintWriter out,
int depth)
Writes the intern axis properties to output.
|
void |
setAxisLineColor(int axisLineColor)
Sets the ABGR components of the axis line color.
|
void |
setAxisPosition(AxisPosition position)
Sets the position of this axis on the chart or disables the axis from being shown, if
AxisPosition.NONE
is passed. |
void |
setGridlineColor(int gridlineColor)
Sets the ABGR components of the grid lines color.
|
void |
setGridlinesVisible(boolean gridlinesVisible)
Sets whether or not the axis grid lines are visible.
|
void |
setInverseOrder(boolean inverseOrder)
Sets the orientation of the values on the axis -true if inverse, false otherwise
|
void |
setTickLabelColor(int tickLabelColor)
Sets the color as ABGR value of tick labels on this axis.
|
void |
setTickLabelFont(java.awt.Font tickLabelFont)
Sets the font of tick labels on this axis.
|
void |
setTickLabelFormat(ChartFormat tickLabelFormat)
Sets the tick label format.
|
void |
setTitle(ChartTitle title)
Sets the title of this axis.
|
public static final int DEFAULT_TICK_LABEL_COLOR
public static final java.awt.Font DEFAULT_TICK_LABEL_FONT
public static final int DEFAULT_GRIDLINE_COLOR
public static final int DEFAULT_AXIS_LINE_COLOR
public static final ChartTitle DEFAULT_TITLE
public static final java.lang.String TOKEN_CATEGORY_AXIS
public static final java.lang.String TOKEN_SERIES_AXIS
public static final java.lang.String TOKEN_DATA_AXIS
public BaseAxis()
AxisPosition.NONE
.public boolean isGridlinesVisible()
setGridlinesVisible(boolean)
public void setGridlinesVisible(boolean gridlinesVisible)
gridlinesVisible
- whether or not the axis grid lines are visibleisGridlinesVisible()
public int getGridlineColor()
setGridlineColor(int)
,
ColorUtils.toJavaColor(int)
public void setGridlineColor(int gridlineColor)
gridlineColor
- the colorjava.lang.IllegalArgumentException
- by RDC.COLOR_NO_COLOR
.getGridlineColor()
,
ColorUtils.toCcColor(Color)
,
DEFAULT_GRIDLINE_COLOR
public int getAxisLineColor()
setAxisLineColor(int)
,
ColorUtils.toJavaColor(int)
public boolean isInverseOrder()
setInverseOrder(boolean)
public void setInverseOrder(boolean inverseOrder)
inverseOrder
- the orientation of the values on the axisisInverseOrder()
public void setAxisLineColor(int axisLineColor)
axisLineColor
- the colorjava.lang.IllegalArgumentException
- by RDC.COLOR_NO_COLOR
.getAxisLineColor()
,
ColorUtils.toCcColor(Color)
,
DEFAULT_TICK_LABEL_COLOR
public ChartTitle getTitle()
setTitle(ChartTitle)
public void setTitle(ChartTitle title)
AxisPosition.NONE
)title
- the axis title (null
not permitted)getTitle()
,
setAxisPosition(AxisPosition)
,
AxisPosition.NONE
public java.awt.Font getTickLabelFont()
setTickLabelFont(Font)
public void setTickLabelFont(java.awt.Font tickLabelFont)
tickLabelFont
- the axis tick labels font (null
not permitted)getTickLabelFont()
public int getTickLabelColor()
setTickLabelColor(int)
,
ColorUtils.toJavaColor(int)
public void setTickLabelColor(int tickLabelColor)
tickLabelColor
- ABGR components of the axis labels colorjava.lang.IllegalArgumentException
- by RDC.COLOR_NO_COLOR
.getTickLabelColor()
,
ColorUtils.toCcColor(Color)
public ChartFormat getTickLabelFormat()
null
, that means the chart formats the axis values automatically.null
to auto formatsetTickLabelFormat(ChartFormat)
public void setTickLabelFormat(ChartFormat tickLabelFormat)
null
, that means the chart formats the axis values automatically.
Note: for charts with number values on the axis, only formats extended from NumberFormat
are allowed,
and date charts, only formats extended from DateFormat
are allowed.tickLabelFormat
- the format (null
permitted)java.lang.IllegalArgumentException
- by date format for number valuesgetTickLabelFormat()
public AxisPosition getAxisPosition()
AxisPosition.ON_MIN
will be placed on the left side of chart.setAxisPosition(AxisPosition)
,
AxisPosition.ON_MIN
,
AxisPosition.ON_MAX
,
AxisPosition.NONE
public void setAxisPosition(AxisPosition position)
AxisPosition.NONE
is passed.
A y-axis with position AxisPosition.ON_MIN
will be placed on the left side of chart.position
- the axis position (null
not permitted)java.lang.IllegalArgumentException
- if position is null
.getAxisPosition()
,
AxisPosition.ON_MIN
,
AxisPosition.ON_MAX
,
AxisPosition.NONE
public void copyTo(BaseAxis that)
that
- the new axis to copy the properties topublic void saveProperties(java.io.PrintWriter out, int depth, java.lang.String axisType)
out
- the output stream to write todepth
- the depth of whitespace indent to prefix each line withaxisType
- type of this axis: "category", "series" or "data"protected java.lang.StringBuilder getSubProperties(int depth)
depth
- the depth of XML indentprotected void saveSubProperties(java.io.PrintWriter out, int depth)
PrintWriter
without building a StringBuilder
.out
- the outputdepth
- the depth of XML indentpublic void readProperties(org.w3c.dom.Element element, Chart2 chart)
element
- DOM element to read the properties fromchart
- the chart this axis belongs tosaveProperties(PrintWriter, int, String)
public java.util.List<java.lang.Object> getReferencedObjects()
Copyright © 1999-2020 by i-net software GmbH