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)
Constructs a new
SingleProjectionChoice. |
SingleProjectionChoice(String name,
String id,
String code,
String cacheDir)
Constructs a new
SingleProjectionChoice. |
| 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.
|
getCacheDir, getId, getProjection, toStringpublic SingleProjectionChoice(String name, String id, String code, String cacheDir)
SingleProjectionChoice.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)
SingleProjectionChoice.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"public JPanel getPreferencePanel(ActionListener listener)
ProjectionChoicelistener - listener for any change of preferencespublic String[] allCodes()
ProjectionChoicepublic void setPreferences(Collection<String> args)
ProjectionChoiceargs - preferences as a list of strings; may be null
to reset everything.public Collection<String> getPreferences(JPanel p)
ProjectionChoicep - projection preferences panelProjectionChoice.setPreferences(java.util.Collection<java.lang.String>)public Collection<String> getPreferencesFromCode(String code)
ProjectionChoicecode - projection codepublic String getCurrentCode()
getCurrentCode in class AbstractProjectionChoicepublic String getProjectionName()
getProjectionName in class AbstractProjectionChoice