Package org.lazywizard.lazylib.ui
Enum Class LazyFont.TextAnchor
- All Implemented Interfaces:
Serializable,Comparable<LazyFont.TextAnchor>,Constable
- Enclosing class:
- LazyFont
Represents the origin of drawing for
LazyFont.DrawableStrings. For example, calling LazyFont.DrawableString.setAnchor(TextAnchor) with TOP_RIGHT would mean all calls to LazyFont.DrawableString.draw(float, float) will consider the top right of the LazyFont.DrawableString to be the origin
when drawing, meaning all text would appear to the left and below the point passed into LazyFont.DrawableString.draw(float, float).- Since:
- 2.7
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionText will be drawn centered above the origin.Text will be drawn above and to the right of the origin.Text will be drawn below and to the left of the origin.Text will be drawn centered around the origin.Text will be drawn centered to the right of the origin.Text will be drawn centered to the left of the origin.Text will be drawn centered below the origin.Text will be drawn below and to the right of the origin.Text will be drawn below and to the left of the origin. -
Method Summary
Modifier and TypeMethodDescriptionstatic LazyFont.TextAnchorReturns the enum constant of this class with the specified name.static LazyFont.TextAnchor[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TOP_LEFT
Text will be drawn below and to the right of the origin. -
TOP_CENTER
Text will be drawn centered below the origin. -
TOP_RIGHT
Text will be drawn below and to the left of the origin. -
CENTER_LEFT
Text will be drawn centered to the right of the origin. -
CENTER
Text will be drawn centered around the origin. -
CENTER_RIGHT
Text will be drawn centered to the left of the origin. -
BOTTOM_LEFT
Text will be drawn above and to the right of the origin. -
BOTTOM_CENTER
Text will be drawn centered above the origin. -
BOTTOM_RIGHT
Text will be drawn below and to the left of the origin.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-