harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r495987 - in /harmony/enhanced/classlib/trunk/modules/swing/src: main/java/common/javax/swing/plaf/basic/BasicComboBoxRenderer.java test/api/java/common/javax/swing/plaf/basic/BasicComboBoxRendererTest.java
Date Sat, 13 Jan 2007 22:36:27 GMT
Author: hindessm
Date: Sat Jan 13 14:36:27 2007
New Revision: 495987

URL: http://svn.apache.org/viewvc?view=rev&rev=495987
Log:
Applying patch from "[#HARMONY-2646] [classlib][swing]
javax.swing.plaf.basic.BasicComboBoxRenderer.getHorizontalAlignment()
returns LEFT while RI returns LEADING".

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

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicComboBoxRenderer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicComboBoxRenderer.java?view=diff&rev=495987&r1=495986&r2=495987
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicComboBoxRenderer.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicComboBoxRenderer.java
Sat Jan 13 14:36:27 2007
@@ -43,7 +43,7 @@
 
     public BasicComboBoxRenderer() {
         setBorder(noFocusBorder);
-        setHorizontalAlignment(JLabel.LEFT);
+        setHorizontalAlignment(JLabel.LEADING);
     }
 
     public Component getListCellRendererComponent(final JList list, final Object value, final
int index, final boolean isSelected, final boolean cellHasFocus) {

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicComboBoxRendererTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicComboBoxRendererTest.java?view=diff&rev=495987&r1=495986&r2=495987
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicComboBoxRendererTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicComboBoxRendererTest.java
Sat Jan 13 14:36:27 2007
@@ -26,6 +26,7 @@
 import javax.swing.BorderFactory;
 import javax.swing.JLabel;
 import javax.swing.JList;
+import javax.swing.SwingConstants;
 import javax.swing.SwingTestCase;
 
 public class BasicComboBoxRendererTest extends SwingTestCase {
@@ -53,6 +54,10 @@
         assertEquals(BasicComboBoxRenderer.noFocusBorder, new BasicComboBoxRenderer()
                 .getBorder());
         assertEquals("", renderer.getText());
+        // Regression test for HARMONY-2646 
+        assertEquals(SwingConstants.LEADING, new BasicComboBoxRenderer()
+                .getHorizontalAlignment()); 
+        
     }
 
     public void testGetListCellRendererComponent() throws Exception {



Mime
View raw message