public class UTMProjectionChoice extends ListProjectionChoice
| Modifier and Type | Class and Description |
|---|---|
private class |
UTMProjectionChoice.UTMPanel |
ListProjectionChoice.CBPanel| Modifier and Type | Field and Description |
|---|---|
private static java.util.List<java.lang.String> |
cbEntries |
private static TransverseMercator.Hemisphere |
DEFAULT_HEMISPHERE |
private TransverseMercator.Hemisphere |
hemisphere |
defaultIndex, entries, index, labelid, 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()
Returns current projection code.
|
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()
Returns projection name.
|
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.
|
getId, getProjection, toStringprivate static final TransverseMercator.Hemisphere DEFAULT_HEMISPHERE
private TransverseMercator.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)
ProjectionChoicegetPreferencePanel in interface ProjectionChoicegetPreferencePanel in class ListProjectionChoicelistener - listener for any change of preferencespublic java.lang.String getCurrentCode()
AbstractProjectionChoicegetCurrentCode in class AbstractProjectionChoicepublic java.lang.String getProjectionName()
AbstractProjectionChoicegetProjectionName in class AbstractProjectionChoicepublic java.util.Collection<java.lang.String> getPreferences(javax.swing.JPanel panel)
ProjectionChoicegetPreferences in interface ProjectionChoicegetPreferences in class ListProjectionChoicepanel - projection preferences panelProjectionChoice.setPreferences(java.util.Collection<java.lang.String>)public java.lang.String[] allCodes()
ProjectionChoicepublic java.util.Collection<java.lang.String> getPreferencesFromCode(java.lang.String code)
ProjectionChoicecode - projection codepublic void setPreferences(java.util.Collection<java.lang.String> args)
ProjectionChoicesetPreferences in interface ProjectionChoicesetPreferences in class ListProjectionChoiceargs - preferences as a list of strings; may be null
to reset everything.protected java.lang.String indexToZone(int idx)
ListProjectionChoiceindexToZone in class ListProjectionChoiceidx - 0-based indexListProjectionChoice.zoneToIndex(java.lang.String)protected int zoneToIndex(java.lang.String zone)
ListProjectionChoicezoneToIndex in class ListProjectionChoicezone - preference valueListProjectionChoice.indexToZone(int)