Anchor.HorizontalAnchor
Constructor and Description |
---|
HorizontalAnchor() |
Modifier and Type | Method and Description |
---|---|
void |
drawCaption(Caption label,
int px,
int py,
Captioner captioner,
Graphics g)
Draws a text label onto a given graphics context.
|
Rectangle |
getCaptionBounds(Caption label,
int px,
int py,
Captioner captioner)
Returns a rectangle within which all of the given label will fall.
|
protected abstract int[] |
getOffset(Rectangle bounds,
int pad)
Returns the positional offset from the reference point to
position the graphics context at before calling drawCaption.
|
createAngledAnchor
public Rectangle getCaptionBounds(Caption label, int px, int py, Captioner captioner)
Anchor
getCaptionBounds
in class Anchor
label
- textpx
- reference point X positionpy
- reference point Y positioncaptioner
- object that can turn text into graphicspublic void drawCaption(Caption label, int px, int py, Captioner captioner, Graphics g)
Anchor
drawCaption
in class Anchor
label
- textpx
- reference point X positionpy
- reference point Y positioncaptioner
- object that can turn text into graphicsg
- graphics contextprotected abstract int[] getOffset(Rectangle bounds, int pad)
bounds
- caption boundspad
- captioner-specific pad valueCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.