harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r793524 - /harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSliderUI.java
Date Mon, 13 Jul 2009 10:04:01 GMT
Author: tellison
Date: Mon Jul 13 10:04:00 2009
New Revision: 793524

URL: http://svn.apache.org/viewvc?rev=793524&view=rev
Log:
Apply patch for HARMONY-6270 ([classlib][swing] JSlider problem with non-zero minimum values)

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSliderUI.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSliderUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSliderUI.java?rev=793524&r1=793523&r2=793524&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSliderUI.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSliderUI.java
Mon Jul 13 10:04:00 2009
@@ -1107,7 +1107,7 @@
 
     protected int xPositionForValue(final int value) {
         // Changed according to JIRA 4445
-        double valueToSizeRatio = (double) value
+        double valueToSizeRatio = (double) (value - slider.getMinimum())
                 / (double) (slider.getMaximum() - slider.getMinimum());
 
         if ((drawInverted() ^ !slider.getComponentOrientation().isLeftToRight())) {
@@ -1120,7 +1120,7 @@
 
     protected int yPositionForValue(final int value) {
         // Changed according to JIRA 4445
-        double valueToSizeRatio = (double) value
+        double valueToSizeRatio = (double) (value - slider.getMinimum())
                 / (double) (slider.getMaximum() - slider.getMinimum());
 
         if ((drawInverted() ^ (!slider.getComponentOrientation()



Mime
View raw message