Documentation of 'org.jfree.chart.axis.SymbolAxis' Java class
SymbolAxis
org.jfree.chart.axis

Class SymbolAxis

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, org.jfree.util.PublicCloneable
    Direct Known Subclasses:
    CustomSymbolAxis


    public class SymbolAxis
    extends NumberAxis
    implements java.io.Serializable
    A standard linear value axis that replaces integer values with symbols.
    See Also:
    Serialized Form
    • Field Detail

      • DEFAULT_GRID_BAND_PAINT

        public static final java.awt.Paint DEFAULT_GRID_BAND_PAINT
        The default grid band paint.
      • DEFAULT_GRID_BAND_ALTERNATE_PAINT

        public static final java.awt.Paint DEFAULT_GRID_BAND_ALTERNATE_PAINT
        The default paint for alternate grid bands.
        Since:
        1.0.7
    • Constructor Detail

      • SymbolAxis

        public SymbolAxis(java.lang.String label,
                          java.lang.String[] sv)
        Constructs a symbol axis, using default attribute values where necessary.
        Parameters:
        label - the axis label (null permitted).
        sv - the list of symbols to display instead of the numeric values.
    • Method Detail

      • getSymbols

        public java.lang.String[] getSymbols()
        Returns an array of the symbols for the axis.
        Returns:
        The symbols.
      • isGridBandsVisible

        public boolean isGridBandsVisible()
        Returns true if the grid bands are showing, and false otherwise.
        Returns:
        true if the grid bands are showing, and false otherwise.
        See Also:
        setGridBandsVisible(boolean)
      • setGridBandsVisible

        public void setGridBandsVisible(boolean flag)
        Sets the visibility of the grid bands and notifies registered listeners that the axis has been modified.
        Parameters:
        flag - the new setting.
        See Also:
        isGridBandsVisible()
      • setGridBandPaint

        public void setGridBandPaint(java.awt.Paint paint)
        Sets the grid band paint and sends an AxisChangeEvent to all registered listeners.
        Parameters:
        paint - the paint (null not permitted).
        See Also:
        getGridBandPaint()
      • draw

        public AxisState draw(java.awt.Graphics2D g2,
                              double cursor,
                              java.awt.geom.Rectangle2D plotArea,
                              java.awt.geom.Rectangle2D dataArea,
                              org.jfree.ui.RectangleEdge edge,
                              PlotRenderingInfo plotState)
        Draws the axis on a Java 2D graphics device (such as the screen or a printer).
        Overrides:
        draw in class NumberAxis
        Parameters:
        g2 - the graphics device (null not permitted).
        cursor - the cursor location.
        plotArea - the area within which the plot and axes should be drawn (null not permitted).
        dataArea - the area within which the data should be drawn (null not permitted).
        edge - the axis location (null not permitted).
        plotState - collects information about the plot (null permitted).
        Returns:
        The axis state (never null).
      • refreshTicks

        public java.util.List refreshTicks(java.awt.Graphics2D g2,
                                           AxisState state,
                                           java.awt.geom.Rectangle2D dataArea,
                                           org.jfree.ui.RectangleEdge edge)
        Calculates the positions of the tick labels for the axis, storing the results in the tick label list (ready for drawing).
        Overrides:
        refreshTicks in class NumberAxis
        Parameters:
        g2 - the graphics device.
        state - the axis state.
        dataArea - the area in which the data should be drawn.
        edge - the location of the axis.
        Returns:
        A list of ticks.
      • valueToString

        public java.lang.String valueToString(double value)
        Converts a value to a string, using the list of symbols.
        Parameters:
        value - value to convert.
        Returns:
        The symbol.
      • equals

        public boolean equals(java.lang.Object obj)
        Tests this axis for equality with an arbitrary object.
        Overrides:
        equals in class NumberAxis
        Parameters:
        obj - the object (null permitted).
        Returns:
        A boolean.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.