org.openstreetmap.josm.data.coor
Enum CoordinateFormat

java.lang.Object
  extended by java.lang.Enum<CoordinateFormat>
      extended by org.openstreetmap.josm.data.coor.CoordinateFormat
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<CoordinateFormat>

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

An enumeration of coordinate formats


Enum Constant Summary
DECIMAL_DEGREES
          the decimal format 999.999
DEGREES_MINUTES_SECONDS
          the degrees/minutes/seconds format 9 deg 99 min 99 sec
EAST_NORTH
          coordinates East/North
NAUTICAL
          the nautical format
 
Field Summary
private static CoordinateFormat defaultCoordinateFormat
           
private  java.lang.String displayName
           
 
Method Summary
static CoordinateFormat getDefaultFormat()
          Replies the default coordinate format to be use
 java.lang.String getDisplayName()
          Replies the display name of the format
static void setCoordinateFormat(CoordinateFormat format)
          Sets the default coordinate format
 java.lang.String toString()
           
static CoordinateFormat valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static CoordinateFormat[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DECIMAL_DEGREES

public static final CoordinateFormat DECIMAL_DEGREES
the decimal format 999.999


DEGREES_MINUTES_SECONDS

public static final CoordinateFormat DEGREES_MINUTES_SECONDS
the degrees/minutes/seconds format 9 deg 99 min 99 sec


NAUTICAL

public static final CoordinateFormat NAUTICAL
the nautical format


EAST_NORTH

public static final CoordinateFormat EAST_NORTH
coordinates East/North

Field Detail

displayName

private java.lang.String displayName

defaultCoordinateFormat

private static CoordinateFormat defaultCoordinateFormat
Method Detail

values

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

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

valueOf

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

getDisplayName

public java.lang.String getDisplayName()
Replies the display name of the format

Returns:
the display name

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<CoordinateFormat>

getDefaultFormat

public static CoordinateFormat getDefaultFormat()
Replies the default coordinate format to be use

Returns:
the default coordinate format

setCoordinateFormat

public static void setCoordinateFormat(CoordinateFormat format)
Sets the default coordinate format

Parameters:
format - the default coordinate format


JOSM