Class JosmComboBoxModel.Preferences
java.lang.Object
org.openstreetmap.josm.gui.widgets.JosmComboBoxModel.Preferences
- Enclosing class:
- JosmComboBoxModel<E>
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>).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the model elements as list of strings.voidLoads the model from the JOSM preferences.voidLoads the model from the JOSM preferences.voidload(ListProperty prop) Loads the model from the JOSM preferences.voidSaves the model to the JOSM preferences.voidsave(ListProperty prop) Saves the model to the JOSM preferences.
-
Field Details
-
readE
-
writeE
AFunctionthat serializes<E>to aString.
-
-
Constructor Details
-
Preferences
Private constructor- Parameters:
readE- AFunctionthat builds an<E>from aString.writeE- AFunctionthat serializes an<E>to aString
-
-
Method Details
-
load
Loads the model from the JOSM preferences.- Parameters:
key- The preferences key
-
load
Loads the model from the JOSM preferences.- Parameters:
key- The preferences keydefaults- A list of default values.
-
load
Loads the model from the JOSM preferences.- Parameters:
prop- The property holding the strings.
-
asStringList
Returns the model elements as list of strings.- Returns:
- a list of strings
-
save
Saves the model to the JOSM preferences.- Parameters:
key- The preferences key
-
save
Saves the model to the JOSM preferences.- Parameters:
prop- The property to write to.
-