Package org.omegat.gui.preferences
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. SeeBasePreferencesController
for a base implementation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
IPreferencesController.FurtherActionListener
An interface used by observers interested in knowing when a preference has been altered that requires the application to be restarted or the project to be reloaded.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
addFurtherActionListener(IPreferencesController.FurtherActionListener listener)
Add a listenerjava.awt.Component
getGui()
Get the GUI (the "view") controlled by this controller.default java.lang.Class<? extends IPreferencesController>
getParentViewClass()
Get the parent view in the view tree.boolean
isReloadRequired()
Returns whether a preference has been altered such as to require the project to be reloaded.boolean
isRestartRequired()
Returns whether a preference has been altered such as to require the application to be restarted.void
persist()
Commit changes.void
removeFurtherActionListener(IPreferencesController.FurtherActionListener listener)
Remove a listenervoid
restoreDefaults()
Restore preferences controlled by this view to their default state.java.lang.String
toString()
Implementors should override this to return the name of the view as shown in the view tree.void
undoChanges()
Restore preferences controlled by this view to their current persisted state.default boolean
validate()
Validate the current preferences.
-
-
-
Method Detail
-
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
java.lang.String toString()
Implementors should override this to return the name of the view as shown in the view tree.- Overrides:
toString
in classjava.lang.Object
-
getGui
java.awt.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 java.lang.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.
-
-