X

Geertjan's Blog

  • June 24, 2008

Options Dialog Framework in NetBeans Platform 6.5

Geertjan Wielenga
Product Manager
The Options Dialog and SPI is nothing less than a complete framework for providing your user with a dialog for customizing the application you've created for them. As such, it gives you a complete dialog, i.e., the Options window, into which you can plug additional JPanels and then use the NbPreferences API to let the user set/store/retrieve the customizations you've let them set in the JPanels.

The good news is that this framework will be improved in three significant respects for NetBeans Platform 6.5:

  • The new org.netbeans.api.options.OptionsDisplayer class lets the user programmatically open the Options window with a specific category/subcategory selected.

  • The new OptionsController.createAdvanced method lets you create new subtabs within any tab that makes use of this method, so that any of your own tabs can have subtabs just like the Miscellaneous panel already does.

  • The Options Panel wizard has been changed so that a primary panel can be created that makes use of the item described above, so that any secondary panel that is created (either via the same wizard or manually) can (optionally) be a subtab within one of the primary panels that allow secondary panels.

The related JavaHelp and tutorials will be changed accordingly.

Together, these changes allow for more flexibility in the creation of Options windows, as well as the ability for the plugin/application developer to specify exactly which of the categories/subcategories should be opened at any point in time, which especially makes sense in the context of an ever-growing Options window. Perhaps you've created support for framework XYZ, for example, so that now you'll be able to let the user (via some action, for example) open a very specific XYZ-related category/subcategory within the Options window, one that is enriched with a range of subcategories, which was never possible before. Hurray.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.