We need the ability to dock/undock TopComponents programmatically to/from a
Frame or Dialog. The reason is toolbox/tool windows are very common in many
softwares. Making this easier to do for developers and being able to show how
easy it is will make it easier for them to transition more applications on top
of the Platform. It is 1) a usability issue and 2) an application support
issue. Currently I'm not even sure how one could allow the user to undock their
TopComponent into a JDialog if it is even possible, but this needs to be
possible. It also needs to be possible by a method call. Some times this needs
to be done by the call of a button. The user needs to be able to press a button
and a tool/toolbox window move to a location near the cursor. This is very
handy in graphics applications. Other applications this may be handy. It
should be a couple method calls if issue #96321 is implemented. I set this up
as a P1 as it will be a good benefit when Netbeans 6.0 comes out to be able to
support this feature for developers.
Methods would be:
Window undock()//uses the default undocking method setup for the TopComponent
and by using Window it can represent a Frame or a Dialog and by using Frame and
Dialog instead of JFrame and JDialog it is consistent with the WindowManager
(they are really JFrames and JDialogs but these extend Frame and Dialog
The above methods return the Window, Dialog, or Frame reference so the developer
can control screen placement.
dock()//docks it to the mode it came from or its default
The point is to just make it easier to program for the end developer. Use cases
are just that...to better support the end developer with this functionality.
For instance, what if in a graphics application when a certain tool is selected
or when the cursor is held down on the tool button long enough the toolbox
window automatically comes out to the user to be near their cursor. It sounds
like something which could come in handy for me with some graphics tools I
use....when I have to migrate all the way across the screen to select another
tool related to what I'm doing.
I really need this behavior ASAP!
longstrb, go ahead and provide the API and implementation by yourself... (isn't it open source product?)
It sure is an open source product (and a fine one). However, I was simply reinforcing the need for this feature.
There is a little more to it than just writing your own implementaion and API. It requires a fair amount of knowledge
about the Windows API and how to build Netbeans, which takes time. I have contributed bug fixes in the past and would
be happy to look into this if I had time. Therefore, I will let the Netbeans core developers respond to this. If I
get some down time in the months to come, I will look into a solution if not already implemented.
I've filed Bug 198657. It doesn't cover this, but there is some synergy.