public class CodeProjectionChoice extends AbstractProjectionChoice implements SubPrefsOptions
Modifier and Type | Class and Description |
---|---|
static class |
CodeProjectionChoice.CodeComparator
Comparator that compares the number part of the code numerically.
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
code |
id, name
Constructor and Description |
---|
CodeProjectionChoice()
Constructs a new
CodeProjectionChoice . |
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.
|
Projection |
getProjection()
Get the projection that matches the internal state.
|
java.lang.String |
getProjectionName()
Returns projection name.
|
void |
setPreferences(java.util.Collection<java.lang.String> args)
Set the internal state to match the preferences.
|
boolean |
showProjectionCode() |
boolean |
showProjectionName() |
getId, toString
private java.lang.String code
public CodeProjectionChoice()
CodeProjectionChoice
.public Projection getProjection()
ProjectionChoice
getProjection
in interface ProjectionChoice
getProjection
in class AbstractProjectionChoice
public java.lang.String getCurrentCode()
AbstractProjectionChoice
getCurrentCode
in class AbstractProjectionChoice
public java.lang.String getProjectionName()
AbstractProjectionChoice
getProjectionName
in class AbstractProjectionChoice
public void setPreferences(java.util.Collection<java.lang.String> args)
ProjectionChoice
setPreferences
in interface ProjectionChoice
args
- preferences as a list of strings; may be null
to reset everything.public javax.swing.JPanel getPreferencePanel(java.awt.event.ActionListener listener)
ProjectionChoice
getPreferencePanel
in interface ProjectionChoice
listener
- listener for any change of preferencespublic java.util.Collection<java.lang.String> getPreferences(javax.swing.JPanel panel)
ProjectionChoice
getPreferences
in interface ProjectionChoice
panel
- projection preferences panelProjectionChoice.setPreferences(java.util.Collection<java.lang.String>)
public java.lang.String[] allCodes()
ProjectionChoice
allCodes
in interface ProjectionChoice
public java.util.Collection<java.lang.String> getPreferencesFromCode(java.lang.String code)
ProjectionChoice
getPreferencesFromCode
in interface ProjectionChoice
code
- projection codepublic boolean showProjectionCode()
showProjectionCode
in interface SubPrefsOptions
public boolean showProjectionName()
showProjectionName
in interface SubPrefsOptions