public class UTMProjectionChoice extends ListProjectionChoice
Modifier and Type | Class and Description |
---|---|
static class |
UTMProjectionChoice.Hemisphere |
private class |
UTMProjectionChoice.UTMPanel |
ListProjectionChoice.CBPanel
Modifier and Type | Field and Description |
---|---|
private static List<String> |
cbEntries |
private static UTMProjectionChoice.Hemisphere |
DEFAULT_HEMISPHERE |
private UTMProjectionChoice.Hemisphere |
hemisphere |
defaultIndex, entries, index, label
cacheDir, id, name
Constructor and Description |
---|
UTMProjectionChoice()
Constructs a new
UTMProjectionChoice . |
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 panel)
Extract preferences from the GUI.
|
Collection<String> |
getPreferencesFromCode(String code)
Get Preferences from projection code.
|
String |
getProjectionName() |
protected String |
indexToZone(int index)
Convert 0-based index to preference value.
|
void |
setPreferences(Collection<String> args)
Set the internal state to match the preferences.
|
protected int |
zoneToIndex(String zone)
Convert preference value to 0-based index.
|
getCacheDir, getId, getProjection, toString
private static final UTMProjectionChoice.Hemisphere DEFAULT_HEMISPHERE
private UTMProjectionChoice.Hemisphere hemisphere
public UTMProjectionChoice()
UTMProjectionChoice
.public JPanel getPreferencePanel(ActionListener listener)
ProjectionChoice
getPreferencePanel
in interface ProjectionChoice
getPreferencePanel
in class ListProjectionChoice
listener
- listener for any change of preferencespublic String getCurrentCode()
getCurrentCode
in class AbstractProjectionChoice
public String getProjectionName()
getProjectionName
in class AbstractProjectionChoice
public Collection<String> getPreferences(JPanel panel)
ProjectionChoice
getPreferences
in interface ProjectionChoice
getPreferences
in class ListProjectionChoice
public String[] allCodes()
ProjectionChoice
public Collection<String> getPreferencesFromCode(String code)
ProjectionChoice
public void setPreferences(Collection<String> args)
ProjectionChoice
setPreferences
in interface ProjectionChoice
setPreferences
in class ListProjectionChoice
args
- preferences as a list of strings; may be null
to reset everything.protected String indexToZone(int index)
ListProjectionChoice
indexToZone
in class ListProjectionChoice
protected int zoneToIndex(String zone)
ListProjectionChoice
zoneToIndex
in class ListProjectionChoice