org.openstreetmap.josm.gui.preferences.projection
Class AbstractProjectionChoice
java.lang.Object
org.openstreetmap.josm.gui.preferences.projection.AbstractProjectionChoice
- All Implemented Interfaces:
- ProjectionChoice
- Direct Known Subclasses:
- CustomProjectionChoice, ListProjectionChoice, SingleProjectionChoice
public abstract class AbstractProjectionChoice
- extends java.lang.Object
- implements ProjectionChoice
Field Summary |
protected java.lang.String |
cacheDir
|
protected java.lang.String |
id
|
protected java.lang.String |
name
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
name
protected java.lang.String name
id
protected java.lang.String id
cacheDir
protected java.lang.String cacheDir
AbstractProjectionChoice
public AbstractProjectionChoice(java.lang.String name,
java.lang.String id,
java.lang.String cacheDir)
- Constructor.
- Parameters:
name
- short name of the projection choice as shown in the GUIid
- unique identifier for the projection choicecacheDir
- a cache directory name
AbstractProjectionChoice
public AbstractProjectionChoice(java.lang.String name,
java.lang.String id)
- Constructor (without cacheDir argument).
Only for core projection choices, where chacheDir is the same as
the second part of the id.
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 interface ProjectionChoice
- Returns:
- the string identifier
getCacheDir
public java.lang.String getCacheDir()
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 interface ProjectionChoice
- Overrides:
toString
in class java.lang.Object
- Returns:
- the name
getCurrentCode
public abstract java.lang.String getCurrentCode()
getProjectionName
public abstract java.lang.String getProjectionName()
getProjection
public Projection getProjection()
- Description copied from interface:
ProjectionChoice
- Get the projection that matches the internal state.
- Specified by:
getProjection
in interface ProjectionChoice
JOSM