changeset 4979:08befe1a6658

7124308: [macosx] JSlider thumb moves to the right direction when it's used as a JTable cell editor Reviewed-by: anthony
author alexp
date Wed, 08 Feb 2012 18:35:12 +0400
parents c5db56c299de
children 405ea1262453
files src/macosx/classes/com/apple/laf/AquaSliderUI.java
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/classes/com/apple/laf/AquaSliderUI.java	Wed Feb 08 10:19:16 2012 +0000
+++ b/src/macosx/classes/com/apple/laf/AquaSliderUI.java	Wed Feb 08 18:35:12 2012 +0400
@@ -344,6 +344,12 @@
         public void mousePressed(final MouseEvent e) {
             if (!slider.isEnabled()) return;
 
+            // We should recalculate geometry just before
+            // calculation of the thumb movement direction.
+            // It is important for the case, when JSlider
+            // is a cell editor in JTable. See 6348946.
+            calculateGeometry();
+
             final boolean firstClick = (currentMouseX == -1) && (currentMouseY == -1);
 
             currentMouseX = e.getX();