Package com.lowagie.text.alignment
Enum Class HorizontalAlignment
- All Implemented Interfaces:
Serializable
,Comparable<HorizontalAlignment>
,Constable
Represents a possible horizontal alignment modes for document elements that can be aligned horizontally.
- Since:
- 1.2.7
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getId()
static Optional
<HorizontalAlignment> of
(int id) ConstructsHorizontalAlignment
instance from passed unique alignmentid
.static HorizontalAlignment
Returns the enum constant of this class with the specified name.static HorizontalAlignment[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNDEFINED
-
LEFT
-
CENTER
-
RIGHT
-
JUSTIFIED
-
JUSTIFIED_ALL
-
-
Field Details
-
id
private final int id
-
-
Constructor Details
-
HorizontalAlignment
private HorizontalAlignment(int id)
-
-
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
-
of
ConstructsHorizontalAlignment
instance from passed unique alignmentid
.- Parameters:
id
- Alignment unique ID- Returns:
Optional
containing alignment instance. Ifid
is not recognized,Optional.empty()
will be returned- See Also:
-
getId
public int getId()
-