Class AbstractProjectionChoice
- java.lang.Object
-
- org.openstreetmap.josm.gui.preferences.projection.AbstractProjectionChoice
-
- All Implemented Interfaces:
ProjectionChoice
- Direct Known Subclasses:
CodeProjectionChoice
,CustomProjectionChoice
,ListProjectionChoice
,SingleProjectionChoice
public abstract class AbstractProjectionChoice extends java.lang.Object implements ProjectionChoice
Super class for ProjectionChoice implementations.Handles common parameters
name
andid
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractProjectionChoice(java.lang.String name, java.lang.String id)
Constructs a newAbstractProjectionChoice
.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.String
getCurrentCode()
Returns current projection code.java.lang.String
getId()
Get a unique id for the projection choice.Projection
getProjection()
Get the projection that matches the internal state.abstract java.lang.String
getProjectionName()
Returns projection name.java.lang.String
toString()
Short name of the projection choice as shown in the GUI (combo box).-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openstreetmap.josm.gui.preferences.projection.ProjectionChoice
allCodes, getPreferencePanel, getPreferences, getPreferencesFromCode, setPreferences
-
-
-
-
Constructor Detail
-
AbstractProjectionChoice
protected AbstractProjectionChoice(java.lang.String name, java.lang.String id)
Constructs a newAbstractProjectionChoice
.- Parameters:
name
- short name of the projection choice as shown in the GUIid
- unique identifier for the projection choice
-
-
Method Detail
-
getId
public java.lang.String getId()
Description copied from interface:ProjectionChoice
Get a unique id for the projection choice. Will be used to save the user selection to the preference file.- Specified by:
getId
in interfaceProjectionChoice
- Returns:
- the string identifier
-
toString
public java.lang.String toString()
Description copied from interface:ProjectionChoice
Short name of the projection choice as shown in the GUI (combo box).- Specified by:
toString
in interfaceProjectionChoice
- Overrides:
toString
in classjava.lang.Object
- Returns:
- the name
-
getCurrentCode
public abstract java.lang.String getCurrentCode()
Returns current projection code.- Returns:
- current projection code
-
getProjectionName
public abstract java.lang.String getProjectionName()
Returns projection name.- Returns:
- projection name
-
getProjection
public Projection getProjection()
Description copied from interface:ProjectionChoice
Get the projection that matches the internal state.- Specified by:
getProjection
in interfaceProjectionChoice
- Returns:
- the effective projection
-
-