sharkysoft.com

com.sharkysoft.printf.engine
Class AlignmentMode

java.lang.Object
  extended bycom.sharkysoft.util.EnumeratedType
      extended bycom.sharkysoft.printf.engine.AlignmentMode
All Implemented Interfaces:
java.lang.Comparable

public final class AlignmentMode
extends com.sharkysoft.util.EnumeratedType

Text justification styles.

Details: AlignmentMode is an enumeration of alignment modes supported by StringFormatter. When the text is shorter than the field into which it is being rendered, it may be justified against the left edge of the field, the right edge of the field, or both. The text may also be centered. This class represents each of the alignment modes with both ints and type-safe object values.

Author:
Sharky
See Also:
StringFormatter

Field Summary
static int CENTER
          Centered alignment.
static int FULL
          Full justification.
static AlignmentMode gpCenter
          Centered alignment.
static AlignmentMode gpFull
          Full justification.
static AlignmentMode gpLeft
          Left-alignment.
static AlignmentMode gpRight
          Right-alignment.
static int LEFT
          Left-alignment.
static int RIGHT
          Right-alignment.
 
Method Summary
static AlignmentMode forInt(int inValue)
          Converts int value to object value.
 
Methods inherited from class com.sharkysoft.util.EnumeratedType
compareTo, toEnumeratedType, toInt, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LEFT

public static final int LEFT
Left-alignment.

Details: LEFT indicates that text is left-aligned in the field.

See Also:
gpLeft, Constant Field Values

gpLeft

public static final AlignmentMode gpLeft
Left-alignment.

Details: gpLeft is a type-safe representation of LEFT.

See Also:
LEFT

CENTER

public static final int CENTER
Centered alignment.

Details: CENTER indicates that text is centered in the field.

See Also:
gpCenter, Constant Field Values

gpCenter

public static final AlignmentMode gpCenter
Centered alignment.

Details: gpCenter is a type-safe representation of CENTER.

See Also:
CENTER

RIGHT

public static final int RIGHT
Right-alignment.

Details: RIGHT indicates that text is right-aligned in the field.

See Also:
gpRight, Constant Field Values

gpRight

public static final AlignmentMode gpRight
Right-alignment.

Details: gpRight is a type-safe representation of RIGHT.

See Also:
RIGHT

FULL

public static final int FULL
Full justification.

Details: FULL indicates that text is fully justified in the field. Fully justified text is aligned to both the left and right sides of the field. It may be necessary to insert spaces into the text in order to make it the same width as the field.

See Also:
gpFull, Constant Field Values

gpFull

public static final AlignmentMode gpFull
Full justification.

Details: gpFull is a type-safe representation of FULL.

See Also:
FULL
Method Detail

forInt

public static AlignmentMode forInt(int inValue)
Converts int value to object value.

Details: forInt returns the type-safe object value corresponding to the given int value.

Parameters:
inValue - int value
Returns:
type-safe object value

sharkysoft.com

Copyright © 1997-2004 Sharkysoft (sharkysoft.com). All rights reserved.