Interface Preferences

  • All Known Implementing Classes:
    AppPreferences, GUIPreferences

    public interface Preferences
    An interface in common to preference classes in my applications.

    Modified by: Joseph A. Huwaldt

    Version:
    February 22, 2025
    Author:
    Joseph A. Huwaldt Date: February 18, 2009
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      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 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.
    • Method Detail

      • getLastPath

        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.
        Returns:
        The file path to the parent of the last referenced file.
      • setLastPath

        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.
        Parameters:
        path - The last file path referenced by the user.
      • showPreferenceDialog

        void showPreferenceDialog()
        Method that displays a dialog that allows the user to change the application preferences. This method may do nothing if the application does not support displaying a preference dialog.
      • get

        java.lang.String get​(java.lang.String key)
        Return the preference with the specified key String.
        Parameters:
        key - The key String identifying the preference to be retrieved.
        Returns:
        The preference with the specified key.
      • set

        void set​(java.lang.String key,
                 java.lang.String value)
        Set the preference with the specified key String.
        Parameters:
        key - The key String identifying the preference to be set.
        value - THe String value to store as the preference.