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
nameandid.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractProjectionChoice(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.StringgetCurrentCode()Returns current projection code.java.lang.StringgetId()Get a unique id for the projection choice.ProjectiongetProjection()Get the projection that matches the internal state.abstract java.lang.StringgetProjectionName()Returns projection name.java.lang.StringtoString()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:ProjectionChoiceGet a unique id for the projection choice. Will be used to save the user selection to the preference file.- Specified by:
getIdin interfaceProjectionChoice- Returns:
- the string identifier
-
toString
public java.lang.String toString()
Description copied from interface:ProjectionChoiceShort name of the projection choice as shown in the GUI (combo box).- Specified by:
toStringin interfaceProjectionChoice- Overrides:
toStringin 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:ProjectionChoiceGet the projection that matches the internal state.- Specified by:
getProjectionin interfaceProjectionChoice- Returns:
- the effective projection
-
-