Package io.keikai.axyra.sheets.style
Enum Class HAlign
- All Implemented Interfaces:
Serializable,Comparable<HAlign>,Constable
Horizontal alignment of the cell content (ECMA-376
ST_HorizontalAlignment). Set it with
CellStyle.Builder.horizontalAlign(HAlign).-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCentered in the cell.Centers across the adjacent empty cells to the right (Excel's "Center Across Selection").Spreads the words evenly across the cell width (Excel's "Distributed (Indent)").Repeats the content to fill the cell width.Excel's General alignment: text left, numbers and dates right, booleans and errors centered.Wraps the text and justifies every line but the last.Left-aligned;CellStyle.Builder.indent(int)shifts it right.Right-aligned;CellStyle.Builder.indent(int)shifts it left. -
Method Summary
Modifier and TypeMethodDescriptionstatic HAlignParses anST_HorizontalAlignmenttoken, case-sensitively.token()The ECMA-376ST_HorizontalAlignmenttoken, e.g.static HAlignReturns the enum constant of this class with the specified name.static HAlign[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GENERAL
Excel's General alignment: text left, numbers and dates right, booleans and errors centered. -
LEFT
Left-aligned;CellStyle.Builder.indent(int)shifts it right. -
CENTER
Centered in the cell. -
RIGHT
Right-aligned;CellStyle.Builder.indent(int)shifts it left. -
FILL
Repeats the content to fill the cell width. -
JUSTIFY
Wraps the text and justifies every line but the last. -
CENTER_CONTINUOUS
Centers across the adjacent empty cells to the right (Excel's "Center Across Selection"). -
DISTRIBUTED
Spreads the words evenly across the cell width (Excel's "Distributed (Indent)").
-
-
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
-
token
The ECMA-376ST_HorizontalAlignmenttoken, e.g."centerContinuous".- Returns:
- the token as written in the file
-
from
Parses anST_HorizontalAlignmenttoken, case-sensitively.- Parameters:
token- the token, e.g."center"- Returns:
- the matching alignment;
GENERALfornull, empty or unknown tokens
-