Package org.jCharts.axisChart.axis
Class Axis
java.lang.Object
org.jCharts.axisChart.axis.Axis
- All Implemented Interfaces:
Serializable
,HTMLTestable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AxisChart
private TextTagGroup
private float
private float
private int
private double
private float
private float
private ScaleCalculator
private float
private float
private float
private float
private float
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
computeAxisTitleDimensions
(String title, ChartFont axisTitleFont) void
computeOneUnitPixelSize
(float scalePixelLength, double increment) Computes the relationship of data point values to pixel values so know where along the axis a value is.void
Computes the number of pixels between each value on the axis.void
Computes the number of pixels between each value on the axis.final AxisChart
Returns reference to AxisChart Object.final float
final float
int
double
Returns the number of pixels one value unit occupies.final float
final float
final float
float
final float
final float
float
Returns the screen coordinate of the zero line.void
setAxisLabelsGroup
(TextTagGroup axisLabelsGroup) final void
setMinimumHeightNeeded
(float minimumHeightNeeded) final void
setMinimumWidthNeeded
(float minimumWidthNeeded) void
setOneUnitPixelSize
(double oneUnitPixelSize) final void
setOrigin
(float origin) final void
setPixelLength
(float pixelLength) void
setScaleCalculator
(ScaleCalculator scaleCalculator) final void
setScalePixelWidth
(float scalePixelWidth) void
setTickStart
(float tickStart) void
setZeroLineCoordinate
(float value) Sets the screen coordinate of the zero line.void
toHTML
(HTMLGenerator htmlGenerator) Enables the testing routines to display the contents of this Object.
-
Field Details
-
axisChart
-
scalePixelWidth
private float scalePixelWidth -
pixelLength
private float pixelLength -
origin
private float origin -
titleHeight
private float titleHeight -
titleWidth
private float titleWidth -
minimumWidthNeeded
private float minimumWidthNeeded -
minimumHeightNeeded
private float minimumHeightNeeded -
axisLabelsGroup
-
numberOfScaleItems
private int numberOfScaleItems -
tickStart
private float tickStart -
oneUnitPixelSize
private double oneUnitPixelSize -
zeroLineCoordinate
private float zeroLineCoordinate -
scaleCalculator
-
-
Constructor Details
-
Axis
Constructor- Parameters:
axisChart
-numberOfScaleItems
-
-
-
Method Details
-
getAxisChart
Returns reference to AxisChart Object.- Returns:
- axisChart
-
getNumberOfScaleItems
public int getNumberOfScaleItems() -
getAxisLabelsGroup
-
setAxisLabelsGroup
-
getTitleWidth
public final float getTitleWidth() -
getTitleHeight
public final float getTitleHeight() -
getPixelLength
public final float getPixelLength() -
setPixelLength
public final void setPixelLength(float pixelLength) -
getOrigin
public final float getOrigin() -
setOrigin
public final void setOrigin(float origin) -
getMinimumWidthNeeded
public final float getMinimumWidthNeeded() -
setMinimumWidthNeeded
public final void setMinimumWidthNeeded(float minimumWidthNeeded) -
getMinimumHeightNeeded
public final float getMinimumHeightNeeded() -
setMinimumHeightNeeded
public final void setMinimumHeightNeeded(float minimumHeightNeeded) -
getScalePixelWidth
public final float getScalePixelWidth() -
setScalePixelWidth
public final void setScalePixelWidth(float scalePixelWidth) -
getTickStart
public float getTickStart() -
setTickStart
public void setTickStart(float tickStart) -
getScaleCalculator
-
setScaleCalculator
-
computeAxisTitleDimensions
- Parameters:
title
-axisTitleFont
-
-
toHTML
Enables the testing routines to display the contents of this Object. Can only see 'private' fields from this class.- Specified by:
toHTML
in interfaceHTMLTestable
- Parameters:
htmlGenerator
-
-
computeScalePixelWidth
public void computeScalePixelWidth()Computes the number of pixels between each value on the axis. -
computeScalePixelWidthDataAxis
public void computeScalePixelWidthDataAxis()Computes the number of pixels between each value on the axis. -
setOneUnitPixelSize
public void setOneUnitPixelSize(double oneUnitPixelSize) -
getOneUnitPixelSize
public double getOneUnitPixelSize()Returns the number of pixels one value unit occupies.- Returns:
- double the number of pixels one value unit occupies.
-
getZeroLineCoordinate
public float getZeroLineCoordinate()Returns the screen coordinate of the zero line. This will not always be the same as the origin as not all charts start at zero. This is needed not only by the Axis, but some of the Chart implementations as well.- Returns:
- float the screen pixel location of the zero line.
-
setZeroLineCoordinate
public void setZeroLineCoordinate(float value) Sets the screen coordinate of the zero line. This will not always be the same as the origin as not all charts start at zero.- Parameters:
value
- the screen pixel location of the zero line.
-
computeOneUnitPixelSize
public void computeOneUnitPixelSize(float scalePixelLength, double increment) Computes the relationship of data point values to pixel values so know where along the axis a value is.- Parameters:
scalePixelLength
-increment
-
-