public abstract class ListProjectionChoice extends AbstractProjectionChoice
Modifier and Type | Class and Description |
---|---|
protected class |
ListProjectionChoice.CBPanel |
Modifier and Type | Field and Description |
---|---|
protected int |
defaultIndex |
protected java.lang.String[] |
entries |
protected int |
index |
protected java.lang.String |
label |
cacheDir, id, name
Constructor and Description |
---|
ListProjectionChoice(java.lang.String name,
java.lang.String id,
java.lang.String[] entries,
java.lang.String label)
Constructs a new
ListProjectionChoice . |
ListProjectionChoice(java.lang.String name,
java.lang.String id,
java.lang.String[] entries,
java.lang.String label,
int defaultIndex)
Constructs a new
ListProjectionChoice . |
Modifier and Type | Method and Description |
---|---|
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.
|
protected abstract 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 abstract int |
zoneToIndex(java.lang.String zone)
Convert preference value to 0-based index.
|
getCacheDir, getCurrentCode, getId, getProjection, getProjectionName, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
allCodes, getPreferencesFromCode
protected int index
protected int defaultIndex
protected java.lang.String[] entries
protected java.lang.String label
public ListProjectionChoice(java.lang.String name, java.lang.String id, java.lang.String[] entries, java.lang.String label, int defaultIndex)
ListProjectionChoice
.name
- the display nameid
- the unique id for this ProjectionChoiceentries
- the list of display entries for the combo-boxlabel
- a label shown left to the combo-boxdefaultIndex
- the default index for the combo-boxpublic ListProjectionChoice(java.lang.String name, java.lang.String id, java.lang.String[] entries, java.lang.String label)
ListProjectionChoice
.name
- the display nameid
- the unique id for this ProjectionChoiceentries
- the list of display entries for the combo-boxlabel
- a label shown left to the combo-boxprotected abstract java.lang.String indexToZone(int idx)
protected abstract int zoneToIndex(java.lang.String zone)
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 javax.swing.JPanel getPreferencePanel(java.awt.event.ActionListener listener)
ProjectionChoice
listener
- listener for any change of preferencespublic java.util.Collection<java.lang.String> getPreferences(javax.swing.JPanel panel)
ProjectionChoice