Class AbstractProjectionChoice
java.lang.Object
org.openstreetmap.josm.gui.preferences.projection.AbstractProjectionChoice
- All Implemented Interfaces:
ProjectionChoice
- Direct Known Subclasses:
CodeProjectionChoice,CustomProjectionChoice,ListProjectionChoice,SingleProjectionChoice
Super class for ProjectionChoice implementations.
Handles common parameters name and id.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractProjectionChoice(String name, String id) Constructs a newAbstractProjectionChoice. -
Method Summary
Modifier and TypeMethodDescriptionabstract StringReturns current projection code.getId()Get a unique id for the projection choice.Get the projection that matches the internal state.abstract StringReturns projection name.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, waitMethods inherited from interface org.openstreetmap.josm.gui.preferences.projection.ProjectionChoice
allCodes, getPreferencePanel, getPreferences, getPreferencesFromCode, setPreferences
-
Field Details
-
name
-
id
-
-
Constructor Details
-
AbstractProjectionChoice
Constructs a newAbstractProjectionChoice.- Parameters:
name- short name of the projection choice as shown in the GUIid- unique identifier for the projection choice
-
-
Method Details
-
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
Description copied from interface:ProjectionChoiceShort name of the projection choice as shown in the GUI (combo box).- Specified by:
toStringin interfaceProjectionChoice- Overrides:
toStringin classObject- Returns:
- the name
-
getCurrentCode
Returns current projection code.- Returns:
- current projection code
-
getProjectionName
Returns projection name.- Returns:
- projection name
-
getProjection
Description copied from interface:ProjectionChoiceGet the projection that matches the internal state.- Specified by:
getProjectionin interfaceProjectionChoice- Returns:
- the effective projection
-