Anchor.HorizontalAnchorpublic abstract class Anchor
extends java.lang.Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
Anchor.HorizontalAnchor |
Anchor for drawing horizontal text.
|
| Modifier and Type | Field | Description |
|---|---|---|
static Anchor |
E |
East - reference point is to right of horizontal text.
|
static Anchor |
N |
North - reference point is above centre of horizontal text.
|
static Anchor |
S |
South - reference point is below center of horizontal text.
|
static Anchor |
W |
West - reference point is to left of horizontal text.
|
| Constructor | Description |
|---|---|
Anchor() |
| Modifier and Type | Method | Description |
|---|---|---|
static Anchor |
createAngledAnchor(double theta,
Anchor baseAnchor) |
Returns a new anchor for drawing text at a non-horizontal angle.
|
abstract void |
drawCaption(java.lang.String label,
int px,
int py,
Captioner captioner,
java.awt.Graphics g) |
Draws a text label onto a given graphics context.
|
abstract java.awt.Rectangle |
getCaptionBounds(java.lang.String label,
int px,
int py,
Captioner captioner) |
Returns a rectangle within which all of the given label will fall.
|
public static Anchor N
public static Anchor E
public static Anchor W
public static Anchor S
public abstract java.awt.Rectangle getCaptionBounds(java.lang.String label,
int px,
int py,
Captioner captioner)
label - textpx - reference point X positionpy - reference point Y positioncaptioner - object that can turn text into graphicspublic abstract void drawCaption(java.lang.String label,
int px,
int py,
Captioner captioner,
java.awt.Graphics g)
label - textpx - reference point X positionpy - reference point Y positioncaptioner - object that can turn text into graphicsg - graphics contextpublic static Anchor createAngledAnchor(double theta, Anchor baseAnchor)
theta - rotation angle anticlockwise from X axis in radiansbaseAnchor - anchor supplying positioning constraints for
horizontal textCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.