Package uk.ac.starlink.ttools.plot2
Class Anchor.HorizontalAnchor
java.lang.Object
uk.ac.starlink.ttools.plot2.Anchor
uk.ac.starlink.ttools.plot2.Anchor.HorizontalAnchor
- Enclosing class:
Anchor
Anchor for drawing horizontal text.
-
Nested Class Summary
Nested classes/interfaces inherited from class uk.ac.starlink.ttools.plot2.Anchor
Anchor.HorizontalAnchor -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddrawCaption(Caption label, int px, int py, Captioner captioner, Graphics g) Draws a text label onto a given graphics context.getCaptionBounds(Caption label, int px, int py, Captioner captioner) Returns a rectangle within which all of the given label will fall.protected abstract int[]Returns the positional offset from the reference point to position the graphics context at before calling drawCaption.Methods inherited from class uk.ac.starlink.ttools.plot2.Anchor
createAngledAnchor
-
Constructor Details
-
HorizontalAnchor
public HorizontalAnchor()
-
-
Method Details
-
getCaptionBounds
Description copied from class:AnchorReturns a rectangle within which all of the given label will fall.- Specified by:
getCaptionBoundsin classAnchor- Parameters:
label- textpx- reference point X positionpy- reference point Y positioncaptioner- object that can turn text into graphics- Returns:
- plotted text bounding box
-
drawCaption
Description copied from class:AnchorDraws a text label onto a given graphics context.- Specified by:
drawCaptionin classAnchor- Parameters:
label- textpx- reference point X positionpy- reference point Y positioncaptioner- object that can turn text into graphicsg- graphics context
-
getOffset
Returns the positional offset from the reference point to position the graphics context at before calling drawCaption.- Parameters:
bounds- caption boundspad- captioner-specific pad value
-