|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<HorizontalAlignment>
com.unboundid.util.HorizontalAlignment
@ThreadSafety(level=COMPLETELY_THREADSAFE) public enum HorizontalAlignment
This enumeration defines a set of values that may indicate how text should be horizontally aligned.
Enum Constant Summary | |
---|---|
CENTER
Indicates that text should be aligned along their centers. |
|
LEFT
Indicates that items should be aligned along their left edges. |
|
RIGHT
Indicates that text should be aligned along right edges. |
Method Summary | |
---|---|
void |
format(java.lang.StringBuilder buffer,
java.lang.String text,
int width)
Appends the provided string to the given buffer, aligned properly within the specified width. |
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. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final HorizontalAlignment LEFT
public static final HorizontalAlignment CENTER
public static final HorizontalAlignment RIGHT
Method Detail |
---|
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 name
java.lang.NullPointerException
- if the argument is nullpublic void format(java.lang.StringBuilder buffer, java.lang.String text, int width)
width
characters (including spaces added to achieve
the desired alignment) to the provided buffer. If the given text is longer
than width
, then only the first width
characters of the
provided text will be appended.
buffer
- The buffer to which the formatted text should be appended.
It must not be null
.text
- The text to be added to the provided buffer, with
additional spaces as necessary to achieve the desired
width. It must not be null
.width
- The number of characters to append to the provided buffer.
It must be greater than or equal to 1.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |