org.netbeans.modules.options.api/1 1.24.1

org.netbeans.api.options
Class OptionsDisplayer

java.lang.Object
  extended by org.netbeans.api.options.OptionsDisplayer

public final class OptionsDisplayer
extends Object

Permits Options Dialog to open the options dialog with some category pre-selected.

Since:
1.5

Field Summary
static String ADVANCED
          Registration name of Advanced category (aka Miscellaneous).
 
Method Summary
static OptionsDisplayer getDefault()
          Get the default OptionsDisplayer
 boolean open()
          Open the options dialog with no guarantee which category is pre-selected.
 boolean open(String path)
          Open the options dialog with some panel preselected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADVANCED

public static final String ADVANCED
Registration name of Advanced category (aka Miscellaneous).

Since:
1.8
See Also:
Constant Field Values
Method Detail

getDefault

public static OptionsDisplayer getDefault()
Get the default OptionsDisplayer

Returns:
the default instance

open

public boolean open()
Open the options dialog 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

public boolean open(String path)
Open the options dialog with some panel preselected. To open a top-level panel, pass its OptionsPanelController.TopLevelRegistration.id(). To open a subpanel, pass its OptionsPanelController.SubRegistration.location() followed by / followed by its OptionsPanelController.SubRegistration.id(). To open a container panel without specifying a particular subpanel, pass its OptionsPanelController.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

org.netbeans.modules.options.api/1 1.24.1

Built on April 10 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.