Options Dialog Framework in NetBeans Platform 6.5

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.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today