Class AbstractCoordinateFormat
- java.lang.Object
-
- org.openstreetmap.josm.data.coor.conversion.AbstractCoordinateFormat
-
- All Implemented Interfaces:
ICoordinateFormat
- Direct Known Subclasses:
DecimalDegreesCoordinateFormat,DMSCoordinateFormat,NauticalCoordinateFormat,ProjectedCoordinateFormat
public abstract class AbstractCoordinateFormat extends java.lang.Object implements ICoordinateFormat
Abstract base class forICoordinateFormatimplementations.- Since:
- 12735
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.text.DecimalFormatcDdFormatterThe normal number format for server precision coordinatesprotected java.lang.StringdisplayNameprotected static java.lang.StringEASTCharacter denoting East, as stringprotected java.lang.Stringidprotected static java.lang.StringNORTHCharacter denoting North, as stringprotected static java.lang.StringSOUTHCharacter denoting South, as stringprotected static java.lang.StringWESTCharacter denoting West, as string
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractCoordinateFormat(java.lang.String id, java.lang.String displayName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDisplayName()Get display name for this coordinate formatjava.lang.StringgetId()Get unique id for this coordinate format.static java.text.DecimalFormatnewUnlocalizedDecimalFormat(java.lang.String pattern)Creates a new unlocalizedDecimalFormat.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openstreetmap.josm.data.coor.conversion.ICoordinateFormat
latToString, lonToString, toString
-
-
-
-
Field Detail
-
id
protected final java.lang.String id
-
displayName
protected final java.lang.String displayName
-
cDdFormatter
protected static final java.text.DecimalFormat cDdFormatter
The normal number format for server precision coordinates
-
SOUTH
protected static final java.lang.String SOUTH
Character denoting South, as string
-
NORTH
protected static final java.lang.String NORTH
Character denoting North, as string
-
WEST
protected static final java.lang.String WEST
Character denoting West, as string
-
EAST
protected static final java.lang.String EAST
Character denoting East, as string
-
-
Constructor Detail
-
AbstractCoordinateFormat
protected AbstractCoordinateFormat(java.lang.String id, java.lang.String displayName)
-
-
Method Detail
-
newUnlocalizedDecimalFormat
public static java.text.DecimalFormat newUnlocalizedDecimalFormat(java.lang.String pattern)
Creates a new unlocalizedDecimalFormat. By not using the localized decimal separator, we can present a comma separated list of coordinates.- Parameters:
pattern- decimal format pattern- Returns:
DecimalFormatusing dot as decimal separator- Since:
- 14203
- See Also:
DecimalFormat.applyPattern(String)
-
getId
public java.lang.String getId()
Description copied from interface:ICoordinateFormatGet unique id for this coordinate format.- Specified by:
getIdin interfaceICoordinateFormat- Returns:
- unique id
-
getDisplayName
public java.lang.String getDisplayName()
Description copied from interface:ICoordinateFormatGet display name for this coordinate format- Specified by:
getDisplayNamein interfaceICoordinateFormat- Returns:
- display name (localized)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-