Class SessionManager

java.lang.Object
com.dlsc.gemsfx.util.SessionManager

public class SessionManager extends Object
A manager for storing observable values in the user preferences.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new session manager that will use the passed in preferences.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the preferences object used for persisting the property values.
    void
    register(String path, javafx.beans.property.BooleanProperty property)
    Registers a boolean property so that any changes made to that property will be persisted in the user's preferences and restored for the next client session.
    void
    register(String path, javafx.beans.property.DoubleProperty property)
    Registers a double property so that any changes made to that property will be persisted in the user's preferences and restored for the next client session.
    void
    register(String path, javafx.beans.property.FloatProperty property)
    Registers a float property so that any changes made to that property will be persisted in the user's preferences and restored for the next client session.
    void
    register(String path, javafx.beans.property.IntegerProperty property)
    Registers an integer property so that any changes made to that property will be persisted in the user's preferences and restored for the next client session.
    void
    register(String path, javafx.beans.property.LongProperty property)
    Registers a long property so that any changes made to that property will be persisted in the user's preferences and restored for the next client session.
    void
    register(String path, javafx.beans.property.StringProperty property)
    Registers a string property so that any changes made to that property will be persisted in the user's preferences and restored for the next client session.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SessionManager

      public SessionManager(Preferences preferences)
      Constructs a new session manager that will use the passed in preferences.
      Parameters:
      preferences - the preferences used for persisting the property value
  • Method Details

    • getPreferences

      public final Preferences getPreferences()
      Returns the preferences object used for persisting the property values.
      Returns:
      the preferences
    • register

      public void register(String path, javafx.beans.property.DoubleProperty property)
      Registers a double property so that any changes made to that property will be persisted in the user's preferences and restored for the next client session.
      Parameters:
      path - the path to use for the property (e.g. "divider.location"). Paths must be unique for all persisted properties.
      property - the property to persist and restore across user sessions
    • register

      public void register(String path, javafx.beans.property.IntegerProperty property)
      Registers an integer property so that any changes made to that property will be persisted in the user's preferences and restored for the next client session.
      Parameters:
      path - the path to use for the property (e.g. "divider.location"). Paths must be unique for all persisted properties.
      property - the property to persist and restore across user sessions
    • register

      public void register(String path, javafx.beans.property.FloatProperty property)
      Registers a float property so that any changes made to that property will be persisted in the user's preferences and restored for the next client session.
      Parameters:
      path - the path to use for the property (e.g. "divider.location"). Paths must be unique for all persisted properties.
      property - the property to persist and restore across user sessions
    • register

      public void register(String path, javafx.beans.property.LongProperty property)
      Registers a long property so that any changes made to that property will be persisted in the user's preferences and restored for the next client session.
      Parameters:
      path - the path to use for the property (e.g. "divider.location"). Paths must be unique for all persisted properties.
      property - the property to persist and restore across user sessions
    • register

      public void register(String path, javafx.beans.property.BooleanProperty property)
      Registers a boolean property so that any changes made to that property will be persisted in the user's preferences and restored for the next client session.
      Parameters:
      path - the path to use for the property (e.g. "divider.location"). Paths must be unique for all persisted properties.
      property - the property to persist and restore across user sessions
    • register

      public void register(String path, javafx.beans.property.StringProperty property)
      Registers a string property so that any changes made to that property will be persisted in the user's preferences and restored for the next client session.
      Parameters:
      path - the path to use for the property (e.g. "divider.location"). Paths must be unique for all persisted properties.
      property - the property to persist and restore across user sessions