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.6 diff -u -r1.6 initComponentDefaults.java --- gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java 21 Dec 2005 20:20:37 -0000 1.6 +++ gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java 21 Dec 2005 22:12:57 -0000 @@ -253,6 +253,43 @@ harness.check(defaults.get("PasswordField.font"), new FontUIResource("MonoSpaced", Font.PLAIN, 12)); harness.check(defaults.get("PasswordField.margin"), new InsetsUIResource(0, 0, 0, 0)); harness.check(UIManager.get("PasswordField.focusInputMap") instanceof InputMapUIResource); + Object o = UIManager.get("PasswordField.focusInputMap"); + InputMapUIResource im = (InputMapUIResource) o; + KeyStroke[] k = im.keys(); + harness.check(k.length == 33); + harness.check(im.get(KeyStroke.getKeyStroke("END")), "caret-end-line"); + harness.check(im.get(KeyStroke.getKeyStroke("shift ctrl O")), "toggle-componentOrientation"); + harness.check(im.get(KeyStroke.getKeyStroke("shift KP_LEFT")), "selection-backward"); + harness.check(im.get(KeyStroke.getKeyStroke("shift RIGHT")), "selection-forward"); + harness.check(im.get(KeyStroke.getKeyStroke("HOME")), "caret-begin-line"); + harness.check(im.get(KeyStroke.getKeyStroke("ctrl V")), "paste-from-clipboard"); + harness.check(im.get(KeyStroke.getKeyStroke("ctrl H")), "delete-previous"); + harness.check(im.get(KeyStroke.getKeyStroke("KP_LEFT")), "caret-backward"); + harness.check(im.get(KeyStroke.getKeyStroke("LEFT")), "caret-backward"); + harness.check(im.get(KeyStroke.getKeyStroke("ctrl X")), "cut-to-clipboard"); + harness.check(im.get(KeyStroke.getKeyStroke("KP_RIGHT")), "caret-forward"); + harness.check(im.get(KeyStroke.getKeyStroke("shift ctrl KP_RIGHT")), "selection-end-line"); + harness.check(im.get(KeyStroke.getKeyStroke("COPY")), "copy-to-clipboard"); + harness.check(im.get(KeyStroke.getKeyStroke("shift HOME")), "selection-begin-line"); + harness.check(im.get(KeyStroke.getKeyStroke("RIGHT")), "caret-forward"); + harness.check(im.get(KeyStroke.getKeyStroke("shift ctrl LEFT")), "selection-begin-line"); + harness.check(im.get(KeyStroke.getKeyStroke("ctrl KP_LEFT")), "caret-begin-line"); + harness.check(im.get(KeyStroke.getKeyStroke("ctrl KP_RIGHT")), "caret-end-line"); + harness.check(im.get(KeyStroke.getKeyStroke("PASTE")), "paste-from-clipboard"); + harness.check(im.get(KeyStroke.getKeyStroke("shift ctrl RIGHT")), "selection-end-line"); + harness.check(im.get(KeyStroke.getKeyStroke("ctrl BACK_SLASH")), "unselect"); + harness.check(im.get(KeyStroke.getKeyStroke("ctrl A")), "select-all"); + harness.check(im.get(KeyStroke.getKeyStroke("shift KP_RIGHT")), "selection-forward"); + harness.check(im.get(KeyStroke.getKeyStroke("CUT")), "cut-to-clipboard"); + harness.check(im.get(KeyStroke.getKeyStroke("ctrl LEFT")), "caret-begin-line"); + harness.check(im.get(KeyStroke.getKeyStroke("BACK_SPACE")), "delete-previous"); + harness.check(im.get(KeyStroke.getKeyStroke("shift ctrl KP_LEFT")), "selection-begin-line"); + harness.check(im.get(KeyStroke.getKeyStroke("ctrl C")), "copy-to-clipboard"); + harness.check(im.get(KeyStroke.getKeyStroke("shift END")), "selection-end-line"); + harness.check(im.get(KeyStroke.getKeyStroke("ctrl RIGHT")), "caret-end-line"); + harness.check(im.get(KeyStroke.getKeyStroke("DELETE")), "delete-next"); + harness.check(im.get(KeyStroke.getKeyStroke("ENTER")), "notify-field-accept"); + harness.check(im.get(KeyStroke.getKeyStroke("shift LEFT")), "selection-backward"); harness.checkPoint("PopupMenu"); harness.check(defaults.get("PopupMenu.border") instanceof BorderUIResource.CompoundBorderUIResource); @@ -392,6 +429,64 @@ 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"); + InputMapUIResource taim = (InputMapUIResource) ta; + harness.check(taim.keys().length == 55); + harness.check(taim.get(KeyStroke.getKeyStroke("shift UP")), "selection-up"); + harness.check(taim.get(KeyStroke.getKeyStroke("ctrl RIGHT")), "caret-next-word"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift ctrl LEFT")), "selection-previous-word"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift KP_UP")), "selection-up"); + harness.check(taim.get(KeyStroke.getKeyStroke("DOWN")), "caret-down"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift ctrl T")), "previous-link-action"); + harness.check(taim.get(KeyStroke.getKeyStroke("ctrl LEFT")), "caret-previous-word"); + harness.check(taim.get(KeyStroke.getKeyStroke("CUT")), "cut-to-clipboard"); + harness.check(taim.get(KeyStroke.getKeyStroke("END")), "caret-end-line"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift PAGE_UP")), "selection-page-up"); + harness.check(taim.get(KeyStroke.getKeyStroke("KP_UP")), "caret-up"); + harness.check(taim.get(KeyStroke.getKeyStroke("DELETE")), "delete-next"); + harness.check(taim.get(KeyStroke.getKeyStroke("ctrl HOME")), "caret-begin"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift LEFT")), "selection-backward"); + harness.check(taim.get(KeyStroke.getKeyStroke("ctrl END")), "caret-end"); + harness.check(taim.get(KeyStroke.getKeyStroke("BACK_SPACE")), "delete-previous"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift ctrl RIGHT")), "selection-next-word"); + harness.check(taim.get(KeyStroke.getKeyStroke("LEFT")), "caret-backward"); + harness.check(taim.get(KeyStroke.getKeyStroke("KP_LEFT")), "caret-backward"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift KP_RIGHT")), "selection-forward"); + harness.check(taim.get(KeyStroke.getKeyStroke("ctrl SPACE")), "activate-link-action"); + harness.check(taim.get(KeyStroke.getKeyStroke("ctrl H")), "delete-previous"); + harness.check(taim.get(KeyStroke.getKeyStroke("ctrl BACK_SLASH")), "unselect"); + harness.check(taim.get(KeyStroke.getKeyStroke("ENTER")), "insert-break"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift HOME")), "selection-begin-line"); + harness.check(taim.get(KeyStroke.getKeyStroke("RIGHT")), "caret-forward"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift ctrl PAGE_UP")), "selection-page-left"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift DOWN")), "selection-down"); + harness.check(taim.get(KeyStroke.getKeyStroke("PAGE_DOWN")), "page-down"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift KP_LEFT")), "selection-backward"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift ctrl O")), "toggle-componentOrientation"); + harness.check(taim.get(KeyStroke.getKeyStroke("ctrl X")), "cut-to-clipboard"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN")), "selection-page-right"); + harness.check(taim.get(KeyStroke.getKeyStroke("ctrl C")), "copy-to-clipboard"); + harness.check(taim.get(KeyStroke.getKeyStroke("ctrl KP_RIGHT")), "caret-next-word"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift END")), "selection-end-line"); + harness.check(taim.get(KeyStroke.getKeyStroke("ctrl KP_LEFT")), "caret-previous-word"); + harness.check(taim.get(KeyStroke.getKeyStroke("HOME")), "caret-begin-line"); + harness.check(taim.get(KeyStroke.getKeyStroke("ctrl V")), "paste-from-clipboard"); + harness.check(taim.get(KeyStroke.getKeyStroke("KP_DOWN")), "caret-down"); + harness.check(taim.get(KeyStroke.getKeyStroke("ctrl A")), "select-all"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift RIGHT")), "selection-forward"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift ctrl END")), "selection-end"); + harness.check(taim.get(KeyStroke.getKeyStroke("COPY")), "copy-to-clipboard"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift ctrl KP_LEFT")), "selection-previous-word"); + harness.check(taim.get(KeyStroke.getKeyStroke("ctrl T")), "next-link-action"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift KP_DOWN")), "selection-down"); + harness.check(taim.get(KeyStroke.getKeyStroke("TAB")), "insert-tab"); + harness.check(taim.get(KeyStroke.getKeyStroke("UP")), "caret-up"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift ctrl HOME")), "selection-begin"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift PAGE_DOWN")), "selection-page-down"); + harness.check(taim.get(KeyStroke.getKeyStroke("KP_RIGHT")), "caret-forward"); + harness.check(taim.get(KeyStroke.getKeyStroke("shift ctrl KP_RIGHT")), "selection-next-word"); + harness.check(taim.get(KeyStroke.getKeyStroke("PAGE_UP")), "page-up"); + harness.check(taim.get(KeyStroke.getKeyStroke("PASTE")), "paste-from-clipboard"); harness.checkPoint("TextField"); harness.check(defaults.get("TextField.border") instanceof BasicBorders.FieldBorder); @@ -399,7 +494,43 @@ 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"); + InputMapUIResource tfim = (InputMapUIResource) tf; + harness.check(tfim.keys().length == 55); + harness.check(tfim.get(KeyStroke.getKeyStroke("ENTER")), "insert-break"); + 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"); + harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl X")), "cut-to-clipboard"); + harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl C")), "copy-to-clipboard"); + harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl V")), "paste-from-clipboard"); + harness.check(tfim.get(KeyStroke.getKeyStroke("shift LEFT")), "selection-backward"); + harness.check(tfim.get(KeyStroke.getKeyStroke("shift RIGHT")), "selection-forward"); + harness.check(tfim.get(KeyStroke.getKeyStroke("HOME")), "caret-begin-line"); + harness.check(tfim.get(KeyStroke.getKeyStroke("END")), "caret-end-line"); + harness.check(tfim.get(KeyStroke.getKeyStroke("DELETE")), "delete-next"); + harness.check(tfim.get(KeyStroke.getKeyStroke("shift ctrl O")), "toggle-componentOrientation"); + harness.check(tfim.get(KeyStroke.getKeyStroke("shift KP_LEFT")), "selection-backward"); + harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl H")), "delete-previous"); + harness.check(tfim.get(KeyStroke.getKeyStroke("KP_LEFT")), "caret-backward"); + harness.check(tfim.get(KeyStroke.getKeyStroke("KP_RIGHT")), "caret-forward"); + harness.check(tfim.get(KeyStroke.getKeyStroke("shift ctrl KP_RIGHT")), "selection-next-word"); + harness.check(tfim.get(KeyStroke.getKeyStroke("COPY")), "copy-to-clipboard"); + harness.check(tfim.get(KeyStroke.getKeyStroke("shift HOME")), "selection-begin-line"); + harness.check(tfim.get(KeyStroke.getKeyStroke("shift ctrl LEFT")), "selection-previous-word"); + harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl KP_LEFT")), "caret-previous-word"); + harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl KP_RIGHT")), "caret-next-word"); + harness.check(tfim.get(KeyStroke.getKeyStroke("PASTE")), "paste-from-clipboard"); + harness.check(tfim.get(KeyStroke.getKeyStroke("shift ctrl RIGHT")), "selection-next-word"); + harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl BACK_SLASH")), "unselect"); + harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl A")), "select-all"); + harness.check(tfim.get(KeyStroke.getKeyStroke("shift KP_RIGHT")), "selection-forward"); + harness.check(tfim.get(KeyStroke.getKeyStroke("CUT")), "cut-to-clipboard"); + harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl LEFT")), "caret-previous-word"); + harness.check(tfim.get(KeyStroke.getKeyStroke("shift ctrl KP_LEFT")), "selection-previous-word"); + harness.check(tfim.get(KeyStroke.getKeyStroke("shift END")), "selection-end-line"); + harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl RIGHT")), "caret-next-word"); + harness.checkPoint("TextPane"); harness.check(defaults.get("TextPane.background"), new ColorUIResource(255, 255, 255)); harness.check(defaults.get("TextPane.border") instanceof BasicBorders.MarginBorder); @@ -407,6 +538,64 @@ harness.check(defaults.get("TextPane.font"), new FontUIResource("Serif", Font.PLAIN, 12)); harness.check(defaults.get("TextPane.margin"), new InsetsUIResource(3, 3, 3, 3)); harness.check(UIManager.get("TextPane.focusInputMap") instanceof InputMapUIResource); + Object tp = UIManager.get("TextPane.focusInputMap"); + InputMapUIResource tpim = (InputMapUIResource) tp; + harness.check(tpim.keys().length == 55); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift UP")), "selection-up"); + harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl RIGHT")), "caret-next-word"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift ctrl LEFT")), "selection-previous-word"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift KP_UP")), "selection-up"); + harness.check(tpim.get(KeyStroke.getKeyStroke("DOWN")), "caret-down"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift ctrl T")), "previous-link-action"); + harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl LEFT")), "caret-previous-word"); + harness.check(tpim.get(KeyStroke.getKeyStroke("CUT")), "cut-to-clipboard"); + harness.check(tpim.get(KeyStroke.getKeyStroke("END")), "caret-end-line"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift PAGE_UP")), "selection-page-up"); + harness.check(tpim.get(KeyStroke.getKeyStroke("KP_UP")), "caret-up"); + harness.check(tpim.get(KeyStroke.getKeyStroke("DELETE")), "delete-next"); + harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl HOME")), "caret-begin"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift LEFT")), "selection-backward"); + harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl END")), "caret-end"); + harness.check(tpim.get(KeyStroke.getKeyStroke("BACK_SPACE")), "delete-previous"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift ctrl RIGHT")), "selection-next-word"); + harness.check(tpim.get(KeyStroke.getKeyStroke("LEFT")), "caret-backward"); + harness.check(tpim.get(KeyStroke.getKeyStroke("KP_LEFT")), "caret-backward"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift KP_RIGHT")), "selection-forward"); + harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl SPACE")), "activate-link-action"); + harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl H")), "delete-previous"); + harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl BACK_SLASH")), "unselect"); + harness.check(tpim.get(KeyStroke.getKeyStroke("ENTER")), "insert-break"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift HOME")), "selection-begin-line"); + harness.check(tpim.get(KeyStroke.getKeyStroke("RIGHT")), "caret-forward"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift ctrl PAGE_UP")), "selection-page-left"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift DOWN")), "selection-down"); + harness.check(tpim.get(KeyStroke.getKeyStroke("PAGE_DOWN")), "page-down"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift KP_LEFT")), "selection-backward"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift ctrl O")), "toggle-componentOrientation"); + harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl X")), "cut-to-clipboard"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN")), "selection-page-right"); + harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl C")), "copy-to-clipboard"); + harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl KP_RIGHT")), "caret-next-word"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift END")), "selection-end-line"); + harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl KP_LEFT")), "caret-previous-word"); + harness.check(tpim.get(KeyStroke.getKeyStroke("HOME")), "caret-begin-line"); + harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl V")), "paste-from-clipboard"); + harness.check(tpim.get(KeyStroke.getKeyStroke("KP_DOWN")), "caret-down"); + harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl A")), "select-all"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift RIGHT")), "selection-forward"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift ctrl END")), "selection-end"); + harness.check(tpim.get(KeyStroke.getKeyStroke("COPY")), "copy-to-clipboard"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift ctrl KP_LEFT")), "selection-previous-word"); + harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl T")), "next-link-action"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift KP_DOWN")), "selection-down"); + harness.check(tpim.get(KeyStroke.getKeyStroke("TAB")), "insert-tab"); + harness.check(tpim.get(KeyStroke.getKeyStroke("UP")), "caret-up"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift ctrl HOME")), "selection-begin"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift PAGE_DOWN")), "selection-page-down"); + harness.check(tpim.get(KeyStroke.getKeyStroke("KP_RIGHT")), "caret-forward"); + harness.check(tpim.get(KeyStroke.getKeyStroke("shift ctrl KP_RIGHT")), "selection-next-word"); + harness.check(tpim.get(KeyStroke.getKeyStroke("PAGE_UP")), "page-up"); + harness.check(tpim.get(KeyStroke.getKeyStroke("PASTE")), "paste-from-clipboard"); harness.checkPoint("TitledBorder"); harness.check(defaults.get("TitledBorder.border") instanceof BorderUIResource.EtchedBorderUIResource);