类 Axis

  • 所有已实现的接口:
    java.lang.Cloneable
    直接已知子类:
    LogAxis, LonLatAxis, TimeAxis

    public class Axis
    extends java.lang.Object
    implements java.lang.Cloneable
    作者:
    yaqiang
    • 构造器详细资料

      • Axis

        public Axis()
        Constructor
      • Axis

        public Axis​(ChartText label)
        Constructor
        参数:
        label - Axis label
      • Axis

        public Axis​(java.lang.String label)
        Constructor
        参数:
        label - Axis label
      • Axis

        public Axis​(java.lang.String label,
                    boolean xAxis)
        Constructor
        参数:
        label - Axis label
        xAxis - If is x axis
      • Axis

        public Axis​(ChartText label,
                    boolean xAxis)
        Constructor
        参数:
        label - Axis label
        xAxis - If is x axis
      • Axis

        public Axis​(java.lang.String label,
                    boolean xAxis,
                    Location loc)
        Constructor
        参数:
        label - Axis label
        xAxis - If is x axis
        loc - Location
      • Axis

        public Axis​(java.lang.String label,
                    boolean xAxis,
                    Location loc,
                    boolean drawTickLabel)
        Constructor
        参数:
        label - Axis label
        xAxis - If is x axis
        loc - Location
        drawTickLabel - If draw tick label
      • Axis

        public Axis​(Axis axis)
        Constructor
        参数:
        axis - Axis
    • 方法详细资料

      • isXAxis

        public boolean isXAxis()
        Get if is x axis
        返回:
        Boolean
      • setXAxis

        public void setXAxis​(boolean value)
        Set if is x axis
        参数:
        value - Boolean
      • getLocation

        public Location getLocation()
        Get location
        返回:
        Location
      • setLocation

        public void setLocation​(Location value)
        Set location
        参数:
        value - Location
      • getLabel

        public ChartText getLabel()
        Get axis label
        返回:
        Axis label
      • setLabel

        public void setLabel​(ChartText value)
        Set axis label
        参数:
        value - Axis label
      • setLabel

        public void setLabel​(java.lang.String value)
        Set axis label
        参数:
        value - Axis label
      • isVisible

        public boolean isVisible()
        If is visible
        返回:
        Boolean
      • setVisible

        public void setVisible​(boolean value)
        Set if is visible
        参数:
        value - Boolean
      • isDrawTickLine

        public boolean isDrawTickLine()
        Get if draw tick lines
        返回:
        Boolean
      • setDrawTickLine

        public void setDrawTickLine​(boolean value)
        Set if draw tick lines
        参数:
        value - Boolean
      • isDrawTickLabel

        public boolean isDrawTickLabel()
        Get is draw tick label
        返回:
        Boolean
      • setDrawTickLabel

        public void setDrawTickLabel​(boolean value)
        Set if draw tick label
        参数:
        value - Boolean
      • isDrawLabel

        public boolean isDrawLabel()
        Get if draw label
        返回:
        Boolean
      • setDrawLabel

        public void setDrawLabel​(boolean value)
        Set if draw label
        参数:
        value - Boolean
      • getLineColor

        public java.awt.Color getLineColor()
        Get line color
        返回:
        Line color
      • setLineColor

        public void setLineColor​(java.awt.Color value)
        Set line color
        参数:
        value - Line color
      • getLineWidth

        public float getLineWidth()
        Get line width
        返回:
        Line width
      • setLineWidth

        public void setLineWidth​(float value)
        Set line width
        参数:
        value - Line width
      • setLineStyle

        public void setLineStyle​(LineStyles value)
      • getLineStroke

        public java.awt.Stroke getLineStroke()
        Get line stroke
        返回:
        Line stroke
      • getTickColor

        public java.awt.Color getTickColor()
        Get tick color
        返回:
        Tick color
      • setTickColor

        public void setTickColor​(java.awt.Color value)
        Set tick color
        参数:
        value - Tick color
      • getTickStroke

        public java.awt.Stroke getTickStroke()
        Get tick stroke
        返回:
        Tick stroke
      • setTickStroke

        public void setTickStroke​(java.awt.Stroke value)
        Set tick stroke
        参数:
        value - Tick stroke
      • getTickLength

        public int getTickLength()
        Get tick length
        返回:
        Tick length
      • setTickLength

        public void setTickLength​(int value)
        Set tick length
        参数:
        value - Tick length
      • isInsideTick

        public boolean isInsideTick()
        Get if is inside tick
        返回:
        Boolean
      • setInsideTick

        public void setInsideTick​(boolean value)
        Set if is inside tick
        参数:
        value - Boolean
      • getLabelFont

        public java.awt.Font getLabelFont()
        Get label font
        返回:
        Label font
      • setLabelFont

        public void setLabelFont​(java.awt.Font value)
        Set lable font
        参数:
        value - Lable font
      • getLabelColor

        public java.awt.Color getLabelColor()
        Get label color
        返回:
        Label color
      • setLabelColor

        public void setLabelColor​(java.awt.Color value)
        Set label color
        参数:
        value - Label color
      • getTickLabelFont

        public java.awt.Font getTickLabelFont()
        Get tick label font
        返回:
        Tick label font
      • setTickLabelFont

        public void setTickLabelFont​(java.awt.Font value)
        Set tick lable font
        参数:
        value - Tick lable font
      • getTickLabelColor

        public java.awt.Color getTickLabelColor()
        Get tick label color
        返回:
        Tick label color
      • setTickLabelColor

        public void setTickLabelColor​(java.awt.Color value)
        Set tick label color
        参数:
        value - Tick label color
      • getTickLabelAngle

        public float getTickLabelAngle()
        Get tick label angle
        返回:
        Tick label angle
      • setTickLabelAngle

        public void setTickLabelAngle​(float value)
        Set tick label angle
        参数:
        value - Angle
      • getTickLabelGap

        public int getTickLabelGap()
        Get tick label gap
        返回:
        Tick label gap
      • setTickLabelGap

        public void setTickLabelGap​(int value)
        Set tick label gap
        参数:
        value - Tick label gap
      • getTickStartValue

        public double getTickStartValue()
        Get tick start value
        返回:
        Tick start value
      • setTickStartValue

        public void setTickStartValue​(double value)
        Set tick start value
        参数:
        value - Tick start value
      • getTickDeltaValue

        public double getTickDeltaValue()
        Get tick delta value
        返回:
        Tick delta value
      • setTickDeltaValue

        public void setTickDeltaValue​(double value)
        Set tick delta value
        参数:
        value - Tick delta value
      • getMinValue

        public double getMinValue()
        Get minimum value
        返回:
        Minimum value
      • setMinValue

        public void setMinValue​(double value)
        Set minimum value
        参数:
        value - Minimum value
      • getMaxValue

        public double getMaxValue()
        Get maximum value
        返回:
        Maximum value
      • setMaxValue

        public void setMaxValue​(double value)
        Set maximum value
        参数:
        value - Maximum value
      • getTickValues

        public double[] getTickValues()
        Get tick values
        返回:
        Tick values
      • setTickValues

        public void setTickValues​(double[] value)
        Set tick values
        参数:
        value - Tick values
      • setTickValues

        public void setTickValues​(java.util.List<java.lang.Double> value)
        Set tick values
        参数:
        value - Tick value list
      • isInverse

        public boolean isInverse()
        Get if is inverse
        返回:
        Boolean
      • setInverse

        public void setInverse​(boolean value)
        Set if is inverse
        参数:
        value - Boolean
      • getShift

        public float getShift()
        Get shift
        返回:
        Shift
      • setShift

        public void setShift​(float value)
        Set shift
        参数:
        value - Shift
      • getTickLocations

        public java.util.List<java.lang.Double> getTickLocations()
        Tick locations
        返回:
        Tick locations
      • setTickLocations

        public void setTickLocations​(java.util.List<java.lang.Number> value)
        Set tick locations
        参数:
        value - Tick locations
      • setTickLocations

        public void setTickLocations​(double[] value)
        Set tick locations
        参数:
        value - Tick locations
      • getTickLabels

        public java.util.List<ChartText> getTickLabels()
        Get tick labels
        返回:
        Tick labels
      • getTickLabelText

        public java.util.List<java.lang.String> getTickLabelText()
        Get tick label text
        返回:
        Tick label text
      • setTickLabelText

        public void setTickLabelText​(java.util.List<java.lang.String> value)
        Set tick label text
        参数:
        value - Tick label text
      • setTickLabels

        public void setTickLabels​(java.util.List<ChartText> value)
        Set tick labels.
        参数:
        value - Tick labels
      • setTickLabels_Number

        public void setTickLabels_Number​(java.util.List<java.lang.Number> value)
        Set tick labels
        参数:
        value - Tick labels
      • isAutoTick

        public boolean isAutoTick()
        Get if is auto tick labels
        返回:
        Boolean
      • setAutoTick

        public void setAutoTick​(boolean value)
        Set if auto tick labels
        参数:
        value - Boolean
      • isMinorTickVisible

        public boolean isMinorTickVisible()
        Get if minor tick visible or not
        返回:
        Boolean
      • setMinorTickVisible

        public void setMinorTickVisible​(boolean value)
        Set if minor tick visible or not
        参数:
        value - Boolean
      • getMinorTickNum

        public int getMinorTickNum()
        Get minor tick number
        返回:
        Minor tick number
      • setMinorTickNum

        public void setMinorTickNum​(int value)
        Set minor tick number
        参数:
        value - Minor tick number
      • getTickSpace

        public int getTickSpace()
        Get tick space
        返回:
        Tick space
      • setTickSpace

        public void setTickSpace​(int value)
        Set tick space
        参数:
        value - Tick space
      • setMinMaxValue

        public void setMinMaxValue​(double minValue,
                                   double maxValue)
        Set minimum and maximum values
        参数:
        minValue - Start value
        maxValue - End value
      • updateTickValues

        public void updateTickValues()
        Update tick values
      • updateTickLabels

        public void updateTickLabels()
        Get tick labels
      • getMaxLabelLength

        public int getMaxLabelLength​(java.awt.Graphics2D g)
        Get maximum label string length
        参数:
        g - Graphics2D
        返回:
        Maximum lable string length
      • getMaxLenLable

        public java.lang.String getMaxLenLable()
        Get label string with maximum length
        返回:
        Maximum length lable string
      • getMaxLenText

        public ChartText getMaxLenText()
        Get tick label text with maximum length
        返回:
        Maximum length tick label text
      • getMaxTickLableLines

        public int getMaxTickLableLines()
        Get maximum tick label line number
        返回:
        Maximum tick label line number
      • updateLabelGap

        public void updateLabelGap​(java.awt.Graphics2D g,
                                   java.awt.geom.Rectangle2D rect)
        Update lable gap
        参数:
        g - Graphics2D
        rect - The rectangle
      • getLabelGap

        public int getLabelGap​(java.awt.Graphics2D g,
                               double len)
        Update lable gap
        参数:
        g - Graphics2D
        len - Length
        返回:
        Label gap
      • setColor_All

        public void setColor_All​(java.awt.Color c)
        Set color to all elements
        参数:
        c - Color
      • draw

        public void draw​(java.awt.Graphics2D g,
                         java.awt.geom.Rectangle2D area,
                         AbstractPlot2D plot)
        Draw axis
        参数:
        g - Graphics2D
        area - Area
        plot - XYPlot
      • getXAxisHeight

        public int getXAxisHeight​(java.awt.Graphics2D g)
        Get x axis height
        参数:
        g - Graphics2D
        返回:
        Axis height
      • getYAxisWidth

        public int getYAxisWidth​(java.awt.Graphics2D g)
        Get y axis width
        参数:
        g - Graphics2D
        返回:
        Axis width
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        覆盖:
        clone 在类中 java.lang.Object
        抛出:
        java.lang.CloneNotSupportedException