Creating a PShelf Alternative for the NetBeans Platform
There is no such component in the NetBeans Platform, but we wanted our users to have a similar experience in the new version of our app. I have gotten great help from the brilliant Geertjan Wielenga on the NetBeans docs team, and he even wrote a blog post about my usecase where he created an implementation of such a component, based on the work done by Steven Haines back in 2005 to create a Java implementation of the OutlookBar.
However, I wanted the component to be more like the rest of the NetBeans Platform. The NetBeans version should support fully fledged TopComponents, and proxy their lookups, icon and displayName, as well as listen to and convey lifecycle events like componentShowing, componentHidden etc. Last but not least, it should be able to dock and undock existing TopComponents. Therefore, I give you the NetBeans Dock component:
Now my users can undock the Article tab, and place it alongside or even under the rest of the docked components, to get a more efficient working environment. TopComponents can also register themselves in the System Filesystem to be opened and docked automatically when the Dock itself is opened. A typical registration, here exemplified with the ArticleTree, looks like this in the layer.xml:
<attr name="instanceCreate" methodvalue="no.tornado.vortex.cms.article.ArticleTree.getDefault"/>
To dock/undock components, you right click either on the empty area if you have no docked components, or on any tab: