Class CoordinateFormatManager
- java.lang.Object
-
- org.openstreetmap.josm.data.coor.conversion.CoordinateFormatManager
-
public final class CoordinateFormatManager extends java.lang.Object
Class that manages the available coordinate formats.- Since:
- 12735
-
-
Field Summary
Fields Modifier and Type Field Description private static ICoordinateFormatdefaultCoordinateFormatprivate static java.util.List<ICoordinateFormat>formats
-
Constructor Summary
Constructors Modifier Constructor Description privateCoordinateFormatManager()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ICoordinateFormatgetCoordinateFormat(java.lang.String id)Get registered coordinate format by idstatic java.util.List<ICoordinateFormat>getCoordinateFormats()Get the list of all registered coordinate formats.static ICoordinateFormatgetDefaultFormat()Replies the default coordinate format to be usestatic voidregisterCoordinateFormat(ICoordinateFormat format)Register a coordinate format.static voidsetCoordinateFormat(ICoordinateFormat format)Sets the default coordinate format
-
-
-
Field Detail
-
formats
private static final java.util.List<ICoordinateFormat> formats
-
defaultCoordinateFormat
private static volatile ICoordinateFormat defaultCoordinateFormat
-
-
Constructor Detail
-
CoordinateFormatManager
private CoordinateFormatManager()
-
-
Method Detail
-
registerCoordinateFormat
public static void registerCoordinateFormat(ICoordinateFormat format)
Register a coordinate format.It will be available as a choice in the preferences.
- Parameters:
format- the coordinate format
-
getCoordinateFormats
public static java.util.List<ICoordinateFormat> getCoordinateFormats()
Get the list of all registered coordinate formats.- Returns:
- the list of all registered coordinate formats
-
getDefaultFormat
public static ICoordinateFormat getDefaultFormat()
Replies the default coordinate format to be use- Returns:
- the default coordinate format
-
setCoordinateFormat
public static void setCoordinateFormat(ICoordinateFormat format)
Sets the default coordinate format- Parameters:
format- the default coordinate format
-
getCoordinateFormat
public static ICoordinateFormat getCoordinateFormat(java.lang.String id)
Get registered coordinate format by id- Parameters:
id- id of the coordinate format to get- Returns:
- the registered
ICoordinateFormatwith given id, ornullif no match is found
-
-