Class Axis

    • Field Detail

      • 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
      • numberOfScaleItems

        private int numberOfScaleItems
      • tickStart

        private float tickStart
      • oneUnitPixelSize

        private double oneUnitPixelSize
      • zeroLineCoordinate

        private float zeroLineCoordinate
    • Constructor Detail

      • Axis

        public Axis​(AxisChart axisChart,
                    int numberOfScaleItems)
        Constructor
        Parameters:
        axisChart -
        numberOfScaleItems -
    • Method Detail

      • getAxisChart

        public final AxisChart getAxisChart()
        Returns reference to AxisChart Object.
        Returns:
        axisChart
      • getNumberOfScaleItems

        public int getNumberOfScaleItems()
      • getAxisLabelsGroup

        public TextTagGroup getAxisLabelsGroup()
      • setAxisLabelsGroup

        public void setAxisLabelsGroup​(TextTagGroup axisLabelsGroup)
      • 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)
      • setScaleCalculator

        public void setScaleCalculator​(ScaleCalculator scaleCalculator)
      • computeAxisTitleDimensions

        public final void computeAxisTitleDimensions​(java.lang.String title,
                                                     ChartFont axisTitleFont)
        Parameters:
        title -
        axisTitleFont -
      • toHTML

        public void toHTML​(HTMLGenerator htmlGenerator)
        Enables the testing routines to display the contents of this Object. Can only see 'private' fields from this class.
        Specified by:
        toHTML in interface HTMLTestable
        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 -