-
Notifications
You must be signed in to change notification settings - Fork 1
DevFaqReplaceWindowSystem
Perhaps your users are a bit confused by the ability to close, slide or dock windows or maybe you’re trying to retain the behavior of some existing application’s window system. There are times, however rare, in which you want to replace the typical NetBeans Window Manager org.netbeans.core.windows.WindowManagerImpl
with a different one.
Before doing this you should know that starting with NetBeans 6.5, it will be easy to change certain behaviors of the window system. So needing to replace the window manager is rare already and will be needed even less often in the future.
But if you still want to do it, you can:
-
Create an implementation of the
org.openide.windows.WindowManager
interface -
Register your implementation into the default lookup and replace any others
Of course, there’s a lot of work involved in creating your own WindowManager implementation, but you can have a look at the org.openide.windows.DummyWindowManager
class for starters. It’s a simple implementation that opens all TopComponents in their own frame but which can also make windows invisible which is handy for testing.
The DummyWindowManager
is used as a last resort when no other window manager is present; you will not need to register it in the default Lookup as described earlier. If you want to use it, keep in mind these two tips:
-
Do not include the
Core - Windows
orCore
modules in your application. IncludingCore
will result in an error message from the NonGui class because it seems to expect an implementation of theNbTopManager.WindowManager
class which you cannot (easily) provide. -
No windows will be shown by default on startup. Use a
ModuleInstall
class'restored()
method to display your TopComponent.
The content in this page was kindly donated by Oracle Corp. to the Apache Software Foundation.
This page was exported from http://wiki.netbeans.org/DevFaqReplaceWindowSystem , that was last modified by NetBeans user Admin on 2009-11-06T15:59:14Z.
NOTE: This document was automatically converted to the AsciiDoc format on 2018-01-26, and needs to be reviewed.
Apache NetBeans is an effort undergoing incubation at The Apache Software Foundation (ASF).
Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects.
While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
This wiki is an experiment pending Apache NetBeans Community approval.