us.zuercher.gpx2map.plotter.label
Enum LabelPosition

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

public enum LabelPosition
extends Enum<LabelPosition>

LabelPosition is an enumeration of the possible positions of a label relative to its marker. These are nine the combinations of VerticalPosition and HorizontalPosition minus centered/centered which would place the label directly on the marker. In other words, the positions are: above left, above centered, above right, centered right, below right, below centered, below left, and centered left.

Author:
Stephan Zuercher

Enum Constant Summary
ABOVE_CENTERED
          Label centered above the marker.
ABOVE_LEFT
          Label above and left of the marker.
ABOVE_RIGHT
          Label above and right of the marker.
BELOW_CENTERED
          Label centered below the marker.
BELOW_LEFT
          Label below and left of the marker.
BELOW_RIGHT
          Label below and right of the marker.
CENTERED_LEFT
          Label centered to the right of the marker.
CENTERED_RIGHT
          Label centered to the right of the marker.
 
Field Summary
private  HorizontalPosition horizontal
          The HorizontalPosition of this LabelPosition.
private static LabelPosition[] PREFERRED_ORDER
          Ordered array of preferred label positions.
private  VerticalPosition vertical
          The VerticalPosition of this LabelPosition.
 
Method Summary
 HorizontalPosition getHorizontalPosition()
          Returns the horizontal position of this label position.
static LabelPosition[] getPreferredOrder()
          Returns the ordered array of preferred label positions.
 VerticalPosition getVerticalPosition()
          Returns the vertical position of this label position.
static LabelPosition valueOf(String name)
          Returns the enum constant of this type with the specified name.
static LabelPosition[] 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_LEFT

public static final LabelPosition ABOVE_LEFT
Label above and left of the marker.


ABOVE_CENTERED

public static final LabelPosition ABOVE_CENTERED
Label centered above the marker.


ABOVE_RIGHT

public static final LabelPosition ABOVE_RIGHT
Label above and right of the marker.


CENTERED_RIGHT

public static final LabelPosition CENTERED_RIGHT
Label centered to the right of the marker.


BELOW_RIGHT

public static final LabelPosition BELOW_RIGHT
Label below and right of the marker.


BELOW_CENTERED

public static final LabelPosition BELOW_CENTERED
Label centered below the marker.


BELOW_LEFT

public static final LabelPosition BELOW_LEFT
Label below and left of the marker.


CENTERED_LEFT

public static final LabelPosition CENTERED_LEFT
Label centered to the right of the marker.

Field Detail

PREFERRED_ORDER

private static final LabelPosition[] PREFERRED_ORDER
Ordered array of preferred label positions.


vertical

private final VerticalPosition vertical
The VerticalPosition of this LabelPosition.


horizontal

private final HorizontalPosition horizontal
The HorizontalPosition of this LabelPosition.

Method Detail

values

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

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

valueOf

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

getPreferredOrder

public static LabelPosition[] getPreferredOrder()
Returns the ordered array of preferred label positions.

Returns:
the ordered array of preferred label positions.

getVerticalPosition

public VerticalPosition getVerticalPosition()
Returns the vertical position of this label position.

Returns:
the vertical position of this label position.

getHorizontalPosition

public HorizontalPosition getHorizontalPosition()
Returns the horizontal position of this label position.

Returns:
the horizontal position of this label position.