This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 118508 - Weird scroll of the scene view on Windows OS
Summary: Weird scroll of the scene view on Windows OS
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Graph (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@platform
Depends on:
Reported: 2007-10-11 09:39 UTC by David Kaspar
Modified: 2010-04-01 14:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description David Kaspar 2007-10-11 09:39:33 UTC
1) Run AlignWithClientAreaTest example on Windows OS machine.
2) Resize the frame to show on a half of "Label 2"
3) Hold Ctrl key and press left-mouse button on "Label 2"
4) ERROR - the scene view is scrolled even thought it should not be since the the mouse cursor is still within the scene
Comment 1 David Kaspar 2007-11-19 12:31:47 UTC
The problem is that pressing left mouse button while Ctrl key is pressed on Windows, Swing invokes additional
keyPressed(KeyEvent.VK_CONTROL) method call after mousePressed method event. At that time MoveAction is already in
locked state and therefore "SceneComponent.processKeyOperator" method invokes "scrollRectToVisible" method to show whole
bounds of locked-widget to visible area.
This is a problem since the same code is used for actions that are locking the scene and a key is invoked during their
locked state period. Then the library automatically shows whole booundary in visible area.
On Linux, keyPressed is fired correctly before mousePressed events - therefore the issue is not reproducible there.
I am scared to remove the line particular "scrollRectToVisible" method call since it is in a core of the library and may
unexpectedly affect behavior another actions (built-in actions should be safe with the change - maybe Edit action may
cause a problem).
If you want to, please, try to remove line containing "scrollRectToVisible" method call within
SceneComponent.processKeyOperator method. If it would not affect anybody, then we can integrate the change. Thanks.