org.formaria.swing
Class AlignmentHelper

java.lang.Object
  extended by org.formaria.swing.AlignmentHelper

public class AlignmentHelper
extends java.lang.Object

A utility class to help in setting alignment options

Copyright: Copyright (c) Formaria Ltd., 2008


Field Summary
static int[] alignmentOptionIds
          The constants associated with each alignment
static java.lang.String[] alignmentOptions
          Left, Right, Center, Leading, Trailing
 
Constructor Summary
AlignmentHelper()
          Construct a new helper
 
Method Summary
static java.lang.String getAlignmentOption(int value)
          Get the name/text of an alignment
static int getAlignmentOption(java.lang.String value)
          Get the alignment option value
static java.lang.String getVerticalAlignmentOption(int value)
          Get the name/text of a vertical alignment
static int getVerticalAlignmentOption(java.lang.String value)
          Get the vertical alignment option value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

alignmentOptions

public static final java.lang.String[] alignmentOptions
Left, Right, Center, Leading, Trailing


alignmentOptionIds

public static final int[] alignmentOptionIds
The constants associated with each alignment

Constructor Detail

AlignmentHelper

public AlignmentHelper()
Construct a new helper

Method Detail

getAlignmentOption

public static int getAlignmentOption(java.lang.String value)
Get the alignment option value

Parameters:
value - the alignment name
Returns:
the alignment ID

getAlignmentOption

public static java.lang.String getAlignmentOption(int value)
Get the name/text of an alignment

Parameters:
value - the alignment value
Returns:
alignment name

getVerticalAlignmentOption

public static int getVerticalAlignmentOption(java.lang.String value)
Get the vertical alignment option value

Parameters:
value - the alignment name
Returns:
the alignment ID

getVerticalAlignmentOption

public static java.lang.String getVerticalAlignmentOption(int value)
Get the name/text of a vertical alignment

Parameters:
value - the alignment value
Returns:
alignment name