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);
public static HorizontalAlignment valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic short getCode()
public static HorizontalAlignment forInt(int code)
Copyright 2020 The Apache Software Foundation or its licensors, as applicable.