Class StringPrefUtil

java.lang.Object
com.iamsoft.util.ui.javafx.prefs.StringPrefUtil

public final class StringPrefUtil extends Object
Load/save string attributes from/to Preferences.
  • Method Details

    • 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.