public class SingleProjectionChoice extends AbstractProjectionChoice
Modifier and Type | Field and Description |
---|---|
protected String |
code |
cacheDir, id, name
Constructor and Description |
---|
SingleProjectionChoice(String name,
String id,
String code) |
SingleProjectionChoice(String name,
String id,
String code,
String cacheDir)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String[] |
allCodes()
Return all projection codes supported by this projection choice.
|
String |
getCurrentCode() |
JPanel |
getPreferencePanel(ActionListener listener)
Generate and provide the GUI.
|
Collection<String> |
getPreferences(JPanel p)
Extract preferences from the GUI.
|
Collection<String> |
getPreferencesFromCode(String code)
Get Preferences from projection code.
|
String |
getProjectionName() |
void |
setPreferences(Collection<String> args)
Set the internal state to match the preferences.
|
String |
toString()
Short name of the projection choice as shown in the GUI (combo box).
|
getCacheDir, getId, getProjection
public SingleProjectionChoice(String name, String id, String code, String cacheDir)
name
- short name of the projection choice as shown in the GUIid
- unique identifier for the projection choice, e.g. "core:thisproj"code
- the unique identifier for the projection, e.g. "EPSG:1234"cacheDir
- a cache directory namepublic SingleProjectionChoice(String name, String id, String code)
public JPanel getPreferencePanel(ActionListener listener)
ProjectionChoice
listener
- listener for any change of preferencespublic String[] allCodes()
ProjectionChoice
public void setPreferences(Collection<String> args)
ProjectionChoice
args
- preferences as a list of strings; may be null
to reset everything.public Collection<String> getPreferences(JPanel p)
ProjectionChoice
public String toString()
ProjectionChoice
toString
in interface ProjectionChoice
toString
in class AbstractProjectionChoice
public Collection<String> getPreferencesFromCode(String code)
ProjectionChoice
public String getCurrentCode()
getCurrentCode
in class AbstractProjectionChoice
public String getProjectionName()
getProjectionName
in class AbstractProjectionChoice