Package geomss.app

Class AppPreferences

  • All Implemented Interfaces:
    Preferences
    Direct Known Subclasses:
    GUIPreferences

    public class AppPreferences
    extends java.lang.Object
    implements Preferences
    This class serves as a collection of preferences for this program.

    Modified by: Joseph A. Huwaldt

    Version:
    January 1, 2024
    Author:
    Joseph A. Huwaldt, Date: May 2, 2009
    • Constructor Summary

      Constructors 
      Constructor Description
      AppPreferences()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addPropertyChangeListener​(java.beans.PropertyChangeListener l)  
      void addPropertyChangeListener​(java.lang.String propertyName, java.beans.PropertyChangeListener l)  
      java.lang.String get​(java.lang.String key)
      Return the preference with the specified key String.
      java.lang.String getLastPath()
      Returns the file path to the parent of the last referenced file.
      void removePropertyChangeListener​(java.beans.PropertyChangeListener l)  
      void removePropertyChangeListener​(java.lang.String propertyName, java.beans.PropertyChangeListener l)  
      void set​(java.lang.String key, java.lang.String value)
      Set the preference with the specified key String.
      void setLastPath​(java.lang.String path)
      Set the last file path referenced by the user.
      void showPreferenceDialog()
      Method that displays a dialog that allows the user to change the application preferences.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getLastPath

        public java.lang.String getLastPath()
        Returns the file path to the parent of the last referenced file. Returns null if no last path could be found.
        Specified by:
        getLastPath in interface Preferences
        Returns:
        The file path to the parent of the last referenced file.
      • setLastPath

        public void setLastPath​(java.lang.String path)
        Set the last file path referenced by the user. This is the path to the last parent of the last referenced file.
        Specified by:
        setLastPath in interface Preferences
        Parameters:
        path - The last file path referenced by the user.
      • get

        public java.lang.String get​(java.lang.String key)
        Return the preference with the specified key String.
        Specified by:
        get in interface Preferences
        Parameters:
        key - The key String identifying the preference to be retrieved. May not be null.
        Returns:
        The preference with the specified key String.
      • set

        public void set​(java.lang.String key,
                        java.lang.String value)
        Set the preference with the specified key String.
        Specified by:
        set in interface Preferences
        Parameters:
        key - The key String identifying the preference to be set. May not be null.
        value - THe String value to store as the preference. May not be null.
      • addPropertyChangeListener

        public void addPropertyChangeListener​(java.lang.String propertyName,
                                              java.beans.PropertyChangeListener l)
      • removePropertyChangeListener

        public void removePropertyChangeListener​(java.lang.String propertyName,
                                                 java.beans.PropertyChangeListener l)