- java.lang.Object
-
- com.iamsoft.util.ui.javafx.prefs.StringPrefUtil
-
public final class StringPrefUtil extends Object
Load/save string attributes from/to Preferences.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
manage(javafx.beans.property.StringProperty pStringProperty, Class<?> pClass, String... pKeys)
static void
manage(javafx.beans.property.StringProperty pStringProperty, String pNodeName, Consumer<Runnable> pExecutor)
static void
manage(javafx.beans.property.StringProperty pStringProperty, Consumer<Runnable> pExecutor, Class<?> pClass, String... pKeys)
static void
manage(javafx.beans.property.StringProperty pStringProperty, Supplier<Preferences> pPrefsSupplier, boolean pPrefsNodeExists, Consumer<Runnable> pExecutor)
Load preferences and also save on update.static void
manage(javafx.beans.property.StringProperty pStringProperty, Preferences pPrefs)
Load preferences and also save on update.static void
manage(javafx.beans.property.StringProperty pStringProperty, Preferences pPrefs, Consumer<Runnable> pExecutor)
Load preferences and also save on update.static void
manage(javafx.beans.property.StringProperty pStringProperty, javafx.beans.value.ObservableValue<Supplier<Preferences>> pPrefsSupplierProperty, boolean pPrefsNodeExists, Consumer<Runnable> pExecutor)
Load preferences and also save on update.
-
-
-
Method Detail
-
manage
public static void manage(javafx.beans.property.StringProperty pStringProperty, Class<?> pClass, String... pKeys)
-
manage
public static void manage(javafx.beans.property.StringProperty pStringProperty, Consumer<Runnable> pExecutor, Class<?> pClass, String... pKeys)
- Parameters:
pExecutor
- An executor to be used to load and save preferences on a background thread. Submitted runnables should be executed in order of arrival.
-
manage
public static void manage(javafx.beans.property.StringProperty pStringProperty, String pNodeName, Consumer<Runnable> pExecutor)
- Parameters:
pExecutor
- An executor to be used to load and save preferences on a background thread. Submitted runnables should be executed in order of arrival.
-
manage
public static void manage(javafx.beans.property.StringProperty pStringProperty, Preferences pPrefs)
Load preferences and also save on update.
-
manage
public static void manage(javafx.beans.property.StringProperty pStringProperty, Preferences pPrefs, Consumer<Runnable> pExecutor)
Load preferences and also save on update.- Parameters:
pExecutor
- An executor to be used to load and save preferences on a background thread. Submitted runnables should be executed in order of arrival.
-
manage
public static void manage(javafx.beans.property.StringProperty pStringProperty, Supplier<Preferences> pPrefsSupplier, boolean pPrefsNodeExists, Consumer<Runnable> pExecutor)
Load preferences and also save on update.- Parameters:
pExecutor
- An executor to be used to load and save preferences on a background thread. Submitted runnables should be executed in order of arrival.pPrefsSupplier
- A supplier to be used to obtain the Preferences node on a background thread.
-
manage
public static void manage(javafx.beans.property.StringProperty pStringProperty, javafx.beans.value.ObservableValue<Supplier<Preferences>> pPrefsSupplierProperty, boolean pPrefsNodeExists, Consumer<Runnable> pExecutor)
Load preferences and also save on update.- Parameters:
pExecutor
- An executor to be used to load and save preferences on a background thread. Submitted runnables should be executed in order of arrival.pPrefsSupplierProperty
- A supplier to be used to obtain the Preferences node on a background thread. Property should change only on the JavaFX thread.
-
-