Package codedraw
Enum Class TextOrigin
- All Implemented Interfaces:
Serializable
,Comparable<TextOrigin>
,Constable
Horizontally and vertically aligns text.
The origin describes where the text is placed relative to the specified (x, y) coordinates.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe origin will be to the bottom left of the text.The origin will be to the bottom center of the text.The origin will be to the bottom right of the text.The origin will be exactly at the center of the text.The origin will be to the center left of the text.The origin will be to the center right of the text.The origin will be to the top left of the text.The origin will be to the top center of the text.The origin will be to the top right of the text. -
Method Summary
Modifier and TypeMethodDescriptionstatic TextOrigin
Returns the enum constant of this class with the specified name.static TextOrigin[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TOP_LEFT
The origin will be to the top left of the text. The text will be drawn to the right below the (x, y) coordinate.| -------------- + -------------- | Text goes here
-
TOP_MIDDLE
The origin will be to the top center of the text. The text will be drawn centrally below the (x, y) coordinate.| -------------- + -------------- Text goes here
-
TOP_RIGHT
The origin will be to the top right of the text. The text will be drawn to the left below the (x, y) coordinate.| -------------- + -------------- Text goes here |
-
CENTER_LEFT
The origin will be to the center left of the text. The text will be drawn to the centered right of the (x, y) coordinate.| -------------- + Text goes here |
-
CENTER
The origin will be exactly at the center of the text. The text will be drawn around the (x, y) coordinate.| ------- Text go+es here ------- |
-
CENTER_RIGHT
The origin will be to the center right of the text. The text will be drawn to the centered left of the (x, y) coordinate.| Text goes here + -------------- |
-
BOTTOM_LEFT
The origin will be to the bottom left of the text. The text will be drawn to the right above the (x, y) coordinate.| Text goes here -------------- + -------------- |
-
BOTTOM_MIDDLE
The origin will be to the bottom center of the text. The text will be drawn centrally above the (x, y) coordinate.Text goes here -------------- + -------------- |
-
BOTTOM_RIGHT
The origin will be to the bottom right of the text. The text will be drawn to the left above the (x, y) coordinate.Text goes here | -------------- + -------------- |
-
-
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
-