|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<HorizontalAlignment>
net.sf.mmm.util.lang.api.HorizontalAlignment
public enum HorizontalAlignment
This enum represents a horizontal alignment (e.g. for
Justification).
The following table gives an example to illustrate the expected behavior of
according to an HorizontalAlignment.
| Alignment | Text |
|---|---|
LEFT |
Hello |
CENTER |
Hello |
RIGHT |
Hello |
| Enum Constant Summary | |
|---|---|
CENTER
Align content centered to the middle (same space to the left and the right). |
|
LEFT
Align content to the left side. |
|
RIGHT
Align content to the right side. |
|
| Field Summary | |
|---|---|
private String |
title
|
private String |
value
|
| Method Summary | |
|---|---|
static HorizontalAlignment |
fromValue(String value)
This method gets the HorizontalAlignment with the given
. |
String |
getTitle()
This method gets the title of this datatype. |
String |
getValue()
This method returns the raw value of this datatype. |
String |
toString()
This method needs to return the same result a Datatype.getTitle(). |
static HorizontalAlignment |
valueOf(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, 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 RIGHT
public static final HorizontalAlignment CENTER
| Field Detail |
|---|
private final String value
getValue()private final String title
getTitle()| Method Detail |
|---|
public static HorizontalAlignment[] values()
for (HorizontalAlignment c : HorizontalAlignment.values()) System.out.println(c);
public static HorizontalAlignment valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic String getValue()
java.lang datatype. In case of a composed datatype it
is also legal that this method returns the datatype instance itself.
getValue in interface Datatype<String>public String getTitle()
NlsMessage).Datatype.toString() is quite weak, this
method is added to explicitly express the presence of the title and to
ensure implementors of this interface can NOT miss to implement this.
getTitle in interface Datatype<String>Datatype.toString()public String toString()
Datatype.getTitle().
toString in interface Datatype<String>toString in class Enum<HorizontalAlignment>public static HorizontalAlignment fromValue(String value)
HorizontalAlignment with the given
value.
value - is the value of the requested
alignment.
alignment.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||