From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2412 invoked by alias); 2 Nov 2005 15:22:54 -0000 Mailing-List: contact mauve-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-discuss-owner@sourceware.org Received: (qmail 2393 invoked by uid 22791); 2 Nov 2005 15:22:50 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 02 Nov 2005 15:22:50 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id jA2FMmta015466 for ; Wed, 2 Nov 2005 10:22:48 -0500 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id jA2FMlV11759 for ; Wed, 2 Nov 2005 10:22:47 -0500 Received: from tow.toronto.redhat.com (tow.toronto.redhat.com [172.16.14.160]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id jA2FMlSh032199 for ; Wed, 2 Nov 2005 10:22:47 -0500 Subject: FYI: New Test for Dialog From: Lillian Angel To: mauve-discuss@sources.redhat.com Content-Type: multipart/mixed; boundary="=-I1Vw0TRLPpDwi2qejD81" Date: Wed, 02 Nov 2005 15:22:00 -0000 Message-Id: <1130944967.2872.68.camel@tow.toronto.redhat.com> Mime-Version: 1.0 X-SW-Source: 2005-q4/txt/msg00022.txt.bz2 --=-I1Vw0TRLPpDwi2qejD81 Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-length: 217 Added a new test to make sure the Dialog is shown at the preferred size if pack is not called before show. 2005-11-01 Lillian Angel * gnu/testlet/java/awt/Dialog/size.java: New Test. --=-I1Vw0TRLPpDwi2qejD81 Content-Disposition: attachment; filename=size.java Content-Type: text/x-java; name=size.java; charset=us-ascii Content-Transfer-Encoding: 7bit Content-length: 1425 // Tags: GUI JDK1.1 // Copyright (C) 2005 Red Hat // Mauve is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2, or (at your option) // any later version. // Mauve is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with Mauve; see the file COPYING. If not, write to // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301 USA. import gnu.testlet.TestHarness; import gnu.testlet.Testlet; import javax.swing.JDialog; public class size implements Testlet { /** * Runs the test using the specified harness. * * @param harness the test harness (null not permitted). */ public void test(TestHarness harness) { JDialog jd = new JDialog(); jd.show(); // jd insets may be larger than preferred size Dimension pref = jd.getPreferredSize(); Dimension size = jd.getSize(); if (size.width >= pref.width && size.height >= pref.height) harness.fail("Dialog should be shown at preferred size when pack is not called before show."); } } --=-I1Vw0TRLPpDwi2qejD81--