Enum HAlign
- java.lang.Object
-
- java.lang.Enum<HAlign>
-
- net.sourceforge.jeuclid.elements.support.attributes.HAlign
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringALIGN_CENTERconstant for center align.static java.lang.StringALIGN_RIGHTconstant for right align.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description floatgetHAlignOffset(LayoutStage stage, LayoutInfo info, float width)Retrieve H-Align offset.static HAlignparseString(java.lang.String alignString, HAlign defaultt)Parse an Alignment String.static HAlignvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static HAlign[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Field Detail
-
ALIGN_CENTER
public static final java.lang.String ALIGN_CENTER
constant for center align.- See Also:
- Constant Field Values
-
ALIGN_RIGHT
public static final java.lang.String ALIGN_RIGHT
constant for right align.- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static HAlign[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (HAlign c : HAlign.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HAlign valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
parseString
public static HAlign parseString(java.lang.String alignString, HAlign defaultt)
Parse an Alignment String.- Parameters:
alignString- String to parse.defaultt- default value.- Returns:
- a HAlign value.
-
getHAlignOffset
public float getHAlignOffset(LayoutStage stage, LayoutInfo info, float width)
Retrieve H-Align offset.- Parameters:
stage- current Layout Stageinfo- Info object to examinewidth- Total width- Returns:
- Alignment offset to add to left.
-
-