Review request for 7124393: [macosx] JCheckBox in JTable: checkbox doesn't alaways respond to the first mouse click (original) (raw)
Anthony Petrov anthony.petrov at oracle.com
Fri Jan 27 04:26:32 PST 2012
- Previous message: Review request for 7124393: [macosx] JCheckBox in JTable: checkbox doesn't alaways respond to the first mouse click
- Next message: Review request for 7124393: [macosx] JCheckBox in JTable: checkbox doesn't alaways respond to the first mouse click
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Alex and Mike,
On 1/26/2012 9:02 PM, Alexander Potochkin wrote:
I'm OK with realSync() calls, but unsure about the stopCellEditing() call. Indeed, using a Swing method should produce correct results. However, I think that this regression test is supposed to emulate user's actions, not Swing calls, isn't it? If so, we should either find a cross-platform events that finish editing and use Robot to emulate them, or use the "os.name" property and synthesize different user actions on different platforms.
Please correct me if my assumption is wrong. Your assumption is correct it is indeed better to always emulate the user's action. However in this case it is not as simple because Aqua LaF doesn't provide a key shortcut which stops the cell editing see BasicLookAndFeel line 1545, F2 is bound to "startEditing" action (it calls stopEditing() method) there is no such an action bound to any key in AquaKeyBinding.getTableInputMap() So calling stopCellEditing inside the test is a good tradeoff because it is simple, makes the test compatible with every LaF and doesn't interfere with what the *bug6711682 *actually tests
6711682 describes an issue related to actions produced by user only:
A DESCRIPTION OF THE PROBLEM : The cell editor is a JCheckBox and the table stays in edit mode after clicking the JCheckBox. If you are in editing mode and click on an other row of the same column to select/unselect the JCheckBox, only each second time the value changed.
If we follow this procedure manually on the Mac with the original test case for 6711682, will we reproduce the problem described in that CR? If the answer to this is yes, then we have to find a way to fix 6711682 for the Mac as well, and this (I suppose) should provide us with a way to emulate the stopEditing() action by means of using Robot.
Could you please verify this?
Also, a question to Mike: can we update Aqua L&F to add a binding for the start/stopEditing() action?
-- best regards, Anthony
Thanks alexp
-- best regards, Anthony On 1/23/2012 9:33 PM, Alexander Potochkin wrote: Hello
Please review the following fix: http://cr.openjdk.java.net/~alexp/7124393/webrev.00/ the bug's description is here: http://bugs.sun.com/bugdatabase/viewbug.do?bugid=7124393 The bug is in the test, F2 doesn't stop editing on MacOS, we should not use the keyboard to commit the data the test is also updated to access the Swing methods on the Event Dispatching Thread only Thanks alexp
- Previous message: Review request for 7124393: [macosx] JCheckBox in JTable: checkbox doesn't alaways respond to the first mouse click
- Next message: Review request for 7124393: [macosx] JCheckBox in JTable: checkbox doesn't alaways respond to the first mouse click
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]