public enum HorizontalAlignment extends java.lang.Enum<HorizontalAlignment>
Enum Constant and Description |
---|
CENTER
The horizontal alignment is centered, meaning the text is centered across the cell.
|
CENTER_SELECTION
The horizontal alignment is centered across multiple cells.
|
DISTRIBUTED
Indicates that each 'word' in each line of text inside the cell is evenly distributed across the width of the cell, with flush right and left margins.
|
FILL
Indicates that the value of the cell should be filled across the entire width of the cell.
|
GENERAL
The horizontal alignment is general-aligned.
|
JUSTIFY
The horizontal alignment is justified (flush left and right).
|
LEFT
The horizontal alignment is left-aligned, even in Rightto-Left mode.
|
RIGHT
The horizontal alignment is right-aligned, meaning that cell contents are aligned at the right edge of the cell, even in Right-to-Left mode.
|
Modifier and Type | Method and Description |
---|---|
static HorizontalAlignment |
forInt(int code) |
short |
getCode() |
static HorizontalAlignment |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
(返回具有指定名称的此类型的枚举常量。)
|
static HorizontalAlignment[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared.
(按照声明的顺序返回包含此枚举类型常量的数组。)
|
public static final HorizontalAlignment GENERAL
public static final HorizontalAlignment LEFT
public static final HorizontalAlignment CENTER
public static final HorizontalAlignment RIGHT
public static final HorizontalAlignment FILL
Additional rules:
public static final HorizontalAlignment JUSTIFY
public static final HorizontalAlignment CENTER_SELECTION
public static final HorizontalAlignment DISTRIBUTED
When there is also an indent value to apply, both the left and right side of the cell are padded by the indent value.
A 'word' is a set of characters with no space character in them.
Two lines inside a cell are separated by a carriage return.
(表示单元格内每行文本中的每个“单词”均匀分布在单元格的宽度上,左右边距齐平。当还有一个缩进值要应用时,单元格的左侧和右侧都被缩进值填充。 “单词”是一组字符,其中没有空格字符。单元格内的两行由回车分隔。)public static HorizontalAlignment[] values()
for (HorizontalAlignment c : HorizontalAlignment.values()) System.out.println(c);(按照声明的顺序返回包含此枚举类型常量的数组。此方法可用于迭代常量,如下所示: for (HorizontalAlignment c : HorizontalAlignment.values()) System.out.println(c);)
public static HorizontalAlignment valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
(name - 要返回的枚举常量的名称。)
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified name
(java.lang.IllegalArgumentException - 如果此枚举类型没有具有指定名称的常量)
java.lang.NullPointerException
- if the argument is null
(java.lang.NullPointerException - 如果参数为空)
public short getCode()
public static HorizontalAlignment forInt(int code)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.