Package host.anzo.commons.graphics.text
Enum Class TextAlignment
- All Implemented Interfaces:
Serializable,Comparable<TextAlignment>,Constable
An enumerator which indicates where text should be positioned.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionText should be aligned to the bottom of the target bounds.Text should be aligned to the bottom-left of the target bounds.Text should be aligned to the bottom-right of the target bounds.Text should be aligned to the middle of the target bounds.Text should be aligned to the left of the target bounds.Text should be aligned to the right of the target bounds.Text should be aligned to the top of the target bounds.Text should be aligned to the top-left of the target bounds.Text should be aligned to the top-right of the target bounds. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisBottom()Gets whether the text alignment is aligned to the bottom.booleanisCenter()Gets whether the text alignment is centered horizontally.booleanisLeft()Gets whether the text alignment is aligned to the left.booleanisMiddle()Gets whether the text alignment is aligned to the middle.booleanisRight()Gets whether the text alignment is aligned to the right.booleanisTop()Gets whether the text alignment is aligned to the top.static TextAlignmentReturns the enum constant of this class with the specified name.static TextAlignment[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TOP_LEFT
Text should be aligned to the top-left of the target bounds. -
TOP
Text should be aligned to the top of the target bounds. -
TOP_RIGHT
Text should be aligned to the top-right of the target bounds. -
MIDDLE_LEFT
Text should be aligned to the left of the target bounds. -
MIDDLE
Text should be aligned to the middle of the target bounds. -
MIDDLE_RIGHT
Text should be aligned to the right of the target bounds. -
BOTTOM_LEFT
Text should be aligned to the bottom-left of the target bounds. -
BOTTOM
Text should be aligned to the bottom of the target bounds. -
BOTTOM_RIGHT
Text should be aligned to the bottom-right of the target bounds.
-
-
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
-
isBottom
public boolean isBottom()Gets whether the text alignment is aligned to the bottom.- Returns:
- true if the text alignment is aligned to the bottom; otherwise, false
-
isCenter
public boolean isCenter()Gets whether the text alignment is centered horizontally.- Returns:
- true if the text alignment is horizontally centered; otherwise, false
-
isLeft
public boolean isLeft()Gets whether the text alignment is aligned to the left.- Returns:
- true if the text alignment is aligned to the left; otherwise, false
-
isMiddle
public boolean isMiddle()Gets whether the text alignment is aligned to the middle.- Returns:
- true if the text alignment is aligned to the middle; otherwise, false
-
isRight
public boolean isRight()Gets whether the text alignment is aligned to the right.- Returns:
- true if the text alignment is aligned to the right; otherwise, false
-
isTop
public boolean isTop()Gets whether the text alignment is aligned to the top.- Returns:
- true if the text alignment is aligned to the top; otherwise, false
-