Class PlaneAxisAnnotation

  • All Implemented Interfaces:
    AxisAnnotation

    public class PlaneAxisAnnotation
    extends java.lang.Object
    implements AxisAnnotation
    AxisAnnotation implementation for 2D surfaces.
    Since:
    26 Jul 2013
    Author:
    Mark Taylor
    • Constructor Summary

      Constructors 
      Constructor Description
      PlaneAxisAnnotation​(int gxlo, int gxhi, int gylo, int gyhi, Axis xaxis, Axis yaxis, Tick[] xticks, Tick[] yticks, java.lang.String xlabel, java.lang.String ylabel, Captioner captioner, boolean xAnnotate, boolean yAnnotate)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void drawLabels​(java.awt.Graphics g)
      Paints the annotations.
      java.awt.Insets getPadding​(boolean withScroll)
      Returns the padding insets around the edge of a plot bounds rectangle required to accommodate the labels painted by this object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PlaneAxisAnnotation

        public PlaneAxisAnnotation​(int gxlo,
                                   int gxhi,
                                   int gylo,
                                   int gyhi,
                                   Axis xaxis,
                                   Axis yaxis,
                                   Tick[] xticks,
                                   Tick[] yticks,
                                   java.lang.String xlabel,
                                   java.lang.String ylabel,
                                   Captioner captioner,
                                   boolean xAnnotate,
                                   boolean yAnnotate)
        Constructor.
        Parameters:
        gxlo - graphics X coordinate lower bound
        gxhi - graphics X coordinate upper bound
        gylo - graphics Y coordinate lower bound
        gyhi - graphics Y coordinate upper bound
        xaxis - X axis object
        yaxis - Y axis object
        xticks - array of ticks along the X axis
        yticks - array of ticks along the Y axis
        xlabel - text label on X axis
        ylabel - text label on Y axis
        captioner - text renderer for axis labels etc
        xAnnotate - true iff annotations are required on X axis
        yAnnotate - true iff annotations are required on Y axis
    • Method Detail

      • drawLabels

        public void drawLabels​(java.awt.Graphics g)
        Description copied from interface: AxisAnnotation
        Paints the annotations. They should fit in the padding region defined by the result of the {link #getPadding} method.
        Specified by:
        drawLabels in interface AxisAnnotation
        Parameters:
        g - graphics context
      • getPadding

        public java.awt.Insets getPadding​(boolean withScroll)
        Description copied from interface: AxisAnnotation
        Returns the padding insets around the edge of a plot bounds rectangle required to accommodate the labels painted by this object.
        Specified by:
        getPadding in interface AxisAnnotation
        Parameters:
        withScroll - true if the padding should be large enough to accommodate labelling requirements if the surface is scrolled
        Returns:
        padding insets