Class OutlineCaptioner

java.lang.Object
uk.ac.starlink.ttools.plot2.OutlineCaptioner
All Implemented Interfaces:
Captioner

public class OutlineCaptioner extends Object implements Captioner
Wrapper Captioner implementation that draws an outline around the caption bounding box as well as actually drawing it. Only intended for debugging.
Since:
9 Mar 2017
Author:
Mark Taylor
  • Constructor Details

    • OutlineCaptioner

      public OutlineCaptioner(Captioner base, Color color)
      Constructor.
      Parameters:
      base - base captioner
      color - outline colour
  • Method Details

    • getCaptionBounds

      public Rectangle getCaptionBounds(Caption label)
      Description copied from interface: Captioner
      Returns a bounding box for the caption drawn by a corresponding call to Captioner.drawCaption(uk.ac.starlink.ttools.plot2.Caption, java.awt.Graphics).
      Specified by:
      getCaptionBounds in interface Captioner
      Parameters:
      label - caption text
      Returns:
      bounding box for caption drawn at the origin
    • drawCaption

      public void drawCaption(Caption label, Graphics g)
      Description copied from interface: Captioner
      Draws a caption such that the left end of the text baseline is at the origin of the supplied graphics context.
      Specified by:
      drawCaption in interface Captioner
      Parameters:
      label - caption text
      g - graphics context
    • getPad

      public int getPad()
      Description copied from interface: Captioner
      Returns a suitable padding value for separating captions from the reference position or other graphical elements.
      Specified by:
      getPad in interface Captioner
      Returns:
      pad value in pixels
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object