Package | Description |
---|---|
org.openide.windows |
Most parts of NetBeans do not manipulate windows directly, but use
special
top components.
|
There's a new Boolean property NbMainWindow.showCustomBackground
in javax.swing.UIManager
. When the property value is TRUE
then the window system will turn off opacity for most of the main window
components - menu bar, toolbars, status bar, sliding bars and the main
desktop area component. That means that the main window background will
be showing through these components. It can be used to paint some watermark
or logo or gradient on the main window background, especially when using
custom main window implementation, see change id reuse.existing.frame.as.the.main.window
Use TopComponent.Registration, TopComponent.Description and TopComponent.OpenActionRegistration to register default location of a TopComponent, some of its properties and action to open it.
When window system loads it checks for existing Frames (java.awt.Frame.getFrames()) and if there is a JFrame whose name is "NbMainWindow" then it is reused as the main window. Main menu, toolbars and content pane will be put into this existing JFrame. If there isn't such a JFrame instance then a new empty JFrame is created and used for the main window - the same way as before this change.
Added an annotation, org.openide.windows.RetainLocation
which can be applied to TopComponents whose
persistence type is PERSISTENCE_NEVER. There has been a long-term
problem that such components can be defined as singleton components,
and the first time they are opened, they appear in the correct place.
However, on restart or after the first time they are closed, their
persistence information, including the containing Mode, is lost, and
thereafter they open in the editor area.
RetainLocation
as being one
it should persist, so that if the user creates a transient Mode by
dragging the window to a new location on screen, the data about that
location is not lost on shutdown.
Added new a method to WindowManager to retrieve the list of TopComponents opened in a given Mode. This method does not iterate through all the TopComponents in the Mode so it prevents already closed TopComponents from being deserialized from disk.
protected void componentDeactivated () { // close window group containing propsheet, but only if we're // selecting a different kind of TC in the same mode boolean closeGroup = true; Mode curMode = WindowManager.getDefault().findMode(this); TopComponent selected = curMode.getSelectedTopComponent(); if (selected != null && selected instanceof FooTopComponent) closeGroup = false; if (closeGroup) { TopComponentGroup group = WindowManager.getDefault().findTopComponentGroup(TC_GROUP); if (group != null) { group.close(); } } }
|
|
|
|
|
|
OpenIDE-Module-Requires: org.openide.windows.WindowManager
but it is not generally done.
Read more about the implementation in the answers to architecture questions.
Built on July 28 2012. | Portions Copyright 1997-2012 Sun Microsystems, Inc. All rights reserved.