Interface IPreferencesController

All Known Implementing Classes:
AppearanceController, AutoCompleterController, AutotextAutoCompleterOptionsController, BasePreferencesController, CharTableAutoCompleterOptionsController, CustomColorSelectionController, DictionaryPreferencesController, EditingBehaviorController, ExternalFinderPreferencesController, FiltersCustomizerController, FontSelectionController, GeneralOptionsController, GlossaryAutoCompleterOptionsController, GlossaryPreferencesController, HistoryAutoCompleterOptionsController, LanguageToolConfigurationController, MachineTranslationPreferencesController, PluginsPreferencesController, RepositoriesCredentialsController, SaveOptionsController, SecureStoreController, SegmentationCustomizerController, SpellcheckerConfigurationController, TagProcessingOptionsController, TeamOptionsController, TMMatchesPreferencesController, UserPassController, VersionCheckPreferencesController, ViewOptionsController

public interface IPreferencesController
An interface implemented by views shown in the Preferences window. See BasePreferencesController for a base implementation.
  • Method Details

    • addFurtherActionListener

      void addFurtherActionListener(IPreferencesController.FurtherActionListener listener)
      Add a listener
    • removeFurtherActionListener

      void removeFurtherActionListener(IPreferencesController.FurtherActionListener listener)
      Remove a listener
    • isRestartRequired

      boolean isRestartRequired()
      Returns whether a preference has been altered such as to require the application to be restarted.
    • isReloadRequired

      boolean isReloadRequired()
      Returns whether a preference has been altered such as to require the project to be reloaded.
    • toString

      String toString()
      Implementors should override this to return the name of the view as shown in the view tree.
      Overrides:
      toString in class Object
    • getGui

      Component getGui()
      Get the GUI (the "view") controlled by this controller. This should not be a window (e.g. JDialog, JFrame) but rather a component embeddable in a window (e.g. JPanel).
    • getParentViewClass

      default Class<? extends IPreferencesController> getParentViewClass()
      Get the parent view in the view tree. Implementors should override this to return the class of the desired parent; by default this is the Plugins view.
    • persist

      void persist()
      Commit changes.
    • validate

      default boolean validate()
      Validate the current preferences. Implementors should override to implement validation logic as necessary.

      When validation fails, implementors should not raise dialogs; instead they should offer feedback within the view GUI.

      Returns:
      True if the settings are valid and OK to be persisted; false if not
    • undoChanges

      void undoChanges()
      Restore preferences controlled by this view to their current persisted state.
    • restoreDefaults

      void restoreDefaults()
      Restore preferences controlled by this view to their default state.
    • canRestoreDefaults

      default boolean canRestoreDefaults()
      Whether supporting `restoreDefaults` feature.