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 AxisChartprivate TextTagGroupprivate floatprivate floatprivate intprivate doubleprivate floatprivate floatprivate ScaleCalculatorprivate floatprivate floatprivate floatprivate floatprivate float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidcomputeAxisTitleDimensions(String title, ChartFont axisTitleFont) voidcomputeOneUnitPixelSize(float scalePixelLength, double increment) Computes the relationship of data point values to pixel values so know where along the axis a value is.voidComputes the number of pixels between each value on the axis.voidComputes the number of pixels between each value on the axis.final AxisChartReturns reference to AxisChart Object.final floatfinal floatintdoubleReturns the number of pixels one value unit occupies.final floatfinal floatfinal floatfloatfinal floatfinal floatfloatReturns the screen coordinate of the zero line.voidsetAxisLabelsGroup(TextTagGroup axisLabelsGroup) final voidsetMinimumHeightNeeded(float minimumHeightNeeded) final voidsetMinimumWidthNeeded(float minimumWidthNeeded) voidsetOneUnitPixelSize(double oneUnitPixelSize) final voidsetOrigin(float origin) final voidsetPixelLength(float pixelLength) voidsetScaleCalculator(ScaleCalculator scaleCalculator) final voidsetScalePixelWidth(float scalePixelWidth) voidsetTickStart(float tickStart) voidsetZeroLineCoordinate(float value) Sets the screen coordinate of the zero line.voidtoHTML(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:
toHTMLin 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-
-