Limiting the NetBeans Window System in NetBeans Platform 6.5
By Geertjan on Jun 16, 2008
Until a few days ago, there were several nasty hacks you could make use of in this situation. In the most extreme case, you'd want the window system to be frozen, while in less extreme cases you'd only want some of the functionality to be unavailable to the end user. Reading Window System API guru Stan Aubrecht's blog today, you'll quickly see that this will now no longer be a problem. On suites (i.e., either the container for modules or the NetBeans Platform Application project type itself), there'll be a new tab in the Project Properties file, as follows:
By default, all the checkboxes are selected, so all the powerful features of the window system are available by default. But, depending on which checkboxes you uncheck, one or more of the features will be removed. By the way, the Help button in the screenshot above currently returns no content because it needs to be added (by me).
If ALL the checkboxes are selected, a properties file with this content is generated in the "branding" folder (which is visible when you look in the Files window, for NetBeans Platform applications):
Editor.TopComponent.Closing.Enabled=false Splitter.Respect.MinimumSize.Enabled=false TopComponent.DragAndDrop.Enabled=false TopComponent.Maximization.Enabled=false TopComponent.Resizing.Enabled=false TopComponent.Sliding.Enabled=false TopComponent.Undocking.Enabled=false View.TopComponent.Closing.Enabled=false
If all of the above are set, the small X in the tab of all the windows will not be there, so that the windows can't be closed, as well as all the other features being disabled. The above file is found (i.e., it is created for you when you select one/more of the checkboxes above) in the following location:
You could create that file yourself and add the content above yourself, however, using the checkboxes in the new tab is obviously easier.
For further reading, go as always to the NetBeans API Changes document and there read the item Added a group of resource bundle properties for customization of window system behavior.