Package com.inet.report.chart.axis
Class ContinuousNumberAxis
java.lang.Object
com.inet.report.chart.axis.BaseAxis
com.inet.report.chart.axis.DiscreteNumberAxis
com.inet.report.chart.axis.ContinuousNumberAxis
- All Implemented Interfaces:
com.inet.report.chart.axis.ContinuousAxis,com.inet.report.chart.axis.MarkerAxis,Serializable
public class ContinuousNumberAxis
extends DiscreteNumberAxis
implements com.inet.report.chart.axis.ContinuousAxis, com.inet.report.chart.axis.MarkerAxis
The axis which displays the continuous number line with values.
Used as data and summary axis or as continuous category axis.
- Since:
- 8.0
- See Also:
-
BaseAxisContinuousAxis- Serialized Form
-
Field Summary
Fields inherited from class com.inet.report.chart.axis.BaseAxis
DEFAULT_AXIS_LINE_COLOR, DEFAULT_GRIDLINE_COLOR, DEFAULT_TICK_LABEL_COLOR, DEFAULT_TICK_LABEL_FONT, DEFAULT_TITLE, TOKEN_CATEGORY_AXIS, TOKEN_DATA_AXIS, TOKEN_SERIES_AXIS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMarker(AbstractMarker marker) Adds a new marker to the marker list of this axis.intGets the label angle in degree with a range from 0 to 359.getMarker(int index) Returns the marker from position.intReturns the total amount of markers on this axis.protected StringBuildergetSubProperties(int depth) Returns the serialized properties of subclasses.booleanReturns whether or not the axis range is automatically adjusted to fit the data values.booleanReturns whether or not this axis is to use a logarithmic scale.booleanReturns whether the axis labels are to be rotated 90 degrees.voidreadProperties(Element element, Chart2 chart) Loads the XML properties of a chart axis.voidremoveMarker(int index) Removes the marker at the position given.protected voidsaveSubProperties(PrintWriter out, int depth) Writes the intern axis properties to output.voidsetAutomaticScale(boolean isAutomaticScale) Sets whether or not the axis range is automatically adjusted to fit the data, and notifies registered listeners that the axis has been modified.voidsetLabelAngle(int labelAngle) Sets the label angle for rotating the axis labels in degrees.voidsetLogarithmicScale(boolean isLogarithmicScale) Sets whether or not this axis is to use a logarithmic scale.voidsetRotateLabels(boolean rotate) Sets whether the axis labels are to be rotated 90 degrees.Methods inherited from class com.inet.report.chart.axis.DiscreteNumberAxis
getNumberOfDivisions, getNumberOfDivisionsFormula, getRange, getReferencedObjects, getStepWidth, getStepWidthFormula, setNumberOfDivisions, setNumberOfDivisionsFormula, setRange, setStepWidth, setStepWidthFormulaMethods inherited from class com.inet.report.chart.axis.BaseAxis
copyTo, getAxisLineColor, getAxisPosition, getGridlineColor, getTickLabelColor, getTickLabelFont, getTickLabelFormat, getTitle, isGridlinesVisible, isInverseOrder, saveProperties, setAxisLineColor, setAxisPosition, setGridlineColor, setGridlinesVisible, setInverseOrder, setTickLabelColor, setTickLabelFont, setTickLabelFormat, setTitle
-
Constructor Details
-
ContinuousNumberAxis
public ContinuousNumberAxis()Creates a continuous number axis. Initializes the parameters with default.- Since:
- 8.0
-
-
Method Details
-
isLogarithmicScale
public boolean isLogarithmicScale()Returns whether or not this axis is to use a logarithmic scale.- Returns:
- whether or not this axis is to use a logarithmic scale.
- Since:
- 8.0
- See Also:
-
setLogarithmicScale
public void setLogarithmicScale(boolean isLogarithmicScale) Sets whether or not this axis is to use a logarithmic scale.- Parameters:
isLogarithmicScale- whether or not this axis is to use a logarithmic scale- Since:
- 8.0
- See Also:
-
isAutomaticScale
public boolean isAutomaticScale()Returns whether or not the axis range is automatically adjusted to fit the data values.- Returns:
- whether or not the axis range is automatically adjusted to fit the data values
- Since:
- 8.0
- See Also:
-
setAutomaticScale
public void setAutomaticScale(boolean isAutomaticScale) Sets whether or not the axis range is automatically adjusted to fit the data, and notifies registered listeners that the axis has been modified.- Parameters:
isAutomaticScale- whether or not the axis range is automatically adjusted to fit the data- Since:
- 8.0
- See Also:
-
isRotateLabels
public boolean isRotateLabels()Returns whether the axis labels are to be rotated 90 degrees.- Returns:
- whether the axis labels are to be rotated 90 degrees
- Since:
- 8.0
- See Also:
-
setRotateLabels
public void setRotateLabels(boolean rotate) Sets whether the axis labels are to be rotated 90 degrees.- Parameters:
rotate- whether the axis labels are to be rotated 90 degrees- Since:
- 8.0
- See Also:
-
getLabelAngle
public int getLabelAngle()Gets the label angle in degree with a range from 0 to 359.- Returns:
- the label angle in degrees
- Since:
- 23.4
-
setLabelAngle
public void setLabelAngle(int labelAngle) Sets the label angle for rotating the axis labels in degrees. It should be between 0 and 359.- Parameters:
labelAngle- the new label angle- Since:
- 23.4
-
addMarker
Adds a new marker to the marker list of this axis.- Specified by:
addMarkerin interfacecom.inet.report.chart.axis.MarkerAxis- Parameters:
marker- (nullnot permitted)- Throws:
IllegalArgumentException- if marker isnull.- Since:
- 8.0
- See Also:
-
getMarker
Returns the marker from position.- Specified by:
getMarkerin interfacecom.inet.report.chart.axis.MarkerAxis- Parameters:
index- the position of marker in the marker list- Returns:
- the marker.
- Throws:
IndexOutOfBoundsException- if the index out of bounds.- Since:
- 8.0
- See Also:
-
removeMarker
public void removeMarker(int index) Removes the marker at the position given.- Specified by:
removeMarkerin interfacecom.inet.report.chart.axis.MarkerAxis- Parameters:
index- the position at which to remove a marker from the list of markers- Throws:
IndexOutOfBoundsException- if the index out of bounds.- Since:
- 8.0
- See Also:
-
getMarkersCount
public int getMarkersCount()Returns the total amount of markers on this axis.- Specified by:
getMarkersCountin interfacecom.inet.report.chart.axis.MarkerAxis- Returns:
- the number of markers on this axis.
- Since:
- 8.0
- See Also:
-
getSubProperties
Returns the serialized properties of subclasses.- Overrides:
getSubPropertiesin classDiscreteNumberAxis- Parameters:
depth- the depth of XML indent- Returns:
- the properties.
-
saveSubProperties
Writes the intern axis properties to output. Overwrites this to save intern properties direct toPrintWriterwithout building aStringBuilder.- Overrides:
saveSubPropertiesin classBaseAxis- Parameters:
out- the outputdepth- the depth of XML indent
-
readProperties
Loads the XML properties of a chart axis.- Overrides:
readPropertiesin classDiscreteNumberAxis- Parameters:
element- DOM element to read the properties fromchart- the chart this axis belongs to- See Also:
-