This is the mail archive of the
mauve-patches@sourceware.org
mailing list for the Mauve project.
FYI: SwingUtilities.layoutCompoundLabel test fix
- From: "Roman Kennke" <roman dot kennke at aicas dot com>
- To: mauve-patches at sources dot redhat dot com
- Date: Tue, 28 Feb 2006 15:12:31 +0000
- Subject: FYI: SwingUtilities.layoutCompoundLabel test fix
- Bounce-to: "Roman Kennke" <roman.kennke@aicas.com>
The SwingUtilities.layoutCompoundLabel test tests for some absolute size
values, where it must take the font metrics differences into account. I
fixed this.
2006-02-28 Roman Kennke <kennke@aicas.com>
* gnu/testlet/javax/swing/SwingUtilities/layoutCompoundLabel.java:
(test): Fixed some tests the take font metrics differences into
account.
/Roman
Index: gnu/testlet/javax/swing/SwingUtilities/layoutCompoundLabel.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/SwingUtilities/layoutCompoundLabel.java,v
retrieving revision 1.1
diff -u -r1.1 layoutCompoundLabel.java
--- gnu/testlet/javax/swing/SwingUtilities/layoutCompoundLabel.java 3 Oct 2005 16:37:46 -0000 1.1
+++ gnu/testlet/javax/swing/SwingUtilities/layoutCompoundLabel.java 28 Feb 2006 15:06:50 -0000
@@ -80,7 +80,7 @@
harness.checkPoint("TL-text");
displayText = SwingUtilities.layoutCompoundLabel(fm, text, icon, TOP, LEFT, CENTER, LEFT, viewR, iconR, textR, 3);
harness.check(viewR, new Rectangle(10, 20, 100, 25));
- harness.check(iconR, new Rectangle(10 + ww, 27, 0, 0));
+ harness.check(iconR, new Rectangle(10 + ww, 20 + hh / 2, 0, 0));
harness.check(textR, new Rectangle(10, 20, ww, hh));
harness.checkPoint("TC-text");
@@ -88,7 +88,7 @@
textR = new Rectangle();
displayText = SwingUtilities.layoutCompoundLabel(fm, text, icon, TOP, CENTER, CENTER, LEFT, viewR, iconR, textR, 3);
harness.check(viewR, new Rectangle(10, 20, 100, 25));
- harness.check(iconR, new Rectangle(60 + (ww + 1) / 2, 27, 0, 0));
+ harness.check(iconR, new Rectangle(60 + (ww + 1) / 2, 20 + hh / 2, 0, 0));
harness.check(textR, new Rectangle(60 - ww / 2, 20, ww, hh));
harness.checkPoint("TR-text");
@@ -96,7 +96,7 @@
textR = new Rectangle();
displayText = SwingUtilities.layoutCompoundLabel(fm, text, icon, TOP, RIGHT, CENTER, LEFT, viewR, iconR, textR, 3);
harness.check(viewR, new Rectangle(10, 20, 100, 25));
- harness.check(iconR, new Rectangle(110, 27, 0, 0));
+ harness.check(iconR, new Rectangle(110, 20 + hh / 2, 0, 0));
harness.check(textR, new Rectangle(110 - ww, 20, ww, hh));
harness.checkPoint("CL-text");