Class AbstractPreferencesPanel

    • Constructor Detail

      • AbstractPreferencesPanel

        public AbstractPreferencesPanel()
    • Method Detail

      • getTitle

        public abstract String getTitle()
        The title of the preferences.
        Specified by:
        getTitle in interface PreferencesPanel
        Returns:
        the title
      • requiresWrapper

        public abstract boolean requiresWrapper()
        Returns whether the panel requires a wrapper scrollpane/panel for display.
        Specified by:
        requiresWrapper in interface PreferencesPanel
        Returns:
        true if wrapper required
      • activate

        public abstract String activate()
        Activates the settings.
        Specified by:
        activate in interface PreferencesPanel
        Returns:
        null if successfully activated, otherwise error message
      • canReset

        public boolean canReset()
        Returns whether the panel supports resetting the options.
        Default implementation returns false.
        Specified by:
        canReset in interface PreferencesPanel
        Returns:
        true if supported
      • reset

        public String reset()
        Resets the settings to their default.
        Default implementation does nothing.
        Specified by:
        reset in interface PreferencesPanel
        Returns:
        null if successfully reset, otherwise error message
      • compareTo

        public int compareTo​(PreferencesPanel o)
        Uses the title to compare the panels.
        Specified by:
        compareTo in interface Comparable<PreferencesPanel>
        Returns:
        -1, 0 or +1 if title string is less than, equal to or larger than the one of the provided object
      • equals

        public boolean equals​(Object o)
        Checks whether the objects are the same. Uses the title in case of PreferencesPanel objects.
        Overrides:
        equals in class Object
        Returns:
        true if the same title
      • getPanels

        public static String[] getPanels()
        Returns a list with classnames of setup panels.
        Returns:
        the setup panel classnames