Package uk.ac.starlink.ttools.plot2
Class BasicCaptioner
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.BasicCaptioner
-
-
Constructor Summary
Constructors Constructor Description BasicCaptioner()Constructs a captioner that will use a default font.BasicCaptioner(java.awt.Font font, java.lang.Boolean antialias)Constructs a captioner that uses a given font.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddrawCaption(Caption 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.booleanequals(java.lang.Object o)java.awt.RectanglegetCaptionBounds(Caption label)Returns a bounding box for the caption drawn by a corresponding call toCaptioner.drawCaption(uk.ac.starlink.ttools.plot2.Caption, java.awt.Graphics).intgetPad()Returns a suitable padding value for separating captions from the reference position or other graphical elements.inthashCode()
-
-
-
Method Detail
-
drawCaption
public void drawCaption(Caption 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(Caption label)
Description copied from interface:CaptionerReturns a bounding box for the caption drawn by a corresponding call toCaptioner.drawCaption(uk.ac.starlink.ttools.plot2.Caption, java.awt.Graphics).- Specified by:
getCaptionBoundsin interfaceCaptioner- Parameters:
label- caption text- Returns:
- bounding box for caption drawn at the origin
-
getPad
public int getPad()
Description copied from interface:CaptionerReturns a suitable padding value for separating captions from the reference position or other graphical elements.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-