public class SingleProjectionChoice extends AbstractProjectionChoice
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
code |
id, name| Constructor and Description |
|---|
SingleProjectionChoice(java.lang.String name,
java.lang.String id,
java.lang.String code)
Constructs a new
SingleProjectionChoice. |
| 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 p)
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.
|
void |
setPreferences(java.util.Collection<java.lang.String> args)
Set the internal state to match the preferences.
|
getId, getProjection, toStringprotected java.lang.String code
public SingleProjectionChoice(java.lang.String name, java.lang.String id, java.lang.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 javax.swing.JPanel getPreferencePanel(java.awt.event.ActionListener listener)
ProjectionChoicelistener - listener for any change of preferencespublic java.lang.String[] allCodes()
ProjectionChoicepublic void setPreferences(java.util.Collection<java.lang.String> args)
ProjectionChoiceargs - preferences as a list of strings; may be null
to reset everything.public java.util.Collection<java.lang.String> getPreferences(javax.swing.JPanel p)
ProjectionChoicep - projection preferences panelProjectionChoice.setPreferences(java.util.Collection<java.lang.String>)public java.util.Collection<java.lang.String> getPreferencesFromCode(java.lang.String code)
ProjectionChoicecode - projection codepublic java.lang.String getCurrentCode()
AbstractProjectionChoicegetCurrentCode in class AbstractProjectionChoicepublic java.lang.String getProjectionName()
AbstractProjectionChoicegetProjectionName in class AbstractProjectionChoice