harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r504851 - in /harmony/enhanced/classlib/trunk/modules/swing: make/ src/main/java/common/javax/swing/plaf/basic/ src/test/api/java/common/javax/swing/ src/test/api/java/common/javax/swing/plaf/basic/
Date Thu, 08 Feb 2007 10:27:46 GMT
Author: ayza
Date: Thu Feb  8 02:27:46 2007
New Revision: 504851

URL: http://svn.apache.org/viewvc?view=rev&rev=504851
Log:
Applying patch from HARMONY-2570 ([classlib][swing] javax.swing.DefaultListCellRenderer.UIResource.getInheritsPopupMenu()
returns false). JLabelTest was removed from the exclude list.

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/make/exclude.common
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicLabelUI.java
    harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/DefaultListCellRendererTest.java
    harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JLabelTest.java
    harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicLabelUITest.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/make/exclude.common
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/make/exclude.common?view=diff&rev=504851&r1=504850&r2=504851
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/make/exclude.common (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/make/exclude.common Thu Feb  8 02:27:46
2007
@@ -17,7 +17,6 @@
 javax/swing/JFrameTest.java
 javax/swing/JInternalFrameTest.java
 javax/swing/JInternalFrame_MultithreadedTest.java
-javax/swing/JLabelTest.java
 javax/swing/JListTest.java
 javax/swing/JMenuTest.java
 javax/swing/JOptionPaneRTest.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicLabelUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicLabelUI.java?view=diff&rev=504851&r1=504850&r2=504851
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicLabelUI.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicLabelUI.java
Thu Feb  8 02:27:46 2007
@@ -145,6 +145,7 @@
     }
 
     protected void installDefaults(final JLabel label) {
+        label.setInheritsPopupMenu(true);
         LookAndFeel.installColorsAndFont(label, "Label.background", "Label.foreground", "Label.font");
         LookAndFeel.installBorder(label, "Label.border");
         LookAndFeel.installProperty(label, "alignmentX", new Float(0));
@@ -178,4 +179,5 @@
     protected void uninstallKeyboardActions(final JLabel label) {
     }
 }
+
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/DefaultListCellRendererTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/DefaultListCellRendererTest.java?view=diff&rev=504851&r1=504850&r2=504851
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/DefaultListCellRendererTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/DefaultListCellRendererTest.java
Thu Feb  8 02:27:46 2007
@@ -14,10 +14,6 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-/**
- * @author Anton Avtamonov
- * @version $Revision$
- */
 package javax.swing;
 
 import java.awt.Color;
@@ -148,6 +144,12 @@
         // Regression test for HARMONY-2572
         assertTrue(new DefaultListCellRenderer().isOpaque());
         assertTrue(new DefaultListCellRenderer.UIResource().isOpaque());
+    }
+
+    public void testGetInheritsPopupMenu() throws Exception {
+        // Regression test for HARMONY-2570
+        assertTrue(new DefaultListCellRenderer().getInheritsPopupMenu());
+        assertTrue(new DefaultListCellRenderer.UIResource().getInheritsPopupMenu());
     }
 
     private class TestListener implements PropertyChangeListener {

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JLabelTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JLabelTest.java?view=diff&rev=504851&r1=504850&r2=504851
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JLabelTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JLabelTest.java
Thu Feb  8 02:27:46 2007
@@ -14,10 +14,6 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-/**
- * @author Anton Avtamonov
- * @version $Revision$
- */
 package javax.swing;
 
 import java.awt.Component;
@@ -365,6 +361,11 @@
             }
         });
         frame.dispose();
+    }
+
+    public void testGetInheritsPopupMenu() throws Exception {
+        // Regression test for HARMONY-2570
+        assertTrue(label.getInheritsPopupMenu());
     }
 
     private void checkHorizontalKey(final JLabel label, final int key) {

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicLabelUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicLabelUITest.java?view=diff&rev=504851&r1=504850&r2=504851
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicLabelUITest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicLabelUITest.java
Thu Feb  8 02:27:46 2007
@@ -14,10 +14,6 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-/**
- * @author Anton Avtamonov
- * @version $Revision$
- */
 package javax.swing.plaf.basic;
 
 import java.awt.Color;
@@ -119,5 +115,12 @@
     public void testUninstallDefaults() throws NullPointerException { 
        BasicLabelUIForTest bu = new BasicLabelUIForTest(); 
        bu.uninstallDefaults(null); 
+    } 
+
+    public void testInstallUI_getInheritsPopupMenu() throws NullPointerException { 
+       // Regression test for HARMONY-2570
+       JLabel label = new JLabel();
+       ui.installUI(label);
+       assertTrue(label.getInheritsPopupMenu());
     } 
 }



Mime
View raw message