Bug 27626 - mouse entering/exiting into lightweight components is wrongly reported
Summary: mouse entering/exiting into lightweight components is wrongly reported
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: swing (show other bugs)
Version: 0.92
: P3 normal
Target Milestone: 0.92
Assignee: Robert Schuster
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-16 11:12 UTC by Robert Schuster
Modified: 2006-05-16 23:12 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-05-16 11:46:56


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Schuster 2006-05-16 11:12:55 UTC
Steps to reproduce:
1. Open Swing demo
2. Click and hold left mouse button on a JButton (button is painted darker, due to getModel().isRollover() == true)
3. Move the mouse out of the button' area (button is painted lighter, due to getModel().isRollover() == false)
4. move it back into the button
-> button should be painted as darker again and getModel().isRollover() should return true but it does not on Classpath.

Further inspection (putting println in DefaultButtonModel.setRollover()) shows that at step 4 only 'false' is sent to the method.
Comment 1 Robert Schuster 2006-05-16 11:14:02 UTC
I take this.
Comment 2 Roman Kennke 2006-05-16 11:46:56 UTC
I looked into this some time ago, I believe it is a problem with the model. I am not 100% sure though.
Comment 3 david.gilbert 2006-05-16 15:41:24 UTC
I took a look at the DefaultButtonModel class.  I fixed one small issue (clearing ARMED and PRESSED when the model is set to NOT SELECTED), which I don't think is related to this bug, but everything else looks OK.  I think the bug is hiding elsewhere...
Comment 4 Robert Schuster 2006-05-16 23:12:33 UTC
Fixed by patching LightweightDispatcher.