Interface IAxisTitlePainter

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    AxisTitlePainterDefault

    public interface IAxisTitlePainter
    extends java.io.Serializable
    Interface for an painter of the title of an axis of the Chart2D.

    Since:
    2.2.1
    Version:
    $Revision: 1.11 $
    Author:
    Achim Westermann
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int getHeight​(IAxis<?> axis, java.awt.Graphics g2d)
      Returns the height of this axis title in px with respect to the current title of the given axis title.
      int getWidth​(IAxis<?> axis, java.awt.Graphics g2d)
      Returns the width of this axis title in px with respect to the current title of the given axis.
      void paintTitle​(IAxis<?> axis, java.awt.Graphics g)
      Invoked to let implementations paint the given title of the given axis.
    • Method Detail

      • getHeight

        int getHeight​(IAxis<?> axis,
                      java.awt.Graphics g2d)
        Returns the height of this axis title in px with respect to the current title of the given axis title.

        Parameters:
        axis - the instance this title painter is working for.
        g2d - needed for size informations (e.g. font widths).
        Returns:
        the height of this axis title in px with respect to the current title of the given axis.
      • getWidth

        int getWidth​(IAxis<?> axis,
                     java.awt.Graphics g2d)
        Returns the width of this axis title in px with respect to the current title of the given axis.

        Parameters:
        axis - the instance this title painter is working for.
        g2d - needed for size informations (e.g. font widths).
        Returns:
        the width of this axis title in px with respect to the current title of the given axis.
      • paintTitle

        void paintTitle​(IAxis<?> axis,
                        java.awt.Graphics g)
        Invoked to let implementations paint the given title of the given axis.

        Implementations should make use of the information about the axis coordinates (start pixel,end pixel) and the graphics context (for font dimensions) to do it right.

        Parameters:
        axis - the axis to paint the title of.
        g - needed for size informations.