Class OptionsDisplayer
java.lang.Object
org.netbeans.api.options.OptionsDisplayer
Permits Options Dialog to open the options dialog with some category pre-selected.
- Since:
- 1.5
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Registration name of Advanced category (aka Miscellaneous).static final String
Registration name of Editor category.static final String
Registration name of FontsAndColors category (aka Fonts & Colors).static final String
Registration name of General category.static final String
Registration name of Keymaps category (aka Keymap). -
Method Summary
Modifier and TypeMethodDescriptionstatic OptionsDisplayer
Get the defaultOptionsDisplayer
boolean
open()
Open the options dialog (in non-modal mode) with no guarantee which category is pre-selected.boolean
open
(boolean isModal) Open the options dialog with no guarantee which category is pre-selected.boolean
Open the options dialog (in non-modal mode) with some panel preselected.boolean
Open the options dialog with some panel preselected.
-
Field Details
-
ADVANCED
Registration name of Advanced category (aka Miscellaneous).- Since:
- 1.8
- See Also:
-
KEYMAPS
Registration name of Keymaps category (aka Keymap).- Since:
- 1.29
- See Also:
-
FONTSANDCOLORS
Registration name of FontsAndColors category (aka Fonts & Colors).- Since:
- 1.29
- See Also:
-
EDITOR
-
GENERAL
-
-
Method Details
-
getDefault
Get the defaultOptionsDisplayer
- Returns:
- the default instance
-
open
public boolean open()Open the options dialog (in non-modal mode) with no guarantee which category is pre-selected.- Returns:
- true if optins dialog was sucesfully opened with some pre-selected category. If no category is registered at all then false will be returned and options dialog won't be opened.
-
open
Open the options dialog (in non-modal mode) with some panel preselected. To open a top-level panel, pass itsOptionsPanelController.TopLevelRegistration.id()
. To open a subpanel, pass itsOptionsPanelController.SubRegistration.location()
followed by/
followed by itsOptionsPanelController.SubRegistration.id()
. To open a container panel without specifying a particular subpanel, pass itsOptionsPanelController.ContainerRegistration.id()
. To avoid typos and keep track of dependencies it is recommended to define compile-time constants for all these IDs, to be used both by the annotations and by calls to this method.- Parameters:
path
- slash-separated path of category and perhaps subcategories to be selected- Returns:
- true if optins dialog was sucesfully opened with required category.
If this method is called when options dialog is already opened then this method
will return immediately false without affecting currently selected category
in opened options dialog.
If category (i.e. the first item in the path) does not correspond to any
of registered categories then false is returned and options dialog is not opened
at all (e.g. in case that module providing such category is not installed or enabled).
If subcategory doesn't exist, it opens with category selected and
it returns true. It is up to particular
OptionsPanelController
to handle such situation. - Since:
- 1.8
-
open
public boolean open(boolean isModal) Open the options dialog with no guarantee which category is pre-selected.- Parameters:
isModal
- true if the options window should be in modal mode, false otherwise- Returns:
- true if options dialog was successfully opened with some pre-selected category. If no category is registered at all then false will be returned and options dialog won't be opened.
- Since:
- 1.33
-
open
Open the options dialog with some panel preselected. To open a top-level panel, pass itsOptionsPanelController.TopLevelRegistration.id()
. To open a subpanel, pass itsOptionsPanelController.SubRegistration.location()
followed by/
followed by itsOptionsPanelController.SubRegistration.id()
. To open a container panel without specifying a particular subpanel, pass itsOptionsPanelController.ContainerRegistration.id()
. To avoid typos and keep track of dependencies it is recommended to define compile-time constants for all these IDs, to be used both by the annotations and by calls to this method.- Parameters:
path
- slash-separated path of category and perhaps subcategories to be selectedisModal
- true if the options window should be in modal mode, false otherwise- Returns:
- true if options dialog was successfully opened with required category.
If this method is called when options dialog is already opened then this method
will return immediately false without affecting currently selected category
in opened options dialog.
If category (i.e. the first item in the path) does not correspond to any
of registered categories then false is returned and options dialog is not opened
at all (e.g. in case that module providing such category is not installed or enabled).
If subcategory doesn't exist, it opens with category selected and
it returns true. It is up to particular
OptionsPanelController
to handle such situation. - Since:
- 1.33
-