changeset 4652:c4b4f0b11530

7124540: [macosx] the Color panel is a black for ColorTest0005 Reviewed-by: serb
author alexp
date Wed, 11 Jan 2012 20:24:29 +0400
parents d7e5eb51caa3
children 034394d320df
files src/macosx/classes/sun/lwawt/LWScrollBarPeer.java
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/classes/sun/lwawt/LWScrollBarPeer.java	Wed Jan 11 19:07:01 2012 +0300
+++ b/src/macosx/classes/sun/lwawt/LWScrollBarPeer.java	Wed Jan 11 20:24:29 2012 +0400
@@ -106,17 +106,17 @@
     // Peer also registered as a listener for ComponentDelegate component
     @Override
     public void adjustmentValueChanged(final AdjustmentEvent e) {
+        final int value = e.getValue();
         synchronized (getDelegateLock()) {
-            if (currentValue == e.getValue()) {
+            if (currentValue == value) {
                 return;
             }
-            currentValue = e.getValue();
+            currentValue = value;
         }
-
-        // TODO: we always get event with the TRACK adj. type.
-        // Could we check if we are over the ArrowButton and send event there?
+        getTarget().setValueIsAdjusting(e.getValueIsAdjusting());
+        getTarget().setValue(value);
         postEvent(new AdjustmentEvent(getTarget(), e.getID(),
-                                      e.getAdjustmentType(), e.getValue(),
-                                      e.getValueIsAdjusting()));
+                e.getAdjustmentType(), value,
+                e.getValueIsAdjusting()));
     }
 }