Index: javax/swing/UIDefaults.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/UIDefaults.java,v retrieving revision 1.25 diff -u -r1.25 UIDefaults.java --- javax/swing/UIDefaults.java 21 Dec 2005 19:58:32 -0000 1.25 +++ javax/swing/UIDefaults.java 21 Dec 2005 20:59:14 -0000 @@ -99,7 +99,11 @@ InputMapUIResource im = new InputMapUIResource (); for (int i = 0; 2*i+1 < bind.length; ++i) { - im.put (KeyStroke.getKeyStroke ((String) bind[2*i]), + Object curr = bind[2*i]; + if (curr instanceof KeyStroke) + im.put((KeyStroke) curr, bind[2*i+1]); + else + im.put(KeyStroke.getKeyStroke((String) curr), bind[2*i+1]); } return im; Index: javax/swing/plaf/basic/BasicLookAndFeel.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicLookAndFeel.java,v retrieving revision 1.73 diff -u -r1.73 BasicLookAndFeel.java --- javax/swing/plaf/basic/BasicLookAndFeel.java 21 Dec 2005 20:05:48 -0000 1.73 +++ javax/swing/plaf/basic/BasicLookAndFeel.java 21 Dec 2005 20:59:14 -0000 @@ -768,39 +768,39 @@ "PasswordField.inactiveBackground", new ColorUIResource(light), "PasswordField.inactiveForeground", new ColorUIResource(Color.gray), "PasswordField.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { - "END", "caret-end-line", - "shift ctrl O", "toggle-componentOrientation", - "shift KP_LEFT", "selection-backward", - "shift RIGHT", "selection-forward", - "HOME", "caret-begin-line", - "ctrl V", "paste-from-clipboard", - "ctrl H", "delete-previous", - "KP_LEFT", "caret-backward", - "LEFT", "caret-backward", - "ctrl X", "cut-to-clipboard", - "KP_RIGHT", "caret-forward", - "shift ctrl KP_RIGHT", "selection-end-line", - "COPY", "copy-to-clipboard", - "shift HOME", "selection-begin-line", - "RIGHT", "caret-forward", - "shift ctrl LEFT", "selection-begin-line", - "ctrl KP_LEFT", "caret-begin-line", - "ctrl KP_RIGHT", "caret-end-line", - "PASTE", "paste-from-clipboard", - "shift ctrl RIGHT", "selection-end-line", - "ctrl BACK_SLASH", "unselect", - "ctrl A", "select-all", - "shift KP_RIGHT", "selection-forward", - "CUT", "cut-to-clipboard", - "ctrl LEFT", "caret-begin-line", - "BACK_SPACE", "delete-previous", - "shift ctrl KP_LEFT", "selection-begin-line", - "ctrl C", "copy-to-clipboard", - "shift END", "selection-end-line", - "ctrl RIGHT", "caret-end-line", - "DELETE", "delete-next", - "ENTER", "notify-field-accept", - "shift LEFT", "selection-backward" + KeyStroke.getKeyStroke("END"), "caret-end-line", + KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation", + KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward", + KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward", + KeyStroke.getKeyStroke("HOME"), "caret-begin-line", + KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard", + KeyStroke.getKeyStroke("ctrl H"), "delete-previous", + KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward", + KeyStroke.getKeyStroke("LEFT"), "caret-backward", + KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard", + KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward", + KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-end-line", + KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard", + KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line", + KeyStroke.getKeyStroke("RIGHT"), "caret-forward", + KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-begin-line", + KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-begin-line", + KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-end-line", + KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard", + KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-end-line", + KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect", + KeyStroke.getKeyStroke("ctrl A"), "select-all", + KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward", + KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard", + KeyStroke.getKeyStroke("ctrl LEFT"), "caret-begin-line", + KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous", + KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-begin-line", + KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard", + KeyStroke.getKeyStroke("shift END"), "selection-end-line", + KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-end-line", + KeyStroke.getKeyStroke("DELETE"), "delete-next", + KeyStroke.getKeyStroke("ENTER"), "notify-field-accept", + KeyStroke.getKeyStroke("shift LEFT"), "selection-backward" }), "PasswordField.margin", new InsetsUIResource(0, 0, 0, 0), "PasswordField.selectionBackground", new ColorUIResource(Color.black), @@ -1090,61 +1090,61 @@ "TextArea.foreground", new ColorUIResource(Color.black), "TextArea.inactiveForeground", new ColorUIResource(Color.gray), "TextArea.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { - "shift UP", "selection-up", - "ctrl RIGHT", "caret-next-word", - "shift ctrl LEFT", "selection-previous-word", - "shift KP_UP", "selection-up", - "DOWN", "caret-down", - "shift ctrl T", "previous-link-action", - "ctrl LEFT", "caret-previous-word", - "CUT", "cut-to-clipboard", - "END", "caret-end-line", - "shift PAGE_UP", "selection-page-up", - "KP_UP", "caret-up", - "DELETE", "delete-next", - "ctrl HOME", "caret-begin", - "shift LEFT", "selection-backward", - "ctrl END", "caret-end", - "BACK_SPACE", "delete-previous", - "shift ctrl RIGHT", "selection-next-word", - "LEFT", "caret-backward", - "KP_LEFT", "caret-backward", - "shift KP_RIGHT", "selection-forward", - "ctrl SPACE", "activate-link-action", - "ctrl H", "delete-previous", - "ctrl BACK_SLASH", "unselect", - "ENTER", "insert-break", - "shift HOME", "selection-begin-line", - "RIGHT", "caret-forward", - "shift ctrl PAGE_UP", "selection-page-left", - "shift DOWN", "selection-down", - "PAGE_DOWN", "page-down", - "shift KP_LEFT", "selection-backward", - "shift ctrl O", "toggle-componentOrientation", - "ctrl X", "cut-to-clipboard", - "shift ctrl PAGE_DOWN", "selection-page-right", - "ctrl C", "copy-to-clipboard", - "ctrl KP_RIGHT", "caret-next-word", - "shift END", "selection-end-line", - "ctrl KP_LEFT", "caret-previous-word", - "HOME", "caret-begin-line", - "ctrl V", "paste-from-clipboard", - "KP_DOWN", "caret-down", - "ctrl A", "select-all", - "shift RIGHT", "selection-forward", - "shift ctrl END", "selection-end", - "COPY", "copy-to-clipboard", - "shift ctrl KP_LEFT", "selection-previous-word", - "ctrl T", "next-link-action", - "shift KP_DOWN", "selection-down", - "TAB", "insert-tab", - "UP", "caret-up", - "shift ctrl HOME", "selection-begin", - "shift PAGE_DOWN", "selection-page-down", - "KP_RIGHT", "caret-forward", - "shift ctrl KP_RIGHT", "selection-next-word", - "PAGE_UP", "page-up", - "PASTE", "paste-from-clipboard" + KeyStroke.getKeyStroke("shift UP"), "selection-up", + KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word", + KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word", + KeyStroke.getKeyStroke("shift KP_UP"), "selection-up", + KeyStroke.getKeyStroke("DOWN"), "caret-down", + KeyStroke.getKeyStroke("shift ctrl T"), "previous-link-action", + KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word", + KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard", + KeyStroke.getKeyStroke("END"), "caret-end-line", + KeyStroke.getKeyStroke("shift PAGE_UP"), "selection-page-up", + KeyStroke.getKeyStroke("KP_UP"), "caret-up", + KeyStroke.getKeyStroke("DELETE"), "delete-next", + KeyStroke.getKeyStroke("ctrl HOME"), "caret-begin", + KeyStroke.getKeyStroke("shift LEFT"), "selection-backward", + KeyStroke.getKeyStroke("ctrl END"), "caret-end", + KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous", + KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word", + KeyStroke.getKeyStroke("LEFT"), "caret-backward", + KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward", + KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward", + KeyStroke.getKeyStroke("ctrl SPACE"), "activate-link-action", + KeyStroke.getKeyStroke("ctrl H"), "delete-previous", + KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect", + KeyStroke.getKeyStroke("ENTER"), "insert-break", + KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line", + KeyStroke.getKeyStroke("RIGHT"), "caret-forward", + KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "selection-page-left", + KeyStroke.getKeyStroke("shift DOWN"), "selection-down", + KeyStroke.getKeyStroke("PAGE_DOWN"), "page-down", + KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward", + KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation", + KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard", + KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "selection-page-right", + KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard", + KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word", + KeyStroke.getKeyStroke("shift END"), "selection-end-line", + KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word", + KeyStroke.getKeyStroke("HOME"), "caret-begin-line", + KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard", + KeyStroke.getKeyStroke("KP_DOWN"), "caret-down", + KeyStroke.getKeyStroke("ctrl A"), "select-all", + KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward", + KeyStroke.getKeyStroke("shift ctrl END"), "selection-end", + KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard", + KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word", + KeyStroke.getKeyStroke("ctrl T"), "next-link-action", + KeyStroke.getKeyStroke("shift KP_DOWN"), "selection-down", + KeyStroke.getKeyStroke("TAB"), "insert-tab", + KeyStroke.getKeyStroke("UP"), "caret-up", + KeyStroke.getKeyStroke("shift ctrl HOME"), "selection-begin", + KeyStroke.getKeyStroke("shift PAGE_DOWN"), "selection-page-down", + KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward", + KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word", + KeyStroke.getKeyStroke("PAGE_UP"), "page-up", + KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard" }), "TextArea.margin", new InsetsUIResource(0, 0, 0, 0), "TextArea.selectionBackground", new ColorUIResource(Color.black), @@ -1162,39 +1162,39 @@ "TextField.light", new ColorUIResource(highLight), "TextField.highlight", new ColorUIResource(light), "TextField.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { - "ENTER", "notify-field-accept", - "LEFT", "caret-backward", - "RIGHT", "caret-forward", - "BACK_SPACE", "delete-previous", - "ctrl X", "cut-to-clipboard", - "ctrl C", "copy-to-clipboard", - "ctrl V", "paste-from-clipboard", - "shift LEFT", "selection-backward", - "shift RIGHT", "selection-forward", - "HOME", "caret-begin-line", - "END", "caret-end-line", - "DELETE", "delete-next", - "shift ctrl O", "toggle-componentOrientation", - "shift KP_LEFT", "selection-backward", - "ctrl H", "delete-previous", - "KP_LEFT", "caret-backward", - "KP_RIGHT", "caret-forward", - "shift ctrl KP_RIGHT", "selection-next-word", - "COPY", "copy-to-clipboard", - "shift HOME", "selection-begin-line", - "shift ctrl LEFT", "selection-previous-word", - "ctrl KP_LEFT", "caret-previous-word", - "ctrl KP_RIGHT", "caret-next-word", - "PASTE", "paste-from-clipboard", - "shift ctrl RIGHT", "selection-next-word", - "ctrl BACK_SLASH", "unselect", - "ctrl A", "select-all", - "shift KP_RIGHT", "selection-forward", - "CUT", "cut-to-clipboard", - "ctrl LEFT", "caret-previous-word", - "shift ctrl KP_LEFT", "selection-previous-word", - "shift END", "selection-end-line", - "ctrl RIGHT", "caret-next-word" + KeyStroke.getKeyStroke("ENTER"), "notify-field-accept", + KeyStroke.getKeyStroke("LEFT"), "caret-backward", + KeyStroke.getKeyStroke("RIGHT"), "caret-forward", + KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous", + KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard", + KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard", + KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard", + KeyStroke.getKeyStroke("shift LEFT"), "selection-backward", + KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward", + KeyStroke.getKeyStroke("HOME"), "caret-begin-line", + KeyStroke.getKeyStroke("END"), "caret-end-line", + KeyStroke.getKeyStroke("DELETE"), "delete-next", + KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation", + KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward", + KeyStroke.getKeyStroke("ctrl H"), "delete-previous", + KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward", + KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward", + KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word", + KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard", + KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line", + KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word", + KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word", + KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word", + KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard", + KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word", + KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect", + KeyStroke.getKeyStroke("ctrl A"), "select-all", + KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward", + KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard", + KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word", + KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word", + KeyStroke.getKeyStroke("shift END"), "selection-end-line", + KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word" }), "TextField.margin", new InsetsUIResource(0, 0, 0, 0), "TextField.selectionBackground", new ColorUIResource(Color.black), @@ -1207,61 +1207,61 @@ "TextPane.foreground", new ColorUIResource(Color.black), "TextPane.inactiveForeground", new ColorUIResource(Color.gray), "TextPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { - "shift UP", "selection-up", - "ctrl RIGHT", "caret-next-word", - "shift ctrl LEFT", "selection-previous-word", - "shift KP_UP", "selection-up", - "DOWN", "caret-down", - "shift ctrl T", "previous-link-action", - "ctrl LEFT", "caret-previous-word", - "CUT", "cut-to-clipboard", - "END", "caret-end-line", - "shift PAGE_UP", "selection-page-up", - "KP_UP", "caret-up", - "DELETE", "delete-next", - "ctrl HOME", "caret-begin", - "shift LEFT", "selection-backward", - "ctrl END", "caret-end", - "BACK_SPACE", "delete-previous", - "shift ctrl RIGHT", "selection-next-word", - "LEFT", "caret-backward", - "KP_LEFT", "caret-backward", - "shift KP_RIGHT", "selection-forward", - "ctrl SPACE", "activate-link-action", - "ctrl H", "delete-previous", - "ctrl BACK_SLASH", "unselect", - "ENTER", "insert-break", - "shift HOME", "selection-begin-line", - "RIGHT", "caret-forward", - "shift ctrl PAGE_UP", "selection-page-left", - "shift DOWN", "selection-down", - "PAGE_DOWN", "page-down", - "shift KP_LEFT", "selection-backward", - "shift ctrl O", "toggle-componentOrientation", - "ctrl X", "cut-to-clipboard", - "shift ctrl PAGE_DOWN", "selection-page-right", - "ctrl C", "copy-to-clipboard", - "ctrl KP_RIGHT", "caret-next-word", - "shift END", "selection-end-line", - "ctrl KP_LEFT", "caret-previous-word", - "HOME", "caret-begin-line", - "ctrl V", "paste-from-clipboard", - "KP_DOWN", "caret-down", - "ctrl A", "select-all", - "shift RIGHT", "selection-forward", - "shift ctrl END", "selection-end", - "COPY", "copy-to-clipboard", - "shift ctrl KP_LEFT", "selection-previous-word", - "ctrl T", "next-link-action", - "shift KP_DOWN", "selection-down", - "TAB", "insert-tab", - "UP", "caret-up", - "shift ctrl HOME", "selection-begin", - "shift PAGE_DOWN", "selection-page-down", - "KP_RIGHT", "caret-forward", - "shift ctrl KP_RIGHT", "selection-next-word", - "PAGE_UP", "page-up", - "PASTE", "paste-from-clipboard" + KeyStroke.getKeyStroke("shift UP"), "selection-up", + KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word", + KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word", + KeyStroke.getKeyStroke("shift KP_UP"), "selection-up", + KeyStroke.getKeyStroke("DOWN"), "caret-down", + KeyStroke.getKeyStroke("shift ctrl T"), "previous-link-action", + KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word", + KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard", + KeyStroke.getKeyStroke("END"), "caret-end-line", + KeyStroke.getKeyStroke("shift PAGE_UP"), "selection-page-up", + KeyStroke.getKeyStroke("KP_UP"), "caret-up", + KeyStroke.getKeyStroke("DELETE"), "delete-next", + KeyStroke.getKeyStroke("ctrl HOME"), "caret-begin", + KeyStroke.getKeyStroke("shift LEFT"), "selection-backward", + KeyStroke.getKeyStroke("ctrl END"), "caret-end", + KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous", + KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word", + KeyStroke.getKeyStroke("LEFT"), "caret-backward", + KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward", + KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward", + KeyStroke.getKeyStroke("ctrl SPACE"), "activate-link-action", + KeyStroke.getKeyStroke("ctrl H"), "delete-previous", + KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect", + KeyStroke.getKeyStroke("ENTER"), "insert-break", + KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line", + KeyStroke.getKeyStroke("RIGHT"), "caret-forward", + KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "selection-page-left", + KeyStroke.getKeyStroke("shift DOWN"), "selection-down", + KeyStroke.getKeyStroke("PAGE_DOWN"), "page-down", + KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward", + KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation", + KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard", + KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "selection-page-right", + KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard", + KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word", + KeyStroke.getKeyStroke("shift END"), "selection-end-line", + KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word", + KeyStroke.getKeyStroke("HOME"), "caret-begin-line", + KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard", + KeyStroke.getKeyStroke("KP_DOWN"), "caret-down", + KeyStroke.getKeyStroke("ctrl A"), "select-all", + KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward", + KeyStroke.getKeyStroke("shift ctrl END"), "selection-end", + KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard", + KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word", + KeyStroke.getKeyStroke("ctrl T"), "next-link-action", + KeyStroke.getKeyStroke("shift KP_DOWN"), "selection-down", + KeyStroke.getKeyStroke("TAB"), "insert-tab", + KeyStroke.getKeyStroke("UP"), "caret-up", + KeyStroke.getKeyStroke("shift ctrl HOME"), "selection-begin", + KeyStroke.getKeyStroke("shift PAGE_DOWN"), "selection-page-down", + KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward", + KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word", + KeyStroke.getKeyStroke("PAGE_UP"), "page-up", + KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard" }), "TextPane.margin", new InsetsUIResource(3, 3, 3, 3), "TextPane.selectionBackground", new ColorUIResource(Color.black), Index: javax/swing/plaf/basic/BasicTextUI.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTextUI.java,v retrieving revision 1.59 diff -u -r1.59 BasicTextUI.java --- javax/swing/plaf/basic/BasicTextUI.java 21 Dec 2005 19:58:14 -0000 1.59 +++ javax/swing/plaf/basic/BasicTextUI.java 21 Dec 2005 20:59:14 -0000 @@ -655,9 +655,7 @@ SwingUtilities.replaceUIActionMap(textComponent, createActionMap()); InputMap focusInputMap = (InputMap) UIManager.get(getPropertyPrefix() + ".focusInputMap"); - InputMapUIResource parentInputMap = new InputMapUIResource(); ActionMap parentActionMap = new ActionMapUIResource(); - KeyStroke[] keys = focusInputMap.allKeys(); Action[] actions = textComponent.getActions(); for (int j = 0; j < actions.length; j++) @@ -666,16 +664,7 @@ parentActionMap.put(currAction.getValue(Action.NAME), currAction); } - for (int i = 0; i < keys.length; i++) - { - String act = (String) focusInputMap.get((KeyStroke) keys[i]); - parentInputMap.put(KeyStroke.getKeyStroke(act),act); - } - - parentInputMap.setParent(textComponent.getInputMap(JComponent.WHEN_FOCUSED).getParent()); - parentActionMap.setParent(textComponent.getActionMap().getParent()); - textComponent.getInputMap(JComponent.WHEN_FOCUSED).setParent(parentInputMap); - textComponent.getActionMap().setParent(parentActionMap); + SwingUtilities.replaceUIActionMap(textComponent, parentActionMap); } /**