|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openstreetmap.josm.gui.preferences.projection.AbstractProjectionChoice
org.openstreetmap.josm.gui.preferences.projection.ListProjectionChoice
public abstract class ListProjectionChoice
A projection choice, that offers a list of projections in a combo-box.
| Nested Class Summary | |
|---|---|
protected class |
ListProjectionChoice.CBPanel
|
| Field Summary | |
|---|---|
protected int |
defaultIndex
|
protected java.lang.Object[] |
entries
|
protected int |
index
|
protected java.lang.String |
label
|
| Fields inherited from class org.openstreetmap.josm.gui.preferences.projection.AbstractProjectionChoice |
|---|
cacheDir, id, name |
| Constructor Summary | |
|---|---|
ListProjectionChoice(java.lang.String name,
java.lang.String id,
java.lang.Object[] entries,
java.lang.String label)
|
|
ListProjectionChoice(java.lang.String name,
java.lang.String id,
java.lang.Object[] entries,
java.lang.String label,
int defaultIndex)
Constructor |
|
| Method Summary | |
|---|---|
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 index)
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. |
| Methods inherited from class org.openstreetmap.josm.gui.preferences.projection.AbstractProjectionChoice |
|---|
getCacheDir, getCurrentCode, getId, getProjection, getProjectionName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.openstreetmap.josm.gui.preferences.projection.ProjectionChoice |
|---|
allCodes, getPreferencesFromCode |
| Field Detail |
|---|
protected int index
protected int defaultIndex
protected java.lang.Object[] entries
protected java.lang.String label
| Constructor Detail |
|---|
public ListProjectionChoice(java.lang.String name,
java.lang.String id,
java.lang.Object[] entries,
java.lang.String label,
int defaultIndex)
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-box
public ListProjectionChoice(java.lang.String name,
java.lang.String id,
java.lang.Object[] entries,
java.lang.String label)
| Method Detail |
|---|
protected abstract java.lang.String indexToZone(int index)
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 preferences
public java.util.Collection<java.lang.String> getPreferences(javax.swing.JPanel panel)
ProjectionChoice
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||