Bug 171979 - [68cat] Toolbar IllegalComponentStateException
[68cat] Toolbar IllegalComponentStateException
Status: NEW
Product: platform
Classification: Unclassified
Component: -- Other --
6.x
PC Solaris
: P4 (vote)
: TBD
Assigned To: issues@platform
issues@platform
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-10 22:30 UTC by bruehlicke
Modified: 2010-08-27 21:15 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
Toolbar as in 6.5 (10.86 KB, text/plain)
2009-09-11 14:36 UTC, bruehlicke
Details
Toolbar as in 6.8 with the 2-rows wide Icon space (7.50 KB, text/plain)
2009-09-11 14:37 UTC, bruehlicke
Details
double sized toolbar on 6.10-m1 (11.01 KB, image/png)
2010-08-27 21:09 UTC, bruehlicke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bruehlicke 2009-09-10 22:30:19 UTC
[ BUILD # : 6.8 M1 ]
[ JDK VERSION : 1.6.* ]

I sent this to the Platform mailing list, but adding it here to be
captured. This one may be hard to re-produce.

Porting my app 6.8 M1 I got an issue with the toolbar now being 2
rows of icons. When drag&drop the "Cut&Paste" and then the
"Undo&Redo" toolbar to the upper row I got the following
IllegalComponentStateException - maybe it gives any a hint. I did
this
on a Solaris x86 box.


java.awt.IllegalComponentStateException: component must be showing on
the screen to determine its location
       at
java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1943)

       at java.awt.Component.getLocationOnScreen(Component.java:1917)
       at
org.netbeans.core.windows.view.ui.toolbars.ToolbarConfiguration.maybeA
ddEmptyRow(ToolbarConfiguration.java:304)
       at
org.netbeans.core.windows.view.ui.toolbars.DnDSupport.dragMouseMoved(D
nDSupport.java:361)
       at
java.awt.dnd.DnDEventMulticaster.dragMouseMoved(DnDEventMulticaster.ja
va:107)
       at
java.awt.dnd.DnDEventMulticaster.dragMouseMoved(DnDEventMulticaster.ja
va:107)
       at
java.awt.dnd.DragSource.processDragMouseMoved(DragSource.java:761)
       at
java.awt.dnd.DragSourceContext.dragMouseMoved(DragSourceContext.java:4
15)
[catch] at
sun.awt.dnd.SunDragSourceContextPeer$EventDispatcher.run(SunDragSource
ContextPeer.java:428)
       at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
       at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
       at
org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.ja
va:117)
       at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThrea
d.java:269)
       at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.j
ava:184)
       at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThrea
d.java:174)
       at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
       at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
       at
java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Comment 1 bruehlicke 2009-09-11 14:33:21 UTC
Following was added by Tim Boudreau via the dev e-mail list:

"
Looks like a bug in the new implementation of toolbars in 6.7 - please file
it w/ exact steps to reproduce.

This sort of bug is fairly easy to cause - one mouse event handler removes
the event recipient from its parent, but does not consume the event;  the
next mouse event handler tries to do some innocuous thing that requires the
component bounds.  It's bewildering because the entire stack trace is often
inside Swing code (the offending call can sometimes be in a UI delegate or
similar) - these sorts of bugs also sometimes surface only when the look and
feel has been changed during runtime (UI delegate listeners are now called
*after* the program's listeners rather than *before*).

In this case, it looks like
org.netbeans.core.windows.view.ui.toolbars.DnDSupport.dragMouseMoved(DnDSupport.java:361)
should simply do something like
if (!((Component) evt.getSource()).isDisplayable()) {
  return;
}
to fix the problem.  isDisplayable() will return false if getParent() ==
null, so that should do the trick.
"


To reproduce I may be tricky, since it happens when I start my RCP app. I have my own drop-down action icon added to the
toolbar and when the RCP app starts the toolbar is 2 icons wide. The "Cut&Past" and the "Undo&Redo" toolbars are at the
second row. The error happened when I dragged the "Cut&Past" up to the upper row and then when I dragged the "Undo&Redo"
up -> Error. That was also the ;ast toolbars in the second row when it happened.
Comment 2 bruehlicke 2009-09-11 14:36:20 UTC
Created attachment 87505 [details]
Toolbar as in 6.5
Comment 3 bruehlicke 2009-09-11 14:37:01 UTC
Created attachment 87506 [details]
Toolbar as in 6.8 with the 2-rows wide Icon space
Comment 4 bruehlicke 2010-08-27 21:09:10 UTC
Created attachment 101725 [details]
double sized toolbar on 6.10-m1
Comment 5 bruehlicke 2010-08-27 21:15:42 UTC
I have just attached this double sized toolbar issue as I see it on the latest 6.10-m1 build. If you have any ideas what may be causing this please let me know. This is happening when I launch my app. It is working fine on 6.5. It was introduced in 6.7, was still there in 6,8 and 6.9 and now also in 6.10.

Workaround:  Drag all toolbars to the 2nd row and the first row will go away resulting in the usual one-row toolbar list. .. strange ... 

Anyhow - thanx for the upcoming 6.10 release - this is looking very promising


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo