This is the mail archive of the mauve-patches@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: BasicComboBoxUI.getPreferredSize()


This patch removes some redundant code and updates one expected value to match the (more sensible) behaviour in JDK 1.5:

2006-02-01 David Gilbert <david.gilbert@object-refinery.com>

* gnu/testlet/javax/swing/plaf/basic/BasicComboBoxUI/getPreferredSize.java
(testEditable): Removed System.out.println() and modified expected result for one check.


Regards,

Dave
Index: gnu/testlet/javax/swing/plaf/basic/BasicComboBoxUI/getPreferredSize.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/plaf/basic/BasicComboBoxUI/getPreferredSize.java,v
retrieving revision 1.2
diff -u -r1.2 getPreferredSize.java
--- gnu/testlet/javax/swing/plaf/basic/BasicComboBoxUI/getPreferredSize.java	7 Nov 2005 21:35:04 -0000	1.2
+++ gnu/testlet/javax/swing/plaf/basic/BasicComboBoxUI/getPreferredSize.java	1 Feb 2006 14:28:05 -0000
@@ -1,6 +1,6 @@
 // Tags: JDK1.2
 
-// Copyright (C) 2005 David Gilbert <david.gilbert@object-refinery.com>
+// Copyright (C) 2005, 2006 David Gilbert <david.gilbert@object-refinery.com>
 
 // This file is part of Mauve.
 
@@ -90,11 +90,10 @@
     JTextField tf = (JTextField) cb.getEditor().getEditorComponent();
     cb.setEditable(true);
     Font font = cb.getFont();
-    System.out.println(font);
     FontMetrics fm = cb.getFontMetrics(font);
     int height = fm.getHeight() + 2;
     int width = fm.stringWidth("m") * tf.getColumns() + height; 
-    harness.check(ui.getPreferredSize(cb), new Dimension(width + 1, height));    
+    harness.check(ui.getPreferredSize(cb), new Dimension(width, height));    
     cb.setModel(new DefaultComboBoxModel(new Object[] {"X"}));
     harness.check(ui.getPreferredSize(cb), new Dimension(width, height));        
     cb.setPrototypeDisplayValue("XX");    

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]