harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r531787 - in /harmony/enhanced/classlib/trunk/modules/swing/src: main/java/common/javax/swing/plaf/basic/BasicScrollBarUI.java test/api/java/common/javax/swing/plaf/basic/BasicScrollBarUITest.java
Date Tue, 24 Apr 2007 06:46:08 GMT
Author: apetrenko
Date: Mon Apr 23 23:46:07 2007
New Revision: 531787

URL: http://svn.apache.org/viewvc?view=rev&rev=531787
Log:
Patch for HARMONY-2854 "[classlib][swing] j.s.plaf.basic.BasicScrollBarUI.getTrackBounds()
returns not null on Harmony"

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicScrollBarUI.java
    harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicScrollBarUITest.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicScrollBarUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicScrollBarUI.java?view=diff&rev=531787&r1=531786&r2=531787
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicScrollBarUI.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicScrollBarUI.java
Mon Apr 23 23:46:07 2007
@@ -263,11 +263,6 @@
         return new BasicScrollBarUI();
     }
 
-    public BasicScrollBarUI() {
-        thumbRect = new Rectangle();
-        trackRect = new Rectangle();
-    }
-
     public void addLayoutComponent(final String s, final Component c) {
     }
 
@@ -367,6 +362,8 @@
     }
 
     protected void installDefaults() {
+        thumbRect = new Rectangle();
+        trackRect = new Rectangle();
         LookAndFeel.installColors(scrollbar, "ScrollBar.background", "ScrollBar.foreground");
         LookAndFeel.installProperty(scrollbar, "opaque", Boolean.TRUE);
         configureScrollBarColors();

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicScrollBarUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicScrollBarUITest.java?view=diff&rev=531787&r1=531786&r2=531787
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicScrollBarUITest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicScrollBarUITest.java
Mon Apr 23 23:46:07 2007
@@ -57,27 +57,12 @@
     }
 
     /**
-     * Auxiliary class for testGetTrackThumbNewUI()
-     */
-    private static class BasicScrollBarUIForTest extends BasicScrollBarUI {
-        @Override
-        public Rectangle getTrackBounds() {
-            return super.getTrackBounds();
-        }
-
-        @Override
-        public Rectangle getThumbBounds() {
-            return super.getThumbBounds();
-        }
-    }
-
-    /**
      * Regression test for HARMONY-2854
      */
     public void testGetTrackThumbNewUI() {
-        BasicScrollBarUIForTest sbr = new BasicScrollBarUIForTest();
-        assertNull(sbr.getTrackBounds());
-        assertNull(sbr.getThumbBounds());
+        barUI = new BasicScrollBarUI();
+        assertNull(barUI.getTrackBounds());
+        assertNull(barUI.getThumbBounds());
     }
     
     public void testSetThumbBounds() throws Exception {



Mime
View raw message