Class JosmComboBoxModel.Preferences
- java.lang.Object
-
- org.openstreetmap.josm.gui.widgets.JosmComboBoxModel.Preferences
-
- Enclosing class:
- JosmComboBoxModel<E>
public final class JosmComboBoxModel.Preferences extends Object
Loads and saves the model to the JOSM preferences.Obtainable through
JosmComboBoxModel.prefs(java.util.function.Function<java.lang.String, E>, java.util.function.Function<E, java.lang.String>)
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
asStringList()
Returns the model elements as list of strings.void
load(String key)
Loads the model from the JOSM preferences.void
load(String key, List<String> defaults)
Loads the model from the JOSM preferences.void
load(ListProperty prop)
Loads the model from the JOSM preferences.void
save(String key)
Saves the model to the JOSM preferences.void
save(ListProperty prop)
Saves the model to the JOSM preferences.
-
-
-
Method Detail
-
load
public void load(String key)
Loads the model from the JOSM preferences.- Parameters:
key
- The preferences key
-
load
public void load(String key, List<String> defaults)
Loads the model from the JOSM preferences.- Parameters:
key
- The preferences keydefaults
- A list of default values.
-
load
public void load(ListProperty prop)
Loads the model from the JOSM preferences.- Parameters:
prop
- The property holding the strings.
-
asStringList
public List<String> asStringList()
Returns the model elements as list of strings.- Returns:
- a list of strings
-
save
public void save(String key)
Saves the model to the JOSM preferences.- Parameters:
key
- The preferences key
-
save
public void save(ListProperty prop)
Saves the model to the JOSM preferences.- Parameters:
prop
- The property to write to.
-
-