us.zuercher.gpx2map.plotter.label
Enum VerticalPosition

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

public enum VerticalPosition
extends Enum<VerticalPosition>

VerticalPosition is an enumeration representing the three vertical positions of a label relative to the label's marker. These are above, centered, and below.

Author:
Stephan Zuercher

Enum Constant Summary
ABOVE
          Label above marker.
BELOW
          Label below marker.
CENTERED
          Label centered left or 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 vertical position as an integer in the set [-1, 0, 1].
static VerticalPosition valueOf(String name)
          Returns the enum constant of this type with the specified name.
static VerticalPosition[] 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

ABOVE

public static final VerticalPosition ABOVE
Label above marker.


CENTERED

public static final VerticalPosition CENTERED
Label centered left or right of marker.


BELOW

public static final VerticalPosition BELOW
Label below 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 VerticalPosition[] 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(VerticalPosition c : VerticalPosition.values())
        System.out.println(c);

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

valueOf

public static VerticalPosition 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 vertical position as an integer in the set [-1, 0, 1].

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