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]

Re: FYI: BasicLookAndFeel initComponentDefaults


2005-12-20  Lillian Angel  <langel@redhat.com>

        *
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  <langel@redhat.com>
> > > 
> > >         * 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  <langel@redhat.com>
> 
>         *
> gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java:
>         Added more detailed tests for focusInputMaps.
> 
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");

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