public enum SimpleVerticalAligner extends Enum<SimpleVerticalAligner> implements Aligner
Modifier and Type | Method and Description |
---|---|
String[] |
align(String[] text,
int cellWidth,
int cellHeight)
Perform text alignment, returning a String array that MUST contain
cellHeight lines, each of which MUST be cellWidth chars in length. |
static SimpleVerticalAligner |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SimpleVerticalAligner[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SimpleVerticalAligner top
public static final SimpleVerticalAligner middle
public static final SimpleVerticalAligner bottom
public static SimpleVerticalAligner[] values()
for (SimpleVerticalAligner c : SimpleVerticalAligner.values()) System.out.println(c);
public static SimpleVerticalAligner valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String[] align(String[] text, int cellWidth, int cellHeight)
Aligner
cellHeight
lines, each of which MUST be cellWidth
chars in length.
Input array is guaranteed to contain lines that have length equal to . There is no guarantee on the input number of lines though.