public class CodeProjectionChoice extends AbstractProjectionChoice implements SubPrefsOptions
Modifier and Type | Class and Description |
---|---|
private static class |
CodeProjectionChoice.CodeSelectionPanel |
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
code |
cacheDir, 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() |
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() |
void |
setPreferences(java.util.Collection<java.lang.String> args)
Set the internal state to match the preferences.
|
boolean |
showProjectionCode() |
boolean |
showProjectionName() |
getCacheDir, 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()
getCurrentCode
in class AbstractProjectionChoice
public java.lang.String getProjectionName()
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
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