|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.neu.ccs.gui.TextAnchor
The TextAnchor class defines interfaces that specify
how to compute the location and bounds of a String that
will be displayed using a given Font in conjunction with
a given anchor position.
The TextAnchor class also defines static objects that
implement the interfaces it defines.
The TextAnchor class cannot be instantiated.
In 2.4.0, this class was updated to be consistent with
refinements to the Paintable interface.
| Nested Class Summary | |
static interface |
TextAnchor.Locator
The Locator interface defines the methods needed to
compute the coordinates, bounds, and center of a String
displayed in a given Font using the given anchor
positions and this strategy. |
static interface |
TextAnchor.XLocator
The XLocator interface defines the methods needed to
compute the x-coordinate of the left, right, and center of a given
String displayed in a given Font using the
given anchorX position and this strategy. |
static interface |
TextAnchor.YLocator
The YLocator interface defines the methods needed to
compute the y-coordinate of the base line, ascent line, descent line,
and leading line of a given String displayed in a given
Font using the given anchorY position and this strategy. |
| Field Summary | |
static TextAnchor.YLocator |
ASCENTLINE
The YLocator object that corresponds to an anchor
on the ascent line of the displayed string. |
static TextAnchor.YLocator |
BASELINE
The YLocator object that corresponds to an anchor
on the base line of the displayed string. |
static TextAnchor.XLocator |
CENTER
The XLocator object that corresponds to an anchor
at the horizontal center of the displayed string. |
static TextAnchor.Locator |
CENTER_ASCENTLINE
The Locator that combines
CENTER and ASCENTLINE. |
static TextAnchor.Locator |
CENTER_BASELINE
The Locator that combines
CENTER and BASELINE. |
static TextAnchor.Locator |
CENTER_DESCENTLINE
The Locator that combines
CENTER and DESCENTLINE. |
static TextAnchor.Locator |
CENTER_LEADINGLINE
The Locator that combines
CENTER and LEADINGLINE. |
static TextAnchor.YLocator |
DESCENTLINE
The YLocator object that corresponds to an anchor
on the descent line of the displayed string. |
static TextAnchor.YLocator |
LEADINGLINE
The YLocator object that corresponds to an anchor
on the leading line of the displayed string. |
static TextAnchor.XLocator |
LEFT
The XLocator object that corresponds to an anchor
at the left edge of the displayed string. |
static TextAnchor.Locator |
LEFT_ASCENTLINE
The Locator that combines
LEFT and ASCENTLINE. |
static TextAnchor.Locator |
LEFT_BASELINE
The Locator that combines
LEFT and BASELINE. |
static TextAnchor.Locator |
LEFT_DESCENTLINE
The Locator that combines
LEFT and DESCENTLINE. |
static TextAnchor.Locator |
LEFT_LEADINGLINE
The Locator that combines
LEFT and LEADING. |
static TextAnchor.XLocator |
RIGHT
The XLocator object that corresponds to an anchor
at the right edge of the displayed string. |
static TextAnchor.Locator |
RIGHT_ASCENTLINE
The Locator that combines
RIGHT and ASCENTLINE. |
static TextAnchor.Locator |
RIGHT_BASELINE
The Locator that combines
RIGHT and BASELINE. |
static TextAnchor.Locator |
RIGHT_DESCENTLINE
The Locator that combines
RIGHT and DESCENTLINE. |
static TextAnchor.Locator |
RIGHT_LEADINGLINE
The Locator that combines
RIGHT and LEADINGLINE. |
(package private) static FontRenderContext |
standardFRC
The standard font render context defined using the identity transform, anti-aliasing on, and fractional-metrics off. |
| Constructor Summary | |
private |
TextAnchor()
Private constructor to prevent instantiation. |
| Method Summary | |
static TextAnchor.Locator |
makeLocator(TextAnchor.XLocator xlocator,
TextAnchor.YLocator ylocator)
Returns a Locator object constructed using the given
XLocator and YLocator objects. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
static final FontRenderContext standardFRC
public static final TextAnchor.XLocator LEFT
XLocator object that corresponds to an anchor
at the left edge of the displayed string.
public static final TextAnchor.XLocator RIGHT
XLocator object that corresponds to an anchor
at the right edge of the displayed string.
public static final TextAnchor.XLocator CENTER
XLocator object that corresponds to an anchor
at the horizontal center of the displayed string.
public static final TextAnchor.YLocator BASELINE
YLocator object that corresponds to an anchor
on the base line of the displayed string.
public static final TextAnchor.YLocator ASCENTLINE
YLocator object that corresponds to an anchor
on the ascent line of the displayed string.
public static final TextAnchor.YLocator DESCENTLINE
YLocator object that corresponds to an anchor
on the descent line of the displayed string.
public static final TextAnchor.YLocator LEADINGLINE
YLocator object that corresponds to an anchor
on the leading line of the displayed string.
public static final TextAnchor.Locator LEFT_BASELINE
Locator that combines
LEFT and BASELINE.
public static final TextAnchor.Locator RIGHT_BASELINE
Locator that combines
RIGHT and BASELINE.
public static final TextAnchor.Locator CENTER_BASELINE
Locator that combines
CENTER and BASELINE.
public static final TextAnchor.Locator LEFT_ASCENTLINE
Locator that combines
LEFT and ASCENTLINE.
public static final TextAnchor.Locator RIGHT_ASCENTLINE
Locator that combines
RIGHT and ASCENTLINE.
public static final TextAnchor.Locator CENTER_ASCENTLINE
Locator that combines
CENTER and ASCENTLINE.
public static final TextAnchor.Locator LEFT_DESCENTLINE
Locator that combines
LEFT and DESCENTLINE.
public static final TextAnchor.Locator RIGHT_DESCENTLINE
Locator that combines
RIGHT and DESCENTLINE.
public static final TextAnchor.Locator CENTER_DESCENTLINE
Locator that combines
CENTER and DESCENTLINE.
public static final TextAnchor.Locator LEFT_LEADINGLINE
Locator that combines
LEFT and LEADING.
public static final TextAnchor.Locator RIGHT_LEADINGLINE
Locator that combines
RIGHT and LEADINGLINE.
public static final TextAnchor.Locator CENTER_LEADINGLINE
Locator that combines
CENTER and LEADINGLINE.
| Constructor Detail |
private TextAnchor()
| Method Detail |
public static TextAnchor.Locator makeLocator(TextAnchor.XLocator xlocator,
TextAnchor.YLocator ylocator)
Locator object constructed using the given
XLocator and YLocator objects.
xlocator - the XLocator objectylocator - the YLocator object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||