http://blogs.oracle.com/geertjan/entry/netbeans_platform_apis_top_10

————————————————————————————————————————————————————————————————————————

 

If yesterday's list of NetBeans APIs are to be seen as the NetBeans Platform's "Top 10 Greatest Hits" (the 10th place is still open to suggestions), then those that follow are its "Top 10 Runners Up". In other words, though the following don't belong to the central set of NetBeans APIs, they are important nonetheless and, in each case, are APIs that you need to have in your mental toolbox next time you start thinking about the infrastructure of your Swing application:
  1. Dialogs API. Enables you to provide user notifications, dialogs, and wizards that integrate well with the rest of the NetBeans Platform. In the NetBeans sources, see package "org.openide".
  2. Options Dialog and SPI. Enables you to integrate with the NetBeans Platform's Options window so that you can let the user customize the application. In the NetBeans sources, see package "org.netbeans.api.options/org.netbeans.spi.options".
  3. UI Utilities API. Enables you to provide a range of smaller visual items in your NetBeans Platform application—particular favorites are HTML browser integration, the Undo/Redo Manager, and status bar interaction. (Also have a look at the DropDownButtonFactory and TabbedPaneFactory, both of which I blogged about some time ago.) In the NetBeans sources, see package "org.openide.awt".
  4. MultiView Windows. Enables you create two views over the same file, typically a source view and a visual design view. In the NetBeans sources, see package "org.netbeans.core.api.multiview/org.netbeans.core.spi.multiview".
  5. Auto Update Services. Enables you to programmatically install/uninstall and enable/disable modules. In the NetBeans sources, see package "org.netbeans.api.autoupdate/org.netbeans.spi.autoupdate".
  6. I/O APIs. Enables you to write to the NetBeans Platform's Output window, including writing hyperlinks there, such as error messages which the user can then click on to jump to a relevant place in the source code or, possibly, somewhere on-line. In the NetBeans sources, see package "org.openide.windows".
  7. Progress API. Enables you to integrate with the NetBeans Platform's progress bar, to indicate to the user that they need to wait a bit longer during long running tasks. In the NetBeans sources, see package "org.netbeans.api.progress".
  8. Command Line Parsing API. Enables you to parse the command line from within a NetBeans Platform application. In the NetBeans sources, see package "org.netbeans.api.sendopts/org.netbeans.spi.sendopts".

The final two runners up (below, 9 and 10) are not actually APIs. They are, like the above, of course, provided in the form of a NetBeans module. However, in these cases, you can't program against these modules. I.e., for example, you need to do a bit of Java coding to work with the Command Line Parsing API. These two, however, require no coding. Simply include them in your NetBeans Platform application and you've immediately integrated them:

  1. Favorites. Provides the Favorites window, which functions as a file browser. You can brand it quite easily, replacing the strings with your own.
  2. JavaHelp Integration. Provides the infrastructure for JavaHelp help sets.

That's it. I believe that the above 10, and the previous 10, together make up the top 20 modules that the NetBeans Platform makes available. The remainder are mostly support modules for the above or low-level infrastructural modules that could be addressed in a future blog entry.

You might be wondering: "Where are all the editor-related APIs?" Well, those APIs are not part of the NetBeans Platform. They are made available by NetBeans IDE, which is just one of many applications on top of the NetBeans Platform. Those can also be looked at in a future blog entry, but have nothing to do with the modules that the NetBeans Platform makes available. From these two lists, therefore, you should be able to see that the NetBeans Platform isn't concerned with editor applications, necessarily. It provides the basis for any kind of Swing application (small or large) that needs the above services.

posted on 2011-09-27 18:44  网络大豆  阅读(367)  评论(0编辑  收藏  举报