org.netbeans.modules.options.api/1 1.10.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 category and subcategory pre-selected according to given path.
 
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 category and subcategory pre-selected according to given path.

Parameters:
path - path of category and subcategories to be selected. Path is composed from registration names divided by slash. E.g. "MyCategory" or "MyCategory/Subcategory2" for the following registration:
 <folder name="OptionsDialog">
     <file name="MyCategory.instance">
         <attr name="instanceClass" stringvalue="org.foo.MyCategory"/>
         <attr name="position" intvalue="900"/>
     </file>
     <folder name="MyCategory">
         <file name="SubCategory1.instance">
             <attr name="instanceClass" stringvalue="org.foo.Subcategory1"/>
         </file>
         <file name="SubCategory2.instance">
             <attr name="instanceClass" stringvalue="org.foo.Subcategory2"/>
         </file>
     </file>
 </folder>
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.10.1

Built on April 30 2009.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.