public final class PreferencesUtils
extends java.lang.Object
Preferences
object.Modifier and Type | Method and Description |
---|---|
static void |
read(javafx.beans.property.BooleanProperty property,
java.util.prefs.Preferences preferences)
Reads a boolean saved in a preferences object and stores it in a JavaFX property.
|
static void |
read(javafx.beans.property.DoubleProperty property,
java.util.prefs.Preferences preferences)
Reads a double saved in a preferences object and stores it in a JavaFX property.
|
static void |
read(javafx.beans.property.IntegerProperty property,
java.util.prefs.Preferences preferences)
Reads an int saved in a preferences object and stores it in a JavaFX property.
|
static void |
read(javafx.beans.property.LongProperty property,
java.util.prefs.Preferences preferences)
Reads a long saved in a preferences object and stores it in a JavaFX property.
|
static <T> void |
read(javafx.beans.property.Property<? super T> property,
java.util.prefs.Preferences preferences,
java.util.function.Function<java.lang.String,? extends T> parser)
Reads a value saved in a preferences object and stores it in a JavaFX property.
|
static void |
read(javafx.beans.property.StringProperty property,
java.util.prefs.Preferences preferences)
Reads a string saved in a preferences object and stores it in a JavaFX property.
|
static void |
save(javafx.beans.property.BooleanProperty property,
java.util.prefs.Preferences preferences)
Saves a boolean property.
|
static void |
save(javafx.beans.property.DoubleProperty property,
java.util.prefs.Preferences preferences)
Saves a double property.
|
static void |
save(javafx.beans.property.IntegerProperty property,
java.util.prefs.Preferences preferences)
Saves an integer property.
|
static void |
save(javafx.beans.property.LongProperty property,
java.util.prefs.Preferences preferences)
Saves a long property.
|
static <T> void |
save(javafx.beans.property.Property<? extends T> property,
java.util.prefs.Preferences preferences,
java.util.function.Function<? super T,java.lang.String> serializer)
Saves a property to a preferences object.
|
static void |
save(javafx.beans.property.StringProperty property,
java.util.prefs.Preferences preferences)
Saves a string property.
|
public static <T> void save(javafx.beans.property.Property<? extends T> property, java.util.prefs.Preferences preferences, java.util.function.Function<? super T,java.lang.String> serializer)
T
- the type of the propertyproperty
- the property to savepreferences
- the preferences object to save toserializer
- a function to use to convert the property's value to a String that can be stored injava.lang.IllegalArgumentException
- if the value of the property is nullpublic static void save(javafx.beans.property.IntegerProperty property, java.util.prefs.Preferences preferences)
property
- the property to savepreferences
- the preferences object to save topublic static void save(javafx.beans.property.LongProperty property, java.util.prefs.Preferences preferences)
property
- the property to savepreferences
- the preferences object to save topublic static void save(javafx.beans.property.DoubleProperty property, java.util.prefs.Preferences preferences)
property
- the property to savepreferences
- the preferences object to save topublic static void save(javafx.beans.property.BooleanProperty property, java.util.prefs.Preferences preferences)
property
- the property to savepreferences
- the preferences object to save topublic static void save(javafx.beans.property.StringProperty property, java.util.prefs.Preferences preferences)
property
- the property to savepreferences
- the preferences object to save topublic static <T> void read(javafx.beans.property.Property<? super T> property, java.util.prefs.Preferences preferences, java.util.function.Function<java.lang.String,? extends T> parser)
T
- the type of the propertyproperty
- the property that the read value should be placed inpreferences
- the preferences object to read fromparser
- the function to use to convert from the serialized String to an object of the proper typepublic static void read(javafx.beans.property.IntegerProperty property, java.util.prefs.Preferences preferences)
property
- the property that the read value should be placed inpreferences
- the preferences object to read frompublic static void read(javafx.beans.property.LongProperty property, java.util.prefs.Preferences preferences)
property
- the property that the read value should be placed inpreferences
- the preferences object to read frompublic static void read(javafx.beans.property.DoubleProperty property, java.util.prefs.Preferences preferences)
property
- the property that the read value should be placed inpreferences
- the preferences object to read frompublic static void read(javafx.beans.property.BooleanProperty property, java.util.prefs.Preferences preferences)
property
- the property that the read value should be placed inpreferences
- the preferences object to read frompublic static void read(javafx.beans.property.StringProperty property, java.util.prefs.Preferences preferences)
property
- the property that the read value should be placed inpreferences
- the preferences object to read from