public inbox for mauve-patches@sourceware.org
 help / color / mirror / Atom feed
* Patch: initComponentDefaults updated
@ 2005-12-22 15:40 Lillian Angel
  0 siblings, 0 replies; only message in thread
From: Lillian Angel @ 2005-12-22 15:40 UTC (permalink / raw)
  To: mauve-patches

[-- Attachment #1: Type: text/plain, Size: 212 bytes --]

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

        *
gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java:
        Added checks for bindings in FormattedTextField's focusInputMap.


[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch, Size: 4480 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.8
diff -u -r1.8 initComponentDefaults.java
--- gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java	22 Dec 2005 14:35:50 -0000	1.8
+++ gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java	22 Dec 2005 15:37:28 -0000
@@ -166,6 +166,48 @@
     harness.check(defaults.get("FormattedTextField.focusInputMap") instanceof InputMapUIResource);
     harness.check(defaults.get("FormattedTextField.font"), new FontUIResource("SansSerif", Font.PLAIN, 12));
     harness.check(defaults.get("FormattedTextField.margin"), new InsetsUIResource(0, 0, 0, 0));
+    Object f = UIManager.get("FormattedTextField.focusInputMap");
+    InputMapUIResource fim = (InputMapUIResource) f;
+    KeyStroke[] kf = fim.keys();
+    harness.check(kf.length == 38);
+    harness.check(fim.get(KeyStroke.getKeyStroke("KP_UP")), "increment");
+    harness.check(fim.get(KeyStroke.getKeyStroke("END")), "caret-end-line");
+    harness.check(fim.get(KeyStroke.getKeyStroke("shift ctrl  O")), "toggle-componentOrientation");
+    harness.check(fim.get(KeyStroke.getKeyStroke("shift KP_LEFT")), "selection-backward");
+    harness.check(fim.get(KeyStroke.getKeyStroke("shift RIGHT")), "selection-forward");
+    harness.check(fim.get(KeyStroke.getKeyStroke("KP_DOWN")), "decrement");
+    harness.check(fim.get(KeyStroke.getKeyStroke("HOME")), "caret-begin-line");
+    harness.check(fim.get(KeyStroke.getKeyStroke("ctrl V")), "paste-from-clipboard");
+    harness.check(fim.get(KeyStroke.getKeyStroke("ctrl H")), "delete-previous");
+    harness.check(fim.get(KeyStroke.getKeyStroke("KP_LEFT")), "caret-backward");
+    harness.check(fim.get(KeyStroke.getKeyStroke("LEFT")), "caret-backward");
+    harness.check(fim.get(KeyStroke.getKeyStroke("ctrl X")), "cut-to-clipboard");
+    harness.check(fim.get(KeyStroke.getKeyStroke("KP_RIGHT")), "caret-forward");
+    harness.check(fim.get(KeyStroke.getKeyStroke("UP")), "increment");
+    harness.check(fim.get(KeyStroke.getKeyStroke("shift ctrl KP_RIGHT")), "selection-next-word");
+    harness.check(fim.get(KeyStroke.getKeyStroke("COPY")), "copy-to-clipboard");
+    harness.check(fim.get(KeyStroke.getKeyStroke("shift HOME")), "selection-begin-line");
+    harness.check(fim.get(KeyStroke.getKeyStroke("ESCAPE")), "reset-field-edit");
+    harness.check(fim.get(KeyStroke.getKeyStroke("RIGHT")), "caret-forward");
+    harness.check(fim.get(KeyStroke.getKeyStroke("shift ctrl LEFT")), "selection-previous-word");
+    harness.check(fim.get(KeyStroke.getKeyStroke("ctrl KP_LEFT")), "caret-previous-word");
+    harness.check(fim.get(KeyStroke.getKeyStroke("DOWN")), "decrement");
+    harness.check(fim.get(KeyStroke.getKeyStroke("ctrl KP_RIGHT")), "caret-next-word");
+    harness.check(fim.get(KeyStroke.getKeyStroke("PASTE")), "paste-from-clipboard");
+    harness.check(fim.get(KeyStroke.getKeyStroke("shift ctrl RIGHT")), "selection-next-word");
+    harness.check(fim.get(KeyStroke.getKeyStroke("ctrl BACK_SLASH")), "unselect");
+    harness.check(fim.get(KeyStroke.getKeyStroke("ctrl A")), "select-all");
+    harness.check(fim.get(KeyStroke.getKeyStroke("shift KP_RIGHT")), "selection-forward");
+    harness.check(fim.get(KeyStroke.getKeyStroke("CUT")), "cut-to-clipboard");
+    harness.check(fim.get(KeyStroke.getKeyStroke("ctrl LEFT")), "caret-previous-word");
+    harness.check(fim.get(KeyStroke.getKeyStroke("BACK_SPACE")), "delete-previous");
+    harness.check(fim.get(KeyStroke.getKeyStroke("shift ctrl KP_LEFT")), "selection-previous-word");
+    harness.check(fim.get(KeyStroke.getKeyStroke("ctrl C")), "copy-to-clipboard");
+    harness.check(fim.get(KeyStroke.getKeyStroke("shift END")), "selection-end-line");
+    harness.check(fim.get(KeyStroke.getKeyStroke("ctrl RIGHT")), "caret-next-word");
+    harness.check(fim.get(KeyStroke.getKeyStroke("DELETE")), "delete-next");
+    harness.check(fim.get(KeyStroke.getKeyStroke("ENTER")), "notify-field-accept");
+    harness.check(fim.get(KeyStroke.getKeyStroke("shift LEFT")), "selection-backward");
     
     harness.checkPoint("InternalFrame");
     harness.check(defaults.get("InternalFrame.border") instanceof BorderUIResource.CompoundBorderUIResource);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-12-22 15:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-22 15:40 Patch: initComponentDefaults updated Lillian Angel

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).