net.sourceforge.jeuclid.elements.support.attributes
Enum HAlign

java.lang.Object
  extended by java.lang.Enum<HAlign>
      extended by net.sourceforge.jeuclid.elements.support.attributes.HAlign
All Implemented Interfaces:
Serializable, Comparable<HAlign>

public enum HAlign
extends Enum<HAlign>

Version:
$Revision: 8afef6dd0d58 $

Enum Constant Summary
CENTER
          Center align.
LEFT
          Left align.
RIGHT
          Right align.
 
Field Summary
static String ALIGN_CENTER
          constant for center align.
static String ALIGN_RIGHT
          constant for right align.
 
Method Summary
 float getHAlignOffset(LayoutStage stage, LayoutInfo info, float width)
          Retrieve H-Align offset.
static HAlign parseString(String alignString, HAlign defaultt)
          Parse an Alignment String.
static HAlign valueOf(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.
 
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

LEFT

public static final HAlign LEFT
Left align.


CENTER

public static final HAlign CENTER
Center align.


RIGHT

public static final HAlign RIGHT
Right align.

Field Detail

ALIGN_CENTER

public static final String ALIGN_CENTER
constant for center align.

See Also:
Constant Field Values

ALIGN_RIGHT

public static final 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(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

parseString

public static HAlign parseString(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 Stage
info - Info object to examine
width - Total width
Returns:
Alignment offset to add to left.


Copyright © 2002-2010 The JEuclid project. All Rights Reserved.