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, toString
protected 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)
ProjectionChoice
listener
- listener for any change of preferencespublic java.lang.String[] allCodes()
ProjectionChoice
public void setPreferences(java.util.Collection<java.lang.String> args)
ProjectionChoice
args
- preferences as a list of strings; may be null
to reset everything.public java.util.Collection<java.lang.String> getPreferences(javax.swing.JPanel p)
ProjectionChoice
p
- projection preferences panelProjectionChoice.setPreferences(java.util.Collection<java.lang.String>)
public java.util.Collection<java.lang.String> getPreferencesFromCode(java.lang.String code)
ProjectionChoice
code
- projection codepublic java.lang.String getCurrentCode()
AbstractProjectionChoice
getCurrentCode
in class AbstractProjectionChoice
public java.lang.String getProjectionName()
AbstractProjectionChoice
getProjectionName
in class AbstractProjectionChoice