Package com.inet.report.chart.axis
Class DiscreteNumberAxis
- java.lang.Object
-
- com.inet.report.chart.axis.BaseAxis
-
- com.inet.report.chart.axis.DiscreteNumberAxis
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
ContinuousNumberAxis
public class DiscreteNumberAxis extends BaseAxis
The axis which displays discrete number values.- Since:
- 8.0
- See Also:
- 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 Constructor Description DiscreteNumberAxis()
Creates a discrete number axis.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Integer
getNumberOfDivisions()
Returns the number of divisions on the axis.FormulaField
getNumberOfDivisionsFormula()
Get the numberOfDivisionsFormula of the DiscreteNumberAxis.
This formula is used to determine the Number of divisions where this axis will be labeled.NumberRange
getRange()
Returns the range controller object.java.util.List<java.lang.Object>
getReferencedObjects()
Get FormulaFields referenced by this Axis.
Can be from marker (if this is MarkerAxis) or from title.java.lang.Double
getStepWidth()
Returns the step width of axis units.FormulaField
getStepWidthFormula()
Get the stepWidthFormula of the DiscreteNumberAxis.
This formula is used to determine the step width when the axis must be labeled.
When null, the result ofgetStepWidth()
is used.protected java.lang.StringBuilder
getSubProperties(int depth)
Returns the serialized properties of subclasses.void
readProperties(org.w3c.dom.Element element, Chart2 chart)
Loads the XML properties of a chart axis.void
setNumberOfDivisions(java.lang.Integer numberOfDivisions)
Sets the number of divisions, allows only positive values ornull
to define the number of divisions automatically.void
setNumberOfDivisionsFormula(FormulaField numberOfDivisionsFormula)
Set the numberOfDivisionsFormula of the DiscreteNumberAxis.
This formula is used to determine the Number of divisions where this axis will be labeled.void
setRange(NumberRange range)
Sets the range controller object.void
setStepWidth(java.lang.Double stepWidth)
Sets the step width of axis units.void
setStepWidthFormula(FormulaField stepWidthFormula)
Set the stepWidthFormula of the DiscreteNumberAxis.
This formula is used to determine the step width when the axis must be labeled.
When null, the value set tosetStepWidth(Double)
is used.-
Methods inherited from class com.inet.report.chart.axis.BaseAxis
copyTo, getAxisLineColor, getAxisPosition, getGridlineColor, getTickLabelColor, getTickLabelFont, getTickLabelFormat, getTitle, isGridlinesVisible, isInverseOrder, saveProperties, saveSubProperties, setAxisLineColor, setAxisPosition, setGridlineColor, setGridlinesVisible, setInverseOrder, setTickLabelColor, setTickLabelFont, setTickLabelFormat, setTitle
-
-
-
-
Method Detail
-
getRange
public NumberRange getRange()
Returns the range controller object.- Returns:
- the range
- Since:
- 8.0
- See Also:
setRange(NumberRange)
-
setRange
public void setRange(NumberRange range)
Sets the range controller object.- Parameters:
range
- the rage (null
not permitted)- Throws:
java.lang.IllegalArgumentException
- if range isnull
.- Since:
- 8.0
- See Also:
getRange()
-
getStepWidth
public java.lang.Double getStepWidth()
Returns the step width of axis units.- Returns:
- the step width or
null
if this property was not set. - Since:
- 8.0
- See Also:
setStepWidth(Double)
-
setStepWidth
public void setStepWidth(java.lang.Double stepWidth)
Sets the step width of axis units. This function allows only positive values ornull
to define the step width automatically. This property is only for the number axis, for a date axis please useContinuousDateAxis.setDateStepWidthType(Integer)
.- Parameters:
stepWidth
- the step width (null
permitted)- Throws:
java.lang.IllegalArgumentException
- if stepWidth less than 0.- Since:
- 8.0
- See Also:
getStepWidth()
-
getNumberOfDivisions
public java.lang.Integer getNumberOfDivisions()
Returns the number of divisions on the axis. Returns only positive values or defaultnull
by automatically partitioning.- Returns:
- the number of divisions or
null
- Since:
- 8.0
- See Also:
setNumberOfDivisions(Integer)
-
setNumberOfDivisions
public void setNumberOfDivisions(java.lang.Integer numberOfDivisions)
Sets the number of divisions, allows only positive values ornull
to define the number of divisions automatically. This property is only for the number axis, for a date axis please useContinuousDateAxis.setNumberOfDateSteps(Integer)
.- Parameters:
numberOfDivisions
- the number of divisions (null
permitted)- Throws:
java.lang.IllegalArgumentException
- if numberOfDivisions less or equal 0.- Since:
- 8.0
- See Also:
getNumberOfDivisions()
-
getSubProperties
protected java.lang.StringBuilder getSubProperties(int depth)
Returns the serialized properties of subclasses.- Overrides:
getSubProperties
in classBaseAxis
- Parameters:
depth
- the depth of XML indent- Returns:
- the properties.
-
readProperties
public void readProperties(org.w3c.dom.Element element, Chart2 chart)
Loads the XML properties of a chart axis.- Overrides:
readProperties
in classBaseAxis
- Parameters:
element
- DOM element to read the properties fromchart
- the chart this axis belongs to- See Also:
BaseAxis.saveProperties(PrintWriter, int, String)
-
getNumberOfDivisionsFormula
public FormulaField getNumberOfDivisionsFormula()
Get the numberOfDivisionsFormula of the DiscreteNumberAxis.
This formula is used to determine the Number of divisions where this axis will be labeled. When this formula is null, the result ofgetNumberOfDivisions()
is used.- Returns:
- the numberOfDivisionsFormula of the DiscreteNumberAxis, can be null when no formula was set.
- Since:
- i-net Clear Reports 13.0
- See Also:
setNumberOfDivisionsFormula(FormulaField)
-
setNumberOfDivisionsFormula
public void setNumberOfDivisionsFormula(FormulaField numberOfDivisionsFormula)
Set the numberOfDivisionsFormula of the DiscreteNumberAxis.
This formula is used to determine the Number of divisions where this axis will be labeled. When this formula is null, the value set tosetNumberOfDivisions(Integer)
is used.- Parameters:
numberOfDivisionsFormula
- the numberOfDivisionsFormula of the DiscreteNumberAxis, null when no formula is used.- Since:
- i-net Clear Reports 13.0
- See Also:
getNumberOfDivisionsFormula()
-
getStepWidthFormula
public FormulaField getStepWidthFormula()
Get the stepWidthFormula of the DiscreteNumberAxis.
This formula is used to determine the step width when the axis must be labeled.
When null, the result ofgetStepWidth()
is used.- Returns:
- the stepWidthFormula of the DiscreteNumberAxis
- Since:
- i-net Clear Reports 13.0
- See Also:
setStepWidthFormula(FormulaField)
,getStepWidth()
-
setStepWidthFormula
public void setStepWidthFormula(FormulaField stepWidthFormula)
Set the stepWidthFormula of the DiscreteNumberAxis.
This formula is used to determine the step width when the axis must be labeled.
When null, the value set tosetStepWidth(Double)
is used.- Parameters:
stepWidthFormula
- the stepWidthFormula of the DiscreteNumberAxis, null when no formula is to be usd.- Since:
- i-net Clear Reports 13.0
- See Also:
getStepWidthFormula()
,setStepWidth(Double)
-
getReferencedObjects
public java.util.List<java.lang.Object> getReferencedObjects()
Get FormulaFields referenced by this Axis.
Can be from marker (if this is MarkerAxis) or from title.- Overrides:
getReferencedObjects
in classBaseAxis
- Returns:
- a list with referenced fields, can be empty.
-
-