From: Lillian Angel <langel@redhat.com>
To: Roman Kennke <roman@kennke.org>
Cc: mauve-patches <mauve-patches@sources.redhat.com>
Subject: Re: FYI: BasicLookAndFeel initComponentDefaults
Date: Thu, 22 Dec 2005 14:36:00 -0000 [thread overview]
Message-ID: <1135262124.2929.138.camel@tow.toronto.redhat.com> (raw)
In-Reply-To: <1135203321.2929.126.camel@tow.toronto.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1853 bytes --]
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.
>
[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch, Size: 2471 bytes --]
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");
prev parent reply other threads:[~2005-12-22 14:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-21 20:23 Patch: " Lillian Angel
2005-12-21 20:30 ` Roman Kennke
2005-12-21 22:15 ` Lillian Angel
2005-12-22 14:36 ` Lillian Angel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1135262124.2929.138.camel@tow.toronto.redhat.com \
--to=langel@redhat.com \
--cc=mauve-patches@sources.redhat.com \
--cc=roman@kennke.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).