From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5855 invoked by alias); 22 Dec 2005 14:36:26 -0000 Received: (qmail 5845 invoked by uid 22791); 22 Dec 2005 14:36:25 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 22 Dec 2005 14:35:27 +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 jBMEZP3X030058 for ; Thu, 22 Dec 2005 09:35:25 -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 jBMEZP110435; Thu, 22 Dec 2005 09:35:25 -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 jBMEZOV1028250; Thu, 22 Dec 2005 09:35:24 -0500 Subject: Re: FYI: BasicLookAndFeel initComponentDefaults From: Lillian Angel To: Roman Kennke Cc: mauve-patches In-Reply-To: <1135203321.2929.126.camel@tow.toronto.redhat.com> References: <1135196592.2929.118.camel@tow.toronto.redhat.com> <1135197005.9402.102.camel@localhost.localdomain> <1135203321.2929.126.camel@tow.toronto.redhat.com> Content-Type: multipart/mixed; boundary="=-3b7es87sQmRbwwEH97cV" Date: Thu, 22 Dec 2005 14:36:00 -0000 Message-Id: <1135262124.2929.138.camel@tow.toronto.redhat.com> Mime-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact mauve-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-patches-owner@sourceware.org X-SW-Source: 2005/txt/msg00280.txt.bz2 --=-3b7es87sQmRbwwEH97cV Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-length: 1853 2005-12-20 Lillian Angel * gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java: Fixed a couple of typos. On Wed, 2005-12-21 at 17:15 -0500, Lillian Angel wrote: > On Wed, 2005-12-21 at 21:30 +0100, Roman Kennke wrote: > > Hi Lillian, > > > > Am Mittwoch, den 21.12.2005, 15:23 -0500 schrieb Lillian Angel: > > > 2005-12-20 Lillian Angel > > > > > > * gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/ > > > initComponentDefaults.java: > > > Added checks for TextArea.focusInputMap, > > > TextField.focusInputMap, TextPane.focusInputMap, and > > > PasswordField.focusInputMap. > > > > > > > > > + harness.check(UIManager.get("PasswordField.focusInputMap") > > instanceof InputMapUIResource); > > > > The test could be a little more detailed. I know that lots of tests in > > this test class are like you did. You have implemented ~27 keybindings > > for each text component, it would be helpful to check all of them. > > Sorry, it's alot of work (ok, lots of copy+pasting ;-) ), but it's > > really worth the effort. So, what should be done is, check for the type > > and size of the Object[] value for this key, and do a check for each > > keystroke and binding in the array (for KeyStrokes I would do a > > harness.check(keystroke.toString(), "ctrl ENTER") kind of check (to > > avoid confusion, because both (String and KeyStroke objects) are legal > > for the KeyStroke part, for the binding a simple harness.check(binding, > > "notify-accept") kind of check will do. Would you mind adding such > > checks? > > Done! > > 2005-12-20 Lillian Angel > > * > gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java: > Added more detailed tests for focusInputMaps. > --=-3b7es87sQmRbwwEH97cV Content-Disposition: attachment; filename=patch.diff Content-Type: text/x-patch; name=patch.diff; charset=us-ascii Content-Transfer-Encoding: 7bit Content-length: 2471 Index: gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java,v retrieving revision 1.7 diff -u -r1.7 initComponentDefaults.java --- gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java 21 Dec 2005 22:15:35 -0000 1.7 +++ gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java 22 Dec 2005 14:33:48 -0000 @@ -46,7 +46,6 @@ import javax.swing.plaf.InsetsUIResource; import javax.swing.plaf.BorderUIResource.CompoundBorderUIResource; import javax.swing.plaf.basic.BasicBorders; -import javax.swing.plaf.basic.BasicLookAndFeel; import javax.swing.plaf.basic.BasicBorders.ButtonBorder; import javax.swing.plaf.basic.BasicBorders.MarginBorder; @@ -429,7 +428,7 @@ harness.check(defaults.get("TextArea.font"), new FontUIResource("MonoSpaced", Font.PLAIN, 12)); harness.check(defaults.get("TextArea.margin"), new InsetsUIResource(0, 0, 0, 0)); harness.check(UIManager.get("TextArea.focusInputMap") instanceof InputMapUIResource); - Object ta = UIManager.get("TextPane.focusInputMap"); + Object ta = UIManager.get("TextArea.focusInputMap"); InputMapUIResource taim = (InputMapUIResource) ta; harness.check(taim.keys().length == 55); harness.check(taim.get(KeyStroke.getKeyStroke("shift UP")), "selection-up"); @@ -494,10 +493,10 @@ harness.check(defaults.get("TextField.font"), new FontUIResource("SansSerif", Font.PLAIN, 12)); harness.check(defaults.get("TextField.margin"), new InsetsUIResource(0, 0, 0, 0)); harness.check(UIManager.get("TextField.focusInputMap") instanceof InputMapUIResource); - Object tf = UIManager.get("TextPane.focusInputMap"); + Object tf = UIManager.get("TextField.focusInputMap"); InputMapUIResource tfim = (InputMapUIResource) tf; - harness.check(tfim.keys().length == 55); - harness.check(tfim.get(KeyStroke.getKeyStroke("ENTER")), "insert-break"); + harness.check(tfim.keys().length == 33); + harness.check(tfim.get(KeyStroke.getKeyStroke("ENTER")), "notify-field-accept"); harness.check(tfim.get(KeyStroke.getKeyStroke("LEFT")), "caret-backward"); harness.check(tfim.get(KeyStroke.getKeyStroke("RIGHT")), "caret-forward"); harness.check(tfim.get(KeyStroke.getKeyStroke("BACK_SPACE")), "delete-previous"); --=-3b7es87sQmRbwwEH97cV--