public enum Alignment2D extends java.lang.Enum<Alignment2D>
Enum Constant and Description |
---|
Center |
East |
North |
NorthEast |
NorthWest |
South |
SouthEast |
SouthWest |
West |
Modifier and Type | Method and Description |
---|---|
HorizontalAlignment |
getHorizontalAlignment()
Get the underlying horizontal alignment.
|
DoublePair |
getTextOffset(java.awt.geom.Rectangle2D textBounds,
boolean yPointsDown)
Get the offset for a text with the given bounds.
|
VerticalAlignment |
getVerticalAlignment()
Get the underlying vertical alignment.
|
static Alignment2D |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Alignment2D[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Alignment2D SouthWest
public static final Alignment2D South
public static final Alignment2D SouthEast
public static final Alignment2D West
public static final Alignment2D Center
public static final Alignment2D East
public static final Alignment2D NorthWest
public static final Alignment2D North
public static final Alignment2D NorthEast
public static Alignment2D[] values()
for (Alignment2D c : Alignment2D.values()) System.out.println(c);
public static Alignment2D valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null@NotNull public VerticalAlignment getVerticalAlignment()
@NotNull public HorizontalAlignment getHorizontalAlignment()
@NotNull public DoublePair getTextOffset(@NotNull java.awt.geom.Rectangle2D textBounds, boolean yPointsDown)
textBounds
- text boundsyPointsDown
- true
: Y axis points down, rectangle's minimal horizontal edge is North (typical screen coordinates),false
: Y axis points up, rectangle's minimal horizontal edge is South (often used elsewhere)