Documentation of 'de.erichseifert.gral.plots.axes.AxisRenderer' Java class
AxisRenderer
de.erichseifert.gral.plots.axes

Interface AxisRenderer

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      java.util.Map<java.lang.Double,java.lang.String> getCustomTicks()
      Returns custom ticks with their respective position and label.
      java.lang.Number getIntersection()
      Returns the intersection point of the axis.
      Label getLabel()
      Returns the label of the axis.
      double getLabelDistance()
      Returns the distance from the axis to the label.
      double getMinorTickAlignment()
      Returns the alignment of minor ticks.
      java.awt.Paint getMinorTickColor()
      Returns the paint used to draw the shapes of minor ticks.
      double getMinorTickLength()
      Returns the length of minor tick strokes.
      int getMinorTicksCount()
      Returns the count of minor ticks.
      java.awt.Stroke getMinorTickStroke()
      Returns the stroke used to draw all minor ticks.
      PointND<java.lang.Double> getNormal(Axis axis, java.lang.Number value, boolean extrapolate, boolean forceLinear)
      Returns the normal vector at the position of the specified value.
      PointND<java.lang.Double> getPosition(Axis axis, java.lang.Number value, boolean extrapolate, boolean forceLinear)
      Returns the position of the specified value on the axis.
      Drawable getRendererComponent(Axis axis)
      Returns a component that displays the specified axis.
      java.awt.Shape getShape()
      Returns the shape of the axis.
      java.awt.Paint getShapeColor()
      Returns the paint used to draw the axis, its ticks and its labels.
      java.awt.Stroke getShapeStroke()
      Returns the stroke which defines the shape of the axis.
      double getTickAlignment()
      Returns the alignment of major ticks relative to the axis.
      java.awt.Paint getTickColor()
      Returns the paint used to draw the shapes of major ticks.
      java.awt.Font getTickFont()
      Returns the font used to display the text of major ticks.
      double getTickLabelDistance()
      Returns the distance of labels to their ticks.
      java.text.Format getTickLabelFormat()
      Returns the format which converts the tick values to labels.
      double getTickLabelRotation()
      Returns the rotation of the tick labels.
      double getTickLength()
      Returns the length of major tick strokes.
      java.util.List<Tick> getTicks(Axis axis)
      Returns a list of all tick element on the axis.
      java.lang.Number getTickSpacing()
      Returns the interval for major ticks.
      java.awt.Stroke getTickStroke()
      Returns the stroke which is used to draw all major ticks.
      boolean isMinorTicksVisible()
      Returns whether minor ticks are drawn.
      boolean isShapeDirectionSwapped()
      Returns whether the axis direction is changed.
      boolean isShapeNormalOrientationClockwise()
      Returns whether the normal vector of the shape is calculated using clockwise or counterclockwise rotation.
      boolean isShapeVisible()
      Returns whether the shape of the axis will be drawn.
      boolean isTickLabelsOutside()
      Returns whether the tick labels are drawn outside of the plot.
      boolean isTickLabelsVisible()
      Returns whether tick labels will be shown.
      boolean isTicksAutoSpaced()
      Returns whether the interval for major and minor ticks is chosen automatically.
      boolean isTicksVisible()
      Returns whether major ticks are drawn.
      void setCustomTicks(java.util.Map<java.lang.Double,java.lang.String> positionsAndLabels)
      Sets custom ticks with their respective position and label.
      void setIntersection(java.lang.Number intersection)
      Sets the intersection point of the axis.
      void setLabel(Label label)
      Sets the label of the axis.
      void setLabelDistance(double distance)
      Sets the distance from the axis to the label.
      void setMinorTickAlignment(double alignment)
      Sets the alignment of minor ticks.
      void setMinorTickColor(java.awt.Paint ticksMinorColor)
      Sets the paint used to draw the shapes of minor ticks.
      void setMinorTickLength(double length)
      Sets the length of minor tick strokes.
      void setMinorTicksCount(int count)
      Sets the count of minor ticks.
      void setMinorTickStroke(java.awt.Stroke stroke)
      Sets the stroke used to draw all minor ticks.
      void setMinorTicksVisible(boolean minorTicksVisible)
      Sets whether minor ticks are drawn.
      void setShape(java.awt.Shape shape)
      Sets the shape of the axis.
      void setShapeColor(java.awt.Paint color)
      Sets the paint used to draw the axis, its ticks and its labels.
      void setShapeDirectionSwapped(boolean directionSwapped)
      Sets whether the axis direction will be changed.
      void setShapeNormalOrientationClockwise(boolean clockwise)
      Sets whether the normal vector of the shape is calculated using clockwise or counterclockwise rotation.
      void setShapeStroke(java.awt.Stroke stroke)
      Sets the stroke which defines the shape of the axis.
      void setShapeVisible(boolean shapeVisible)
      Sets whether the shape of the axis will be drawn.
      void setTickAlignment(double alignment)
      Sets the alignment of major ticks relative to the axis.
      void setTickColor(java.awt.Paint color)
      Sets the paint used to draw the shapes of major ticks.
      void setTickFont(java.awt.Font font)
      Sets the font used to display the text of major ticks.
      void setTickLabelDistance(double distance)
      Sets the distance of labels to their ticks.
      void setTickLabelFormat(java.text.Format format)
      Sets the format which converts the tick values to labels.
      void setTickLabelRotation(double angle)
      Sets the rotation of the tick labels.
      void setTickLabelsOutside(boolean tickLabelsOutside)
      Sets whether the tick labels are drawn outside of the plot.
      void setTickLabelsVisible(boolean tickLabelsVisible)
      Sets whether tick labels will be shown.
      void setTickLength(double length)
      Sets the length of major tick strokes.
      void setTicksAutoSpaced(boolean autoSpaced)
      Sets whether the interval for major and minor ticks is chosen automatically.
      void setTickSpacing(java.lang.Number spacing)
      Sets the interval for major ticks.
      void setTickStroke(java.awt.Stroke stroke)
      Sets the stroke which is used to draw all major ticks.
      void setTicksVisible(boolean ticksVisible)
      Sets whether major ticks will be drawn.
      java.lang.Number viewToWorld(Axis axis, double value, boolean extrapolate)
      Converts a view (screen) coordinate value to a world (axis) coordinate value.
      double worldToView(Axis axis, java.lang.Number value, boolean extrapolate)
      Converts a world (axis) coordinate value to a view (screen) coordinate value.
    • Method Detail

      • getRendererComponent

        Drawable getRendererComponent(Axis axis)
        Returns a component that displays the specified axis.
        Parameters:
        axis - axis to be displayed
        Returns:
        component displaying the axis
        See Also:
        Axis
      • worldToView

        double worldToView(Axis axis,
                           java.lang.Number value,
                           boolean extrapolate)
        Converts a world (axis) coordinate value to a view (screen) coordinate value. If @code{extrapolate == false}, this method should return 0.0 when value is smaller than @code{axis.getMin()} and getShapeLength() when value is larger than @code{axis.getMax(}).
        Parameters:
        axis - Axis
        value - World coordinate value to convert
        extrapolate - Option to activate extrapolation value that are not on the axis
        Returns:
        Screen coordinate value
      • viewToWorld

        java.lang.Number viewToWorld(Axis axis,
                                     double value,
                                     boolean extrapolate)
        Converts a view (screen) coordinate value to a world (axis) coordinate value.
        Parameters:
        axis - Axis
        value - View coordinate value to convert
        extrapolate - Option to activate extrapolation value that are not on the axis
        Returns:
        World coordinate value
      • getTicks

        java.util.List<Tick> getTicks(Axis axis)
        Returns a list of all tick element on the axis.
        Parameters:
        axis - Axis
        Returns:
        A list of Tick instances
      • getPosition

        PointND<java.lang.Double> getPosition(Axis axis,
                                              java.lang.Number value,
                                              boolean extrapolate,
                                              boolean forceLinear)
        Returns the position of the specified value on the axis. The value is returned in view coordinates.
        Parameters:
        axis - Axis
        value - World coordinate value to convert
        extrapolate - Option to activate extrapolation value that are not on the axis
        forceLinear - Force linear interpolation.
        Returns:
        N-dimensional point of the value
      • getNormal

        PointND<java.lang.Double> getNormal(Axis axis,
                                            java.lang.Number value,
                                            boolean extrapolate,
                                            boolean forceLinear)
        Returns the normal vector at the position of the specified value. The vector is normalized.
        Parameters:
        axis - Axis
        value - World coordinate value to convert
        extrapolate - Option to activate extrapolation value that are not on the axis
        forceLinear - Force linear interpolation.
        Returns:
        N-dimensional normal vector at the position
      • getIntersection

        java.lang.Number getIntersection()
        Returns the intersection point of the axis.
        Returns:
        Point at which this axis intersects other axes.
      • setIntersection

        void setIntersection(java.lang.Number intersection)
        Sets the intersection point of the axis.
        Parameters:
        intersection - Point at which this axis intersects other axes.
      • getShape

        java.awt.Shape getShape()
        Returns the shape of the axis.
        Returns:
        Shape used for drawing.
      • setShape

        void setShape(java.awt.Shape shape)
        Sets the shape of the axis.
        Parameters:
        shape - Shape used for drawing.
      • isShapeVisible

        boolean isShapeVisible()
        Returns whether the shape of the axis will be drawn. This doesn't influence ticks or labels.
        Returns:
        true if the shape should be drawn, false otherwise.
      • setShapeVisible

        void setShapeVisible(boolean shapeVisible)
        Sets whether the shape of the axis will be drawn. This doesn't influence ticks or labels.
        Parameters:
        shapeVisible - true if the shape should be drawn, false otherwise.
      • isShapeNormalOrientationClockwise

        boolean isShapeNormalOrientationClockwise()
        Returns whether the normal vector of the shape is calculated using clockwise or counterclockwise rotation.
        Returns:
        true if the orientation is clockwise, false if it is counterclockwise.
      • setShapeNormalOrientationClockwise

        void setShapeNormalOrientationClockwise(boolean clockwise)
        Sets whether the normal vector of the shape is calculated using clockwise or counterclockwise rotation.
        Parameters:
        clockwise - true if the orientation is clockwise, false if it is counterclockwise.
      • getShapeColor

        java.awt.Paint getShapeColor()
        Returns the paint used to draw the axis, its ticks and its labels.
        Returns:
        Paint used for drawing.
      • setShapeColor

        void setShapeColor(java.awt.Paint color)
        Sets the paint used to draw the axis, its ticks and its labels.
        Parameters:
        color - Paint used for drawing.
      • getShapeStroke

        java.awt.Stroke getShapeStroke()
        Returns the stroke which defines the shape of the axis.
        Returns:
        Stroke used for drawing the shape.
      • setShapeStroke

        void setShapeStroke(java.awt.Stroke stroke)
        Sets the stroke which defines the shape of the axis.
        Parameters:
        stroke - Stroke used for drawing the shape.
      • isShapeDirectionSwapped

        boolean isShapeDirectionSwapped()
        Returns whether the axis direction is changed.
        Returns:
        true if the shape of the axis is inverted, false otherwise.
      • setShapeDirectionSwapped

        void setShapeDirectionSwapped(boolean directionSwapped)
        Sets whether the axis direction will be changed.
        Parameters:
        directionSwapped - true if the shape of the axis should be inverted, false otherwise.
      • isTicksVisible

        boolean isTicksVisible()
        Returns whether major ticks are drawn.
        Returns:
        true if major ticks are drawn, false otherwise.
      • setTicksVisible

        void setTicksVisible(boolean ticksVisible)
        Sets whether major ticks will be drawn.
        Parameters:
        ticksVisible - true if major ticks should be drawn, false otherwise.
      • getTickSpacing

        java.lang.Number getTickSpacing()
        Returns the interval for major ticks.
        Returns:
        Distance on axis in which major ticks are drawn.
      • setTickSpacing

        void setTickSpacing(java.lang.Number spacing)
        Sets the interval for major ticks.
        Parameters:
        spacing - Distance on axis in which major ticks are drawn.
      • isTicksAutoSpaced

        boolean isTicksAutoSpaced()
        Returns whether the interval for major and minor ticks is chosen automatically.
        Returns:
        true if auto-spacing is enabled, false otherwise.
      • setTicksAutoSpaced

        void setTicksAutoSpaced(boolean autoSpaced)
        Sets whether the interval for major and minor ticks is chosen automatically.
        Parameters:
        autoSpaced - true if auto-spacing is enabled, false otherwise.
      • getTickLength

        double getTickLength()
        Returns the length of major tick strokes.
        Returns:
        Tick length relative to the font height.
      • setTickLength

        void setTickLength(double length)
        Sets the length of major tick strokes.
        Parameters:
        length - Tick length relative to the font height.
      • getTickStroke

        java.awt.Stroke getTickStroke()
        Returns the stroke which is used to draw all major ticks.
        Returns:
        Stroke used for major tick drawing.
      • setTickStroke

        void setTickStroke(java.awt.Stroke stroke)
        Sets the stroke which is used to draw all major ticks.
        Parameters:
        stroke - Stroke used for major tick drawing.
      • getTickAlignment

        double getTickAlignment()
        Returns the alignment of major ticks relative to the axis. 0.0 means outside the plotting area, 0.5 means centered on the axis, 1.0 means inside the plotting area.
        Returns:
        Major tick alignment relative to the axis.
      • setTickAlignment

        void setTickAlignment(double alignment)
        Sets the alignment of major ticks relative to the axis. 0.0 means outside the plotting area, 0.5 means centered on the axis, 1.0 means inside the plotting area.
        Parameters:
        alignment - Major tick alignment relative to the axis.
      • getTickFont

        java.awt.Font getTickFont()
        Returns the font used to display the text of major ticks.
        Returns:
        Font used for tick labels.
      • setTickFont

        void setTickFont(java.awt.Font font)
        Sets the font used to display the text of major ticks.
        Parameters:
        font - Font used for tick labels.
      • getTickColor

        java.awt.Paint getTickColor()
        Returns the paint used to draw the shapes of major ticks.
        Returns:
        Paint used for major tick drawing.
      • setTickColor

        void setTickColor(java.awt.Paint color)
        Sets the paint used to draw the shapes of major ticks.
        Parameters:
        color - Paint used for major tick drawing.
      • isTickLabelsVisible

        boolean isTickLabelsVisible()
        Returns whether tick labels will be shown.
        Returns:
        true if tick labels will be drawn, false otherwise.
      • setTickLabelsVisible

        void setTickLabelsVisible(boolean tickLabelsVisible)
        Sets whether tick labels will be shown.
        Parameters:
        tickLabelsVisible - true if tick labels will be drawn, false otherwise.
      • getTickLabelFormat

        java.text.Format getTickLabelFormat()
        Returns the format which converts the tick values to labels.
        Returns:
        Format used for tick labels.
      • setTickLabelFormat

        void setTickLabelFormat(java.text.Format format)
        Sets the format which converts the tick values to labels.
        Parameters:
        format - Format used for tick labels.
      • getTickLabelDistance

        double getTickLabelDistance()
        Returns the distance of labels to their ticks.
        Returns:
        Label distance relative to the font height.
      • setTickLabelDistance

        void setTickLabelDistance(double distance)
        Sets the distance of labels to their ticks.
        Parameters:
        distance - Label distance relative to the font height.
      • isTickLabelsOutside

        boolean isTickLabelsOutside()
        Returns whether the tick labels are drawn outside of the plot.
        Returns:
        true if the labels are drawn outside of the plot, false otherwise.
      • setTickLabelsOutside

        void setTickLabelsOutside(boolean tickLabelsOutside)
        Sets whether the tick labels are drawn outside of the plot.
        Parameters:
        tickLabelsOutside - true if the labels are drawn outside of the plot, false otherwise.
      • getTickLabelRotation

        double getTickLabelRotation()
        Returns the rotation of the tick labels.
        Returns:
        Tick label rotation in degrees.
      • setTickLabelRotation

        void setTickLabelRotation(double angle)
        Sets the rotation of the tick labels.
        Parameters:
        angle - Tick label rotation in degrees.
      • isMinorTicksVisible

        boolean isMinorTicksVisible()
        Returns whether minor ticks are drawn.
        Returns:
        true if minor ticks are drawn, false otherwise.
      • setMinorTicksVisible

        void setMinorTicksVisible(boolean minorTicksVisible)
        Sets whether minor ticks are drawn.
        Parameters:
        minorTicksVisible - true if minor ticks are drawn, false otherwise.
      • getMinorTicksCount

        int getMinorTicksCount()
        Returns the count of minor ticks.
        Returns:
        Number of minor ticks between two major ticks.
      • setMinorTicksCount

        void setMinorTicksCount(int count)
        Sets the count of minor ticks.
        Parameters:
        count - Number of minor ticks between two major ticks.
      • getMinorTickLength

        double getMinorTickLength()
        Returns the length of minor tick strokes.
        Returns:
        Tick length relative to font height.
      • setMinorTickLength

        void setMinorTickLength(double length)
        Sets the length of minor tick strokes.
        Parameters:
        length - Tick length relative to font height.
      • getMinorTickStroke

        java.awt.Stroke getMinorTickStroke()
        Returns the stroke used to draw all minor ticks.
        Returns:
        Stroke used for minor tick drawing.
      • setMinorTickStroke

        void setMinorTickStroke(java.awt.Stroke stroke)
        Sets the stroke used to draw all minor ticks.
        Parameters:
        stroke - Stroke used for minor tick drawing.
      • getMinorTickAlignment

        double getMinorTickAlignment()
        Returns the alignment of minor ticks. 0.0 means outside the plotting area, 0.5 means centered on the axis, 1.0 means inside the plotting area.
        Returns:
        Minor tick alignment relative to the axis.
      • setMinorTickAlignment

        void setMinorTickAlignment(double alignment)
        Sets the alignment of minor ticks. 0.0 means outside the plotting area, 0.5 means centered on the axis, 1.0 means inside the plotting area.
        Parameters:
        alignment - Minor tick alignment relative to the axis.
      • getMinorTickColor

        java.awt.Paint getMinorTickColor()
        Returns the paint used to draw the shapes of minor ticks.
        Returns:
        Paint used for minor tick drawing.
      • setMinorTickColor

        void setMinorTickColor(java.awt.Paint ticksMinorColor)
        Sets the paint used to draw the shapes of minor ticks.
        Parameters:
        ticksMinorColor - Paint used for minor tick drawing.
      • getCustomTicks

        java.util.Map<java.lang.Double,java.lang.String> getCustomTicks()
        Returns custom ticks with their respective position and label.
        Returns:
        A map of custom tick positions and labels.
      • setCustomTicks

        void setCustomTicks(java.util.Map<java.lang.Double,java.lang.String> positionsAndLabels)
        Sets custom ticks with their respective position and label.
        Parameters:
        positionsAndLabels - A map of custom tick positions and labels.
      • getLabel

        Label getLabel()
        Returns the label of the axis.
        Returns:
        Axis label.
      • setLabel

        void setLabel(Label label)
        Sets the label of the axis.
        Parameters:
        label - Axis label.
      • getLabelDistance

        double getLabelDistance()
        Returns the distance from the axis to the label.
        Returns:
        Distance relative to font height.
      • setLabelDistance

        void setLabelDistance(double distance)
        Sets the distance from the axis to the label.
        Parameters:
        distance - Distance relative to font height.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.