us.zuercher.gpx2map.plotter.label
Enum HorizontalPosition

java.lang.Object
  extended by java.lang.Enum<HorizontalPosition>
      extended by us.zuercher.gpx2map.plotter.label.HorizontalPosition
All Implemented Interfaces:
Serializable, Comparable<HorizontalPosition>

public enum HorizontalPosition
extends Enum<HorizontalPosition>

HorizonalPosition is an enumeration representing the three horizontal positions of a label relative to the label's marker. These are left, centered, and right.

Author:
Stephan Zuercher

Enum Constant Summary
CENTERED
          Label centered above or below marker.
LEFT
          Label left of marker.
RIGHT
          Label right of marker.
 
Field Summary
private  int relPos
          Relative position as a signed integer in the set [-1, 0, 1].
 
Method Summary
 int getRelativePosition()
          Return the relative position of this horizonal position as an integer in the set [-1, 0, 1].
static HorizontalPosition valueOf(String name)
          Returns the enum constant of this type with the specified name.
static HorizontalPosition[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LEFT

public static final HorizontalPosition LEFT
Label left of marker.


CENTERED

public static final HorizontalPosition CENTERED
Label centered above or below marker.


RIGHT

public static final HorizontalPosition RIGHT
Label right of marker.

Field Detail

relPos

private final int relPos
Relative position as a signed integer in the set [-1, 0, 1].

Method Detail

values

public static final HorizontalPosition[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(HorizontalPosition c : HorizontalPosition.values())
        System.out.println(c);

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

valueOf

public static HorizontalPosition 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

getRelativePosition

public int getRelativePosition()
Return the relative position of this horizonal position as an integer in the set [-1, 0, 1].

Returns:
the relative position of this horizonal position as an integer in the set [-1, 0, 1].