Package uk.ac.starlink.ttools.plot2
Class NullCaptioner
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.NullCaptioner
-
-
Field Summary
Fields Modifier and Type Field Description static NullCaptionerINSTANCESole instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddrawCaption(java.lang.String label, java.awt.Graphics g)Draws a caption such that the left end of the text baseline is at the origin of the supplied graphics context.java.awt.RectanglegetCaptionBounds(java.lang.String label)Returns a bounding box for the caption drawn by a corresponding call toCaptioner.drawCaption(java.lang.String, java.awt.Graphics).intgetPad()Returns a suitable padding value for separating captions from the reference position or other graphical elements.
-
-
-
Field Detail
-
INSTANCE
public static final NullCaptioner INSTANCE
Sole instance.
-
-
Method Detail
-
drawCaption
public void drawCaption(java.lang.String label, java.awt.Graphics g)Description copied from interface:CaptionerDraws a caption such that the left end of the text baseline is at the origin of the supplied graphics context.- Specified by:
drawCaptionin interfaceCaptioner- Parameters:
label- caption textg- graphics context
-
getCaptionBounds
public java.awt.Rectangle getCaptionBounds(java.lang.String label)
Description copied from interface:CaptionerReturns a bounding box for the caption drawn by a corresponding call toCaptioner.drawCaption(java.lang.String, java.awt.Graphics).- Specified by:
getCaptionBoundsin interfaceCaptioner- Parameters:
label- caption text- Returns:
- bounding box for caption drawn at the origin
-
-