com.partnersoft.maps.rover
Enum RoverAlignment

java.lang.Object
  extended by java.lang.Enum<RoverAlignment>
      extended by com.partnersoft.maps.rover.RoverAlignment
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<RoverAlignment>

public enum RoverAlignment
extends java.lang.Enum<RoverAlignment>

Alignments as used in Rover, especially for text placement and justification.

Note that "fit" is currently ill-defined and -implemented in rover rendering. It is largely there for future use and since there was bit space for it.

Copyright 2008 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Enum Constant Summary
BOTTOM_CENTER
          Bottom-center, or south, alignment code.
BOTTOM_FIT
          Bottom-fit alignment code.
BOTTOM_LEFT
          Bottom-left, or southwest, alignment.
BOTTOM_RIGHT
          Bottom-right, or southeast, alignment code.
CENTER
          Alignment centered in both dimensions.
CENTER_FIT
          Centered in X, fit in Y.
CENTER_LEFT
          Center-left, or west, alignment code.
CENTER_RIGHT
          Center-right, or east, alignment code.
FIT
          Alignment stretched to fit or justified in both dimensions.
FIT_CENTER
          Fit in X, center in Y.
FIT_LEFT
          Left-fit alignment code.
FIT_RIGHT
          Right-fit alignment code.
TOP_CENTER
          Top-center, or north, alignment code.
TOP_FIT
          Top-fit alignment code.
TOP_LEFT
          Top-left, or northwest, alignment code.
TOP_RIGHT
          Top-right, or northeast, alignment code.
 
Method Summary
static RoverAlignment forCode(byte alignmentCode)
          Returns the RoverAlignment with the given alignment code.
static RoverAlignment forName(java.lang.String name)
          Returns the RoverAlignment with the given name.
 byte getCode()
          The one-byte code for this alignment.
 byte getHorizontalCode()
          The half-byte code corresponding to alignment along the X axis.
 java.lang.String getName()
          The name of this alignment.
 byte getVerticalCode()
          The half-byte code corresponding to alignment along the Y axis.
static java.util.List<java.lang.String> listAlignmentNames()
           
static RoverAlignment valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static RoverAlignment[] 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

CENTER

public static final RoverAlignment CENTER
Alignment centered in both dimensions.


FIT

public static final RoverAlignment FIT
Alignment stretched to fit or justified in both dimensions.


BOTTOM_LEFT

public static final RoverAlignment BOTTOM_LEFT
Bottom-left, or southwest, alignment.


CENTER_LEFT

public static final RoverAlignment CENTER_LEFT
Center-left, or west, alignment code.


TOP_LEFT

public static final RoverAlignment TOP_LEFT
Top-left, or northwest, alignment code.


BOTTOM_RIGHT

public static final RoverAlignment BOTTOM_RIGHT
Bottom-right, or southeast, alignment code.


CENTER_RIGHT

public static final RoverAlignment CENTER_RIGHT
Center-right, or east, alignment code.


TOP_RIGHT

public static final RoverAlignment TOP_RIGHT
Top-right, or northeast, alignment code.


BOTTOM_CENTER

public static final RoverAlignment BOTTOM_CENTER
Bottom-center, or south, alignment code.


TOP_CENTER

public static final RoverAlignment TOP_CENTER
Top-center, or north, alignment code.


BOTTOM_FIT

public static final RoverAlignment BOTTOM_FIT
Bottom-fit alignment code.


TOP_FIT

public static final RoverAlignment TOP_FIT
Top-fit alignment code.


FIT_LEFT

public static final RoverAlignment FIT_LEFT
Left-fit alignment code.


FIT_RIGHT

public static final RoverAlignment FIT_RIGHT
Right-fit alignment code.


CENTER_FIT

public static final RoverAlignment CENTER_FIT
Centered in X, fit in Y.


FIT_CENTER

public static final RoverAlignment FIT_CENTER
Fit in X, center in Y.

Method Detail

values

public static RoverAlignment[] 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 (RoverAlignment c : RoverAlignment.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static RoverAlignment 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 name
java.lang.NullPointerException - if the argument is null

forName

public static RoverAlignment forName(java.lang.String name)
Returns the RoverAlignment with the given name.


forCode

public static RoverAlignment forCode(byte alignmentCode)
Returns the RoverAlignment with the given alignment code.


listAlignmentNames

public static java.util.List<java.lang.String> listAlignmentNames()

getName

public java.lang.String getName()
The name of this alignment.


getCode

public byte getCode()
The one-byte code for this alignment.


getHorizontalCode

public byte getHorizontalCode()
The half-byte code corresponding to alignment along the X axis.

Returns:
horizontal alignment code

getVerticalCode

public byte getVerticalCode()
The half-byte code corresponding to alignment along the Y axis.

Returns:
vertical alignment code