public class UTMProjectionChoice extends ListProjectionChoice
Modifier and Type | Class and Description |
---|---|
static class |
UTMProjectionChoice.Hemisphere
Earth emispheres
|
private class |
UTMProjectionChoice.UTMPanel |
ListProjectionChoice.CBPanel
Modifier and Type | Field and Description |
---|---|
private static java.util.List<java.lang.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 |
---|---|
java.lang.String[] |
allCodes()
Return all projection codes supported by this projection choice.
|
java.lang.String |
getCurrentCode() |
javax.swing.JPanel |
getPreferencePanel(java.awt.event.ActionListener listener)
Generate and provide the GUI.
|
java.util.Collection<java.lang.String> |
getPreferences(javax.swing.JPanel panel)
Extract preferences from the GUI.
|
java.util.Collection<java.lang.String> |
getPreferencesFromCode(java.lang.String code)
Get Preferences from projection code.
|
java.lang.String |
getProjectionName() |
protected java.lang.String |
indexToZone(int idx)
Convert 0-based index to preference value.
|
void |
setPreferences(java.util.Collection<java.lang.String> args)
Set the internal state to match the preferences.
|
protected int |
zoneToIndex(java.lang.String zone)
Convert preference value to 0-based index.
|
getCacheDir, getId, getProjection, toString
private static final UTMProjectionChoice.Hemisphere DEFAULT_HEMISPHERE
private UTMProjectionChoice.Hemisphere hemisphere
private static final java.util.List<java.lang.String> cbEntries
public UTMProjectionChoice()
UTMProjectionChoice
.public javax.swing.JPanel getPreferencePanel(java.awt.event.ActionListener listener)
ProjectionChoice
getPreferencePanel
in interface ProjectionChoice
getPreferencePanel
in class ListProjectionChoice
listener
- listener for any change of preferencespublic java.lang.String getCurrentCode()
getCurrentCode
in class AbstractProjectionChoice
public java.lang.String getProjectionName()
getProjectionName
in class AbstractProjectionChoice
public java.util.Collection<java.lang.String> getPreferences(javax.swing.JPanel panel)
ProjectionChoice
getPreferences
in interface ProjectionChoice
getPreferences
in class ListProjectionChoice
public java.lang.String[] allCodes()
ProjectionChoice
public java.util.Collection<java.lang.String> getPreferencesFromCode(java.lang.String code)
ProjectionChoice
code
- projection codepublic void setPreferences(java.util.Collection<java.lang.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 java.lang.String indexToZone(int idx)
ListProjectionChoice
indexToZone
in class ListProjectionChoice
protected int zoneToIndex(java.lang.String zone)
ListProjectionChoice
zoneToIndex
in class ListProjectionChoice