Showing the changes to java/pkg/sun/swing/plaf/WindowsKeybindings.java (1 of 18352 files). Show all
Unified · Split
| @@ -0,0 +1,648 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved. | ||
| 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
| 4 | * | ||
| 5 | * This code is free software; you can redistribute it and/or modify it | ||
| 6 | * under the terms of the GNU General Public License version 2 only, as | ||
| 7 | * published by the Free Software Foundation. Oracle designates this | ||
| 8 | * particular file as subject to the "Classpath" exception as provided | ||
| 9 | * by Oracle in the LICENSE file that accompanied this code. | ||
| 10 | * | ||
| 11 | * This code is distributed in the hope that it will be useful, but WITHOUT | ||
| 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| 14 | * version 2 for more details (a copy is included in the LICENSE file that | ||
| 15 | * accompanied this code). | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License version | ||
| 18 | * 2 along with this work; if not, write to the Free Software Foundation, | ||
| 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 20 | * | ||
| 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | ||
| 22 | * or visit www.oracle.com if you need additional information or have any | ||
| 23 | * questions. | ||
| 24 | */ | ||
| 25 | |||
| 26 | package sun.swing.plaf; | ||
| 27 | |||
| 28 | import javax.swing.JTextField; | ||
| 29 | import javax.swing.UIDefaults; | ||
| 30 | import javax.swing.text.DefaultEditorKit; | ||
| 31 | |||
| 32 | /** | ||
| 33 | * WindowsKeybindings - The standard set of keymaps for the Windows Platform | ||
| 34 | * | ||
| 35 | * @author Jasper Potts | ||
| 36 | */ | ||
| 37 | public class WindowsKeybindings { | ||
| 38 | |||
| 39 | /** | ||
| 40 | * Install all Windows keybindings into the provided UIDefaults table | ||
| 41 | * | ||
| 42 | * @param table The UiDefaults table to install into | ||
| 43 | */ | ||
| 44 | public static void installKeybindings(UIDefaults table) { | ||
| 45 | // *** Text | ||
| 46 | Object fieldInputMap = new UIDefaults.LazyInputMap(new Object[]{ | ||
| 47 | "control C", DefaultEditorKit.copyAction, | ||
| 48 | "control V", DefaultEditorKit.pasteAction, | ||
| 49 | "control X", DefaultEditorKit.cutAction, | ||
| 50 | "COPY", DefaultEditorKit.copyAction, | ||
| 51 | "PASTE", DefaultEditorKit.pasteAction, | ||
| 52 | "CUT", DefaultEditorKit.cutAction, | ||
| 53 | "control INSERT", DefaultEditorKit.copyAction, | ||
| 54 | "shift INSERT", DefaultEditorKit.pasteAction, | ||
| 55 | "shift DELETE", DefaultEditorKit.cutAction, | ||
| 56 | "control A", DefaultEditorKit.selectAllAction, | ||
| 57 | "control BACK_SLASH", "unselect"/*DefaultEditorKit.unselectAction*/, | ||
| 58 | "shift LEFT", DefaultEditorKit.selectionBackwardAction, | ||
| 59 | "shift RIGHT", DefaultEditorKit.selectionForwardAction, | ||
| 60 | "control LEFT", DefaultEditorKit.previousWordAction, | ||
| 61 | "control RIGHT", DefaultEditorKit.nextWordAction, | ||
| 62 | "control shift LEFT", DefaultEditorKit.selectionPreviousWordAction, | ||
| 63 | "control shift RIGHT", DefaultEditorKit.selectionNextWordAction, | ||
| 64 | "HOME", DefaultEditorKit.beginLineAction, | ||
| 65 | "END", DefaultEditorKit.endLineAction, | ||
| 66 | "shift HOME", DefaultEditorKit.selectionBeginLineAction, | ||
| 67 | "shift END", DefaultEditorKit.selectionEndLineAction, | ||
| 68 | "BACK_SPACE", DefaultEditorKit.deletePrevCharAction, | ||
| 69 | "shift BACK_SPACE", DefaultEditorKit.deletePrevCharAction, | ||
| 70 | "ctrl H", DefaultEditorKit.deletePrevCharAction, | ||
| 71 | "DELETE", DefaultEditorKit.deleteNextCharAction, | ||
| 72 | "ctrl DELETE", DefaultEditorKit.deleteNextWordAction, | ||
| 73 | "ctrl BACK_SPACE", DefaultEditorKit.deletePrevWordAction, | ||
| 74 | "RIGHT", DefaultEditorKit.forwardAction, | ||
| 75 | "LEFT", DefaultEditorKit.backwardAction, | ||
| 76 | "KP_RIGHT", DefaultEditorKit.forwardAction, | ||
| 77 | "KP_LEFT", DefaultEditorKit.backwardAction, | ||
| 78 | "ENTER", JTextField.notifyAction, | ||
| 79 | "control shift O", "toggle-componentOrientation"/*DefaultEditorKit.toggleComponentOrientation*/ | ||
| 80 | }); | ||
| 81 | Object passwordInputMap = new UIDefaults.LazyInputMap(new Object[]{ | ||
| 82 | "control C", DefaultEditorKit.copyAction, | ||
| 83 | "control V", DefaultEditorKit.pasteAction, | ||
| 84 | "control X", DefaultEditorKit.cutAction, | ||
| 85 | "COPY", DefaultEditorKit.copyAction, | ||
| 86 | "PASTE", DefaultEditorKit.pasteAction, | ||
| 87 | "CUT", DefaultEditorKit.cutAction, | ||
| 88 | "control INSERT", DefaultEditorKit.copyAction, | ||
| 89 | "shift INSERT", DefaultEditorKit.pasteAction, | ||
| 90 | "shift DELETE", DefaultEditorKit.cutAction, | ||
| 91 | "control A", DefaultEditorKit.selectAllAction, | ||
| 92 | "control BACK_SLASH", "unselect"/*DefaultEditorKit.unselectAction*/, | ||
| 93 | "shift LEFT", DefaultEditorKit.selectionBackwardAction, | ||
| 94 | "shift RIGHT", DefaultEditorKit.selectionForwardAction, | ||
| 95 | "control LEFT", DefaultEditorKit.beginLineAction, | ||
| 96 | "control RIGHT", DefaultEditorKit.endLineAction, | ||
| 97 | "control shift LEFT", DefaultEditorKit.selectionBeginLineAction, | ||
| 98 | "control shift RIGHT", DefaultEditorKit.selectionEndLineAction, | ||
| 99 | "HOME", DefaultEditorKit.beginLineAction, | ||
| 100 | "END", DefaultEditorKit.endLineAction, | ||
| 101 | "shift HOME", DefaultEditorKit.selectionBeginLineAction, | ||
| 102 | "shift END", DefaultEditorKit.selectionEndLineAction, | ||
| 103 | "BACK_SPACE", DefaultEditorKit.deletePrevCharAction, | ||
| 104 | "shift BACK_SPACE", DefaultEditorKit.deletePrevCharAction, | ||
| 105 | "ctrl H", DefaultEditorKit.deletePrevCharAction, | ||
| 106 | "DELETE", DefaultEditorKit.deleteNextCharAction, | ||
| 107 | "RIGHT", DefaultEditorKit.forwardAction, | ||
| 108 | "LEFT", DefaultEditorKit.backwardAction, | ||
| 109 | "KP_RIGHT", DefaultEditorKit.forwardAction, | ||
| 110 | "KP_LEFT", DefaultEditorKit.backwardAction, | ||
| 111 | "ENTER", JTextField.notifyAction, | ||
| 112 | "control shift O", "toggle-componentOrientation"/*DefaultEditorKit.toggleComponentOrientation*/ | ||
| 113 | }); | ||
| 114 | Object multilineInputMap = new UIDefaults.LazyInputMap(new Object[]{ | ||
| 115 | "control C", DefaultEditorKit.copyAction, | ||
| 116 | "control V", DefaultEditorKit.pasteAction, | ||
| 117 | "control X", DefaultEditorKit.cutAction, | ||
| 118 | "COPY", DefaultEditorKit.copyAction, | ||
| 119 | "PASTE", DefaultEditorKit.pasteAction, | ||
| 120 | "CUT", DefaultEditorKit.cutAction, | ||
| 121 | "control INSERT", DefaultEditorKit.copyAction, | ||
| 122 | "shift INSERT", DefaultEditorKit.pasteAction, | ||
| 123 | "shift DELETE", DefaultEditorKit.cutAction, | ||
| 124 | "shift LEFT", DefaultEditorKit.selectionBackwardAction, | ||
| 125 | "shift RIGHT", DefaultEditorKit.selectionForwardAction, | ||
| 126 | "control LEFT", DefaultEditorKit.previousWordAction, | ||
| 127 | "control RIGHT", DefaultEditorKit.nextWordAction, | ||
| 128 | "control shift LEFT", DefaultEditorKit.selectionPreviousWordAction, | ||
| 129 | "control shift RIGHT", DefaultEditorKit.selectionNextWordAction, | ||
| 130 | "control A", DefaultEditorKit.selectAllAction, | ||
| 131 | "control BACK_SLASH", "unselect"/*DefaultEditorKit.unselectAction*/, | ||
| 132 | "HOME", DefaultEditorKit.beginLineAction, | ||
| 133 | "END", DefaultEditorKit.endLineAction, | ||
| 134 | "shift HOME", DefaultEditorKit.selectionBeginLineAction, | ||
| 135 | "shift END", DefaultEditorKit.selectionEndLineAction, | ||
| 136 | "control HOME", DefaultEditorKit.beginAction, | ||
| 137 | "control END", DefaultEditorKit.endAction, | ||
| 138 | "control shift HOME", DefaultEditorKit.selectionBeginAction, | ||
| 139 | "control shift END", DefaultEditorKit.selectionEndAction, | ||
| 140 | "UP", DefaultEditorKit.upAction, | ||
| 141 | "DOWN", DefaultEditorKit.downAction, | ||
| 142 | "BACK_SPACE", DefaultEditorKit.deletePrevCharAction, | ||
| 143 | "shift BACK_SPACE", DefaultEditorKit.deletePrevCharAction, | ||
| 144 | "ctrl H", DefaultEditorKit.deletePrevCharAction, | ||
| 145 | "DELETE", DefaultEditorKit.deleteNextCharAction, | ||
| 146 | "ctrl DELETE", DefaultEditorKit.deleteNextWordAction, | ||
| 147 | "ctrl BACK_SPACE", DefaultEditorKit.deletePrevWordAction, | ||
| 148 | "RIGHT", DefaultEditorKit.forwardAction, | ||
| 149 | "LEFT", DefaultEditorKit.backwardAction, | ||
| 150 | "KP_RIGHT", DefaultEditorKit.forwardAction, | ||
| 151 | "KP_LEFT", DefaultEditorKit.backwardAction, | ||
| 152 | "PAGE_UP", DefaultEditorKit.pageUpAction, | ||
| 153 | "PAGE_DOWN", DefaultEditorKit.pageDownAction, | ||
| 154 | "shift PAGE_UP", "selection-page-up", | ||
| 155 | "shift PAGE_DOWN", "selection-page-down", | ||
| 156 | "ctrl shift PAGE_UP", "selection-page-left", | ||
| 157 | "ctrl shift PAGE_DOWN", "selection-page-right", | ||
| 158 | "shift UP", DefaultEditorKit.selectionUpAction, | ||
| 159 | "shift DOWN", DefaultEditorKit.selectionDownAction, | ||
| 160 | "ENTER", DefaultEditorKit.insertBreakAction, | ||
| 161 | "TAB", DefaultEditorKit.insertTabAction, | ||
| 162 | "control T", "next-link-action", | ||
| 163 | "control shift T", "previous-link-action", | ||
| 164 | "control SPACE", "activate-link-action", | ||
| 165 | "control shift O", "toggle-componentOrientation"/*DefaultEditorKit.toggleComponentOrientation*/ | ||
| 166 | }); | ||
| 167 | Object[] defaults = { | ||
| 168 | "TextField.focusInputMap", fieldInputMap, | ||
| 169 | "PasswordField.focusInputMap", passwordInputMap, | ||
| 170 | "TextArea.focusInputMap", multilineInputMap, | ||
| 171 | "TextPane.focusInputMap", multilineInputMap, | ||
| 172 | "EditorPane.focusInputMap", multilineInputMap, | ||
| 173 | "Button.focusInputMap", | ||
| 174 | new UIDefaults.LazyInputMap(new Object[]{ | ||
| 175 | "SPACE", "pressed", | ||
| 176 | "released SPACE", "released" | ||
| 177 | }), | ||
| 178 | "CheckBox.focusInputMap", | ||
| 179 | new UIDefaults.LazyInputMap(new Object[]{ | ||
| 180 | "SPACE", "pressed", | ||
| 181 | "released SPACE", "released" | ||
| 182 | }), | ||
| 183 | "ComboBox.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[]{ | ||
| 184 | "ESCAPE", "hidePopup", | ||
| 185 | "PAGE_UP", "pageUpPassThrough", | ||
| 186 | "PAGE_DOWN", "pageDownPassThrough", | ||
| 187 | "HOME", "homePassThrough", | ||
| 188 | "END", "endPassThrough", | ||
| 189 | "DOWN", "selectNext2", | ||
| 190 | "KP_DOWN", "selectNext2", | ||
| 191 | "UP", "selectPrevious2", | ||
| 192 | "KP_UP", "selectPrevious2", | ||
| 193 | "ENTER", "enterPressed", | ||
| 194 | "F4", "togglePopup", | ||
| 195 | "alt DOWN", "togglePopup", | ||
| 196 | "alt KP_DOWN", "togglePopup", | ||
| 197 | "alt UP", "togglePopup", | ||
| 198 | "alt KP_UP", "togglePopup" | ||
| 199 | }), | ||
| 200 | "Desktop.ancestorInputMap", | ||
| 201 | new UIDefaults.LazyInputMap(new Object[]{ | ||
| 202 | "ctrl F5", "restore", | ||
| 203 | "ctrl F4", "close", | ||
| 204 | "ctrl F7", "move", | ||
| 205 | "ctrl F8", "resize", | ||
| 206 | "RIGHT", "right", | ||
| 207 | "KP_RIGHT", "right", | ||
| 208 | "LEFT", "left", | ||
| 209 | "KP_LEFT", "left", | ||
| 210 | "UP", "up", | ||
| 211 | "KP_UP", "up", | ||
| 212 | "DOWN", "down", | ||
| 213 | "KP_DOWN", "down", | ||
| 214 | "ESCAPE", "escape", | ||
| 215 | "ctrl F9", "minimize", | ||
| 216 | "ctrl F10", "maximize", | ||
| 217 | "ctrl F6", "selectNextFrame", | ||
| 218 | "ctrl TAB", "selectNextFrame", | ||
| 219 | "ctrl alt F6", "selectNextFrame", | ||
| 220 | "shift ctrl alt F6", "selectPreviousFrame", | ||
| 221 | "ctrl F12", "navigateNext", | ||
| 222 | "shift ctrl F12", "navigatePrevious" | ||
| 223 | }), | ||
| 224 | "FileChooser.ancestorInputMap", | ||
| 225 | new UIDefaults.LazyInputMap(new Object[]{ | ||
| 226 | "ESCAPE", "cancelSelection", | ||
| 227 | "F2", "editFileName", | ||
| 228 | "F5", "refresh", | ||
| 229 | "BACK_SPACE", "Go Up", | ||
| 230 | "ENTER", "approveSelection", | ||
| 231 | "ctrl ENTER", "approveSelection" | ||
| 232 | }), | ||
| 233 | "InternalFrame.windowBindings", new Object[]{ | ||
| 234 | "shift ESCAPE", "showSystemMenu", | ||
| 235 | "ctrl SPACE", "showSystemMenu", | ||
| 236 | "ESCAPE", "hideSystemMenu" | ||
| 237 | }, | ||
| 238 | "List.focusInputMap", | ||
| 239 | new UIDefaults.LazyInputMap(new Object[]{ | ||
| 240 | "ctrl C", "copy", | ||
| 241 | "ctrl V", "paste", | ||
| 242 | "ctrl X", "cut", | ||
| 243 | "COPY", "copy", | ||
| 244 | "PASTE", "paste", | ||
| 245 | "CUT", "cut", | ||
| 246 | "control INSERT", "copy", | ||
| 247 | "shift INSERT", "paste", | ||
| 248 | "shift DELETE", "cut", | ||
| 249 | "UP", "selectPreviousRow", | ||
| 250 | "KP_UP", "selectPreviousRow", | ||
| 251 | "shift UP", "selectPreviousRowExtendSelection", | ||
| 252 | "shift KP_UP", "selectPreviousRowExtendSelection", | ||
| 253 | "ctrl shift UP", "selectPreviousRowExtendSelection", | ||
| 254 | "ctrl shift KP_UP", "selectPreviousRowExtendSelection", | ||
| 255 | "ctrl UP", "selectPreviousRowChangeLead", | ||
| 256 | "ctrl KP_UP", "selectPreviousRowChangeLead", | ||
| 257 | "DOWN", "selectNextRow", | ||
| 258 | "KP_DOWN", "selectNextRow", | ||
| 259 | "shift DOWN", "selectNextRowExtendSelection", | ||
| 260 | "shift KP_DOWN", "selectNextRowExtendSelection", | ||
| 261 | "ctrl shift DOWN", "selectNextRowExtendSelection", | ||
| 262 | "ctrl shift KP_DOWN", "selectNextRowExtendSelection", | ||
| 263 | "ctrl DOWN", "selectNextRowChangeLead", | ||
| 264 | "ctrl KP_DOWN", "selectNextRowChangeLead", | ||
| 265 | "LEFT", "selectPreviousColumn", | ||
| 266 | "KP_LEFT", "selectPreviousColumn", | ||
| 267 | "shift LEFT", "selectPreviousColumnExtendSelection", | ||
| 268 | "shift KP_LEFT", "selectPreviousColumnExtendSelection", | ||
| 269 | "ctrl shift LEFT", "selectPreviousColumnExtendSelection", | ||
| 270 | "ctrl shift KP_LEFT", "selectPreviousColumnExtendSelection", | ||
| 271 | "ctrl LEFT", "selectPreviousColumnChangeLead", | ||
| 272 | "ctrl KP_LEFT", "selectPreviousColumnChangeLead", | ||
| 273 | "RIGHT", "selectNextColumn", | ||
| 274 | "KP_RIGHT", "selectNextColumn", | ||
| 275 | "shift RIGHT", "selectNextColumnExtendSelection", | ||
| 276 | "shift KP_RIGHT", "selectNextColumnExtendSelection", | ||
| 277 | "ctrl shift RIGHT", "selectNextColumnExtendSelection", | ||
| 278 | "ctrl shift KP_RIGHT", "selectNextColumnExtendSelection", | ||
| 279 | "ctrl RIGHT", "selectNextColumnChangeLead", | ||
| 280 | "ctrl KP_RIGHT", "selectNextColumnChangeLead", | ||
| 281 | "HOME", "selectFirstRow", | ||
| 282 | "shift HOME", "selectFirstRowExtendSelection", | ||
| 283 | "ctrl shift HOME", "selectFirstRowExtendSelection", | ||
| 284 | "ctrl HOME", "selectFirstRowChangeLead", | ||
| 285 | "END", "selectLastRow", | ||
| 286 | "shift END", "selectLastRowExtendSelection", | ||
| 287 | "ctrl shift END", "selectLastRowExtendSelection", | ||
| 288 | "ctrl END", "selectLastRowChangeLead", | ||
| 289 | "PAGE_UP", "scrollUp", | ||
| 290 | "shift PAGE_UP", "scrollUpExtendSelection", | ||
| 291 | "ctrl shift PAGE_UP", "scrollUpExtendSelection", | ||
| 292 | "ctrl PAGE_UP", "scrollUpChangeLead", | ||
| 293 | "PAGE_DOWN", "scrollDown", | ||
| 294 | "shift PAGE_DOWN", "scrollDownExtendSelection", | ||
| 295 | "ctrl shift PAGE_DOWN", "scrollDownExtendSelection", | ||
| 296 | "ctrl PAGE_DOWN", "scrollDownChangeLead", | ||
| 297 | "ctrl A", "selectAll", | ||
| 298 | "ctrl SLASH", "selectAll", | ||
| 299 | "ctrl BACK_SLASH", "clearSelection", | ||
| 300 | "SPACE", "addToSelection", | ||
| 301 | "ctrl SPACE", "toggleAndAnchor", | ||
| 302 | "shift SPACE", "extendTo", | ||
| 303 | "ctrl shift SPACE", "moveSelectionTo" | ||
| 304 | }), | ||
| 305 | "MenuBar.windowBindings", new Object[]{ | ||
| 306 | "F10", "takeFocus" | ||
| 307 | }, | ||
| 308 | "RadioButton.focusInputMap", | ||
| 309 | new UIDefaults.LazyInputMap(new Object[]{ | ||
| 310 | "SPACE", "pressed", | ||
| 311 | "released SPACE", "released" | ||
| 312 | }), | ||
| 313 | "OptionPane.windowBindings", new Object[]{ | ||
| 314 | "ESCAPE", "close" | ||
| 315 | }, | ||
| 316 | "FormattedTextField.focusInputMap", | ||
| 317 | new UIDefaults.LazyInputMap(new Object[]{ | ||
| 318 | "ctrl C", DefaultEditorKit.copyAction, | ||
| 319 | "ctrl V", DefaultEditorKit.pasteAction, | ||
| 320 | "ctrl X", DefaultEditorKit.cutAction, | ||
| 321 | "COPY", DefaultEditorKit.copyAction, | ||
| 322 | "PASTE", DefaultEditorKit.pasteAction, | ||
| 323 | "CUT", DefaultEditorKit.cutAction, | ||
| 324 | "control INSERT", DefaultEditorKit.copyAction, | ||
| 325 | "shift INSERT", DefaultEditorKit.pasteAction, | ||
| 326 | "shift DELETE", DefaultEditorKit.cutAction, | ||
| 327 | "shift LEFT", DefaultEditorKit.selectionBackwardAction, | ||
| 328 | "shift KP_LEFT", DefaultEditorKit.selectionBackwardAction, | ||
| 329 | "shift RIGHT", DefaultEditorKit.selectionForwardAction, | ||
| 330 | "shift KP_RIGHT", DefaultEditorKit.selectionForwardAction, | ||
| 331 | "ctrl LEFT", DefaultEditorKit.previousWordAction, | ||
| 332 | "ctrl KP_LEFT", DefaultEditorKit.previousWordAction, | ||
| 333 | "ctrl RIGHT", DefaultEditorKit.nextWordAction, | ||
| 334 | "ctrl KP_RIGHT", DefaultEditorKit.nextWordAction, | ||
| 335 | "ctrl shift LEFT", DefaultEditorKit.selectionPreviousWordAction, | ||
| 336 | "ctrl shift KP_LEFT", DefaultEditorKit.selectionPreviousWordAction, | ||
| 337 | "ctrl shift RIGHT", DefaultEditorKit.selectionNextWordAction, | ||
| 338 | "ctrl shift KP_RIGHT", DefaultEditorKit.selectionNextWordAction, | ||
| 339 | "ctrl A", DefaultEditorKit.selectAllAction, | ||
| 340 | "HOME", DefaultEditorKit.beginLineAction, | ||
| 341 | "END", DefaultEditorKit.endLineAction, | ||
| 342 | "shift HOME", DefaultEditorKit.selectionBeginLineAction, | ||
| 343 | "shift END", DefaultEditorKit.selectionEndLineAction, | ||
| 344 | "BACK_SPACE", DefaultEditorKit.deletePrevCharAction, | ||
| 345 | "shift BACK_SPACE", DefaultEditorKit.deletePrevCharAction, | ||
| 346 | "ctrl H", DefaultEditorKit.deletePrevCharAction, | ||
| 347 | "DELETE", DefaultEditorKit.deleteNextCharAction, | ||
| 348 | "ctrl DELETE", DefaultEditorKit.deleteNextWordAction, | ||
| 349 | "ctrl BACK_SPACE", DefaultEditorKit.deletePrevWordAction, | ||
| 350 | "RIGHT", DefaultEditorKit.forwardAction, | ||
| 351 | "LEFT", DefaultEditorKit.backwardAction, | ||
| 352 | "KP_RIGHT", DefaultEditorKit.forwardAction, | ||
| 353 | "KP_LEFT", DefaultEditorKit.backwardAction, | ||
| 354 | "ENTER", JTextField.notifyAction, | ||
| 355 | "ctrl BACK_SLASH", "unselect", | ||
| 356 | "control shift O", "toggle-componentOrientation", | ||
| 357 | "ESCAPE", "reset-field-edit", | ||
| 358 | "UP", "increment", | ||
| 359 | "KP_UP", "increment", | ||
| 360 | "DOWN", "decrement", | ||
| 361 | "KP_DOWN", "decrement", | ||
| 362 | }), | ||
| 363 | "RootPane.ancestorInputMap", | ||
| 364 | new UIDefaults.LazyInputMap(new Object[]{ | ||
| 365 | "shift F10", "postPopup", | ||
| 366 | "CONTEXT_MENU", "postPopup" | ||
| 367 | }), | ||
| 368 | // These bindings are only enabled when there is a default | ||
| 369 | // button set on the rootpane. | ||
| 370 | "RootPane.defaultButtonWindowKeyBindings", new Object[]{ | ||
| 371 | "ENTER", "press", | ||
| 372 | "released ENTER", "release", | ||
| 373 | "ctrl ENTER", "press", | ||
| 374 | "ctrl released ENTER", "release" | ||
| 375 | }, | ||
| 376 | "ScrollBar.ancestorInputMap", | ||
| 377 | new UIDefaults.LazyInputMap(new Object[]{ | ||
| 378 | "RIGHT", "positiveUnitIncrement", | ||
| 379 | "KP_RIGHT", "positiveUnitIncrement", | ||
| 380 | "DOWN", "positiveUnitIncrement", | ||
| 381 | "KP_DOWN", "positiveUnitIncrement", | ||
| 382 | "PAGE_DOWN", "positiveBlockIncrement", | ||
| 383 | "ctrl PAGE_DOWN", "positiveBlockIncrement", | ||
| 384 | "LEFT", "negativeUnitIncrement", | ||
| 385 | "KP_LEFT", "negativeUnitIncrement", | ||
| 386 | "UP", "negativeUnitIncrement", | ||
| 387 | "KP_UP", "negativeUnitIncrement", | ||
| 388 | "PAGE_UP", "negativeBlockIncrement", | ||
| 389 | "ctrl PAGE_UP", "negativeBlockIncrement", | ||
| 390 | "HOME", "minScroll", | ||
| 391 | "END", "maxScroll" | ||
| 392 | }), | ||
| 393 | "ScrollPane.ancestorInputMap", | ||
| 394 | new UIDefaults.LazyInputMap(new Object[]{ | ||
| 395 | "RIGHT", "unitScrollRight", | ||
| 396 | "KP_RIGHT", "unitScrollRight", | ||
| 397 | "DOWN", "unitScrollDown", | ||
| 398 | "KP_DOWN", "unitScrollDown", | ||
| 399 | "LEFT", "unitScrollLeft", | ||
| 400 | "KP_LEFT", "unitScrollLeft", | ||
| 401 | "UP", "unitScrollUp", | ||
| 402 | "KP_UP", "unitScrollUp", | ||
| 403 | "PAGE_UP", "scrollUp", | ||
| 404 | "PAGE_DOWN", "scrollDown", | ||
| 405 | "ctrl PAGE_UP", "scrollLeft", | ||
| 406 | "ctrl PAGE_DOWN", "scrollRight", | ||
| 407 | "ctrl HOME", "scrollHome", | ||
| 408 | "ctrl END", "scrollEnd" | ||
| 409 | }), | ||
| 410 | "Slider.focusInputMap", | ||
| 411 | new UIDefaults.LazyInputMap(new Object[]{ | ||
| 412 | "RIGHT", "positiveUnitIncrement", | ||
| 413 | "KP_RIGHT", "positiveUnitIncrement", | ||
| 414 | "DOWN", "negativeUnitIncrement", | ||
| 415 | "KP_DOWN", "negativeUnitIncrement", | ||
| 416 | "PAGE_DOWN", "negativeBlockIncrement", | ||
| 417 | "LEFT", "negativeUnitIncrement", | ||
| 418 | "KP_LEFT", "negativeUnitIncrement", | ||
| 419 | "UP", "positiveUnitIncrement", | ||
| 420 | "KP_UP", "positiveUnitIncrement", | ||
| 421 | "PAGE_UP", "positiveBlockIncrement", | ||
| 422 | "HOME", "minScroll", | ||
| 423 | "END", "maxScroll" | ||
| 424 | }), | ||
| 425 | "Spinner.ancestorInputMap", | ||
| 426 | new UIDefaults.LazyInputMap(new Object[]{ | ||
| 427 | "UP", "increment", | ||
| 428 | "KP_UP", "increment", | ||
| 429 | "DOWN", "decrement", | ||
| 430 | "KP_DOWN", "decrement", | ||
| 431 | }), | ||
| 432 | "SplitPane.ancestorInputMap", | ||
| 433 | new UIDefaults.LazyInputMap(new Object[]{ | ||
| 434 | "UP", "negativeIncrement", | ||
| 435 | "DOWN", "positiveIncrement", | ||
| 436 | "LEFT", "negativeIncrement", | ||
| 437 | "RIGHT", "positiveIncrement", | ||
| 438 | "KP_UP", "negativeIncrement", | ||
| 439 | "KP_DOWN", "positiveIncrement", | ||
| 440 | "KP_LEFT", "negativeIncrement", | ||
| 441 | "KP_RIGHT", "positiveIncrement", | ||
| 442 | "HOME", "selectMin", | ||
| 443 | "END", "selectMax", | ||
| 444 | "F8", "startResize", | ||
| 445 | "F6", "toggleFocus", | ||
| 446 | "ctrl TAB", "focusOutForward", | ||
| 447 | "ctrl shift TAB", "focusOutBackward" | ||
| 448 | }), | ||
| 449 | "TabbedPane.focusInputMap", | ||
| 450 | new UIDefaults.LazyInputMap(new Object[]{ | ||
| 451 | "RIGHT", "navigateRight", | ||
| 452 | "KP_RIGHT", "navigateRight", | ||
| 453 | "LEFT", "navigateLeft", | ||
| 454 | "KP_LEFT", "navigateLeft", | ||
| 455 | "UP", "navigateUp", | ||
| 456 | "KP_UP", "navigateUp", | ||
| 457 | "DOWN", "navigateDown", | ||
| 458 | "KP_DOWN", "navigateDown", | ||
| 459 | "ctrl DOWN", "requestFocusForVisibleComponent", | ||
| 460 | "ctrl KP_DOWN", "requestFocusForVisibleComponent", | ||
| 461 | }), | ||
| 462 | "TabbedPane.ancestorInputMap", | ||
| 463 | new UIDefaults.LazyInputMap(new Object[]{ | ||
| 464 | "ctrl TAB", "navigateNext", | ||
| 465 | "ctrl shift TAB", "navigatePrevious", | ||
| 466 | "ctrl PAGE_DOWN", "navigatePageDown", | ||
| 467 | "ctrl PAGE_UP", "navigatePageUp", | ||
| 468 | "ctrl UP", "requestFocus", | ||
| 469 | "ctrl KP_UP", "requestFocus", | ||
| 470 | }), | ||
| 471 | "TableHeader.ancestorInputMap", | ||
| 472 | new UIDefaults.LazyInputMap(new Object[] { | ||
| 473 | "SPACE", "toggleSortOrder", | ||
| 474 | "LEFT", "selectColumnToLeft", | ||
| 475 | "KP_LEFT", "selectColumnToLeft", | ||
| 476 | "RIGHT", "selectColumnToRight", | ||
| 477 | "KP_RIGHT", "selectColumnToRight", | ||
| 478 | "alt LEFT", "moveColumnLeft", | ||
| 479 | "alt KP_LEFT", "moveColumnLeft", | ||
| 480 | "alt RIGHT", "moveColumnRight", | ||
| 481 | "alt KP_RIGHT", "moveColumnRight", | ||
| 482 | "alt shift LEFT", "resizeLeft", | ||
| 483 | "alt shift KP_LEFT", "resizeLeft", | ||
| 484 | "alt shift RIGHT", "resizeRight", | ||
| 485 | "alt shift KP_RIGHT", "resizeRight", | ||
| 486 | "ESCAPE", "focusTable", | ||
| 487 | }), | ||
| 488 | "Table.ancestorInputMap", | ||
| 489 | new UIDefaults.LazyInputMap(new Object[]{ | ||
| 490 | "ctrl C", "copy", | ||
| 491 | "ctrl V", "paste", | ||
| 492 | "ctrl X", "cut", | ||
| 493 | "COPY", "copy", | ||
| 494 | "PASTE", "paste", | ||
| 495 | "CUT", "cut", | ||
| 496 | "control INSERT", "copy", | ||
| 497 | "shift INSERT", "paste", | ||
| 498 | "shift DELETE", "cut", | ||
| 499 | "RIGHT", "selectNextColumn", | ||
| 500 | "KP_RIGHT", "selectNextColumn", | ||
| 501 | "shift RIGHT", "selectNextColumnExtendSelection", | ||
| 502 | "shift KP_RIGHT", "selectNextColumnExtendSelection", | ||
| 503 | "ctrl shift RIGHT", "selectNextColumnExtendSelection", | ||
| 504 | "ctrl shift KP_RIGHT", "selectNextColumnExtendSelection", | ||
| 505 | "ctrl RIGHT", "selectNextColumnChangeLead", | ||
| 506 | "ctrl KP_RIGHT", "selectNextColumnChangeLead", | ||
| 507 | "LEFT", "selectPreviousColumn", | ||
| 508 | "KP_LEFT", "selectPreviousColumn", | ||
| 509 | "shift LEFT", "selectPreviousColumnExtendSelection", | ||
| 510 | "shift KP_LEFT", "selectPreviousColumnExtendSelection", | ||
| 511 | "ctrl shift LEFT", "selectPreviousColumnExtendSelection", | ||
| 512 | "ctrl shift KP_LEFT", "selectPreviousColumnExtendSelection", | ||
| 513 | "ctrl LEFT", "selectPreviousColumnChangeLead", | ||
| 514 | "ctrl KP_LEFT", "selectPreviousColumnChangeLead", | ||
| 515 | "DOWN", "selectNextRow", | ||
| 516 | "KP_DOWN", "selectNextRow", | ||
| 517 | "shift DOWN", "selectNextRowExtendSelection", | ||
| 518 | "shift KP_DOWN", "selectNextRowExtendSelection", | ||
| 519 | "ctrl shift DOWN", "selectNextRowExtendSelection", | ||
| 520 | "ctrl shift KP_DOWN", "selectNextRowExtendSelection", | ||
| 521 | "ctrl DOWN", "selectNextRowChangeLead", | ||
| 522 | "ctrl KP_DOWN", "selectNextRowChangeLead", | ||
| 523 | "UP", "selectPreviousRow", | ||
| 524 | "KP_UP", "selectPreviousRow", | ||
| 525 | "shift UP", "selectPreviousRowExtendSelection", | ||
| 526 | "shift KP_UP", "selectPreviousRowExtendSelection", | ||
| 527 | "ctrl shift UP", "selectPreviousRowExtendSelection", | ||
| 528 | "ctrl shift KP_UP", "selectPreviousRowExtendSelection", | ||
| 529 | "ctrl UP", "selectPreviousRowChangeLead", | ||
| 530 | "ctrl KP_UP", "selectPreviousRowChangeLead", | ||
| 531 | "HOME", "selectFirstColumn", | ||
| 532 | "shift HOME", "selectFirstColumnExtendSelection", | ||
| 533 | "ctrl shift HOME", "selectFirstRowExtendSelection", | ||
| 534 | "ctrl HOME", "selectFirstRow", | ||
| 535 | "END", "selectLastColumn", | ||
| 536 | "shift END", "selectLastColumnExtendSelection", | ||
| 537 | "ctrl shift END", "selectLastRowExtendSelection", | ||
| 538 | "ctrl END", "selectLastRow", | ||
| 539 | "PAGE_UP", "scrollUpChangeSelection", | ||
| 540 | "shift PAGE_UP", "scrollUpExtendSelection", | ||
| 541 | "ctrl shift PAGE_UP", "scrollLeftExtendSelection", | ||
| 542 | "ctrl PAGE_UP", "scrollLeftChangeSelection", | ||
| 543 | "PAGE_DOWN", "scrollDownChangeSelection", | ||
| 544 | "shift PAGE_DOWN", "scrollDownExtendSelection", | ||
| 545 | "ctrl shift PAGE_DOWN", "scrollRightExtendSelection", | ||
| 546 | "ctrl PAGE_DOWN", "scrollRightChangeSelection", | ||
| 547 | "TAB", "selectNextColumnCell", | ||
| 548 | "shift TAB", "selectPreviousColumnCell", | ||
| 549 | "ENTER", "selectNextRowCell", | ||
| 550 | "shift ENTER", "selectPreviousRowCell", | ||
| 551 | "ctrl A", "selectAll", | ||
| 552 | "ctrl SLASH", "selectAll", | ||
| 553 | "ctrl BACK_SLASH", "clearSelection", | ||
| 554 | "ESCAPE", "cancel", | ||
| 555 | "F2", "startEditing", | ||
| 556 | "SPACE", "addToSelection", | ||
| 557 | "ctrl SPACE", "toggleAndAnchor", | ||
| 558 | "shift SPACE", "extendTo", | ||
| 559 | "ctrl shift SPACE", "moveSelectionTo", | ||
| 560 | "F8", "focusHeader" | ||
| 561 | }), | ||
| 562 | "ToggleButton.focusInputMap", | ||
| 563 | new UIDefaults.LazyInputMap(new Object[]{ | ||
| 564 | "SPACE", "pressed", | ||
| 565 | "released SPACE", "released" | ||
| 566 | }), | ||
| 567 | "ToolBar.ancestorInputMap", | ||
| 568 | new UIDefaults.LazyInputMap(new Object[]{ | ||
| 569 | "UP", "navigateUp", | ||
| 570 | "KP_UP", "navigateUp", | ||
| 571 | "DOWN", "navigateDown", | ||
| 572 | "KP_DOWN", "navigateDown", | ||
| 573 | "LEFT", "navigateLeft", | ||
| 574 | "KP_LEFT", "navigateLeft", | ||
| 575 | "RIGHT", "navigateRight", | ||
| 576 | "KP_RIGHT", "navigateRight" | ||
| 577 | }), | ||
| 578 | "Tree.focusInputMap", | ||
| 579 | new UIDefaults.LazyInputMap(new Object[]{ | ||
| 580 | "ADD", "expand", | ||
| 581 | "SUBTRACT", "collapse", | ||
| 582 | "ctrl C", "copy", | ||
| 583 | "ctrl V", "paste", | ||
| 584 | "ctrl X", "cut", | ||
| 585 | "COPY", "copy", | ||
| 586 | "PASTE", "paste", | ||
| 587 | "CUT", "cut", | ||
| 588 | "control INSERT", "copy", | ||
| 589 | "shift INSERT", "paste", | ||
| 590 | "shift DELETE", "cut", | ||
| 591 | "UP", "selectPrevious", | ||
| 592 | "KP_UP", "selectPrevious", | ||
| 593 | "shift UP", "selectPreviousExtendSelection", | ||
| 594 | "shift KP_UP", "selectPreviousExtendSelection", | ||
| 595 | "ctrl shift UP", "selectPreviousExtendSelection", | ||
| 596 | "ctrl shift KP_UP", "selectPreviousExtendSelection", | ||
| 597 | "ctrl UP", "selectPreviousChangeLead", | ||
| 598 | "ctrl KP_UP", "selectPreviousChangeLead", | ||
| 599 | "DOWN", "selectNext", | ||
| 600 | "KP_DOWN", "selectNext", | ||
| 601 | "shift DOWN", "selectNextExtendSelection", | ||
| 602 | "shift KP_DOWN", "selectNextExtendSelection", | ||
| 603 | "ctrl shift DOWN", "selectNextExtendSelection", | ||
| 604 | "ctrl shift KP_DOWN", "selectNextExtendSelection", | ||
| 605 | "ctrl DOWN", "selectNextChangeLead", | ||
| 606 | "ctrl KP_DOWN", "selectNextChangeLead", | ||
| 607 | "RIGHT", "selectChild", | ||
| 608 | "KP_RIGHT", "selectChild", | ||
| 609 | "LEFT", "selectParent", | ||
| 610 | "KP_LEFT", "selectParent", | ||
| 611 | "PAGE_UP", "scrollUpChangeSelection", | ||
| 612 | "shift PAGE_UP", "scrollUpExtendSelection", | ||
| 613 | "ctrl shift PAGE_UP", "scrollUpExtendSelection", | ||
| 614 | "ctrl PAGE_UP", "scrollUpChangeLead", | ||
| 615 | "PAGE_DOWN", "scrollDownChangeSelection", | ||
| 616 | "shift PAGE_DOWN", "scrollDownExtendSelection", | ||
| 617 | "ctrl shift PAGE_DOWN", "scrollDownExtendSelection", | ||
| 618 | "ctrl PAGE_DOWN", "scrollDownChangeLead", | ||
| 619 | "HOME", "selectFirst", | ||
| 620 | "shift HOME", "selectFirstExtendSelection", | ||
| 621 | "ctrl shift HOME", "selectFirstExtendSelection", | ||
| 622 | "ctrl HOME", "selectFirstChangeLead", | ||
| 623 | "END", "selectLast", | ||
| 624 | "shift END", "selectLastExtendSelection", | ||
| 625 | "ctrl shift END", "selectLastExtendSelection", | ||
| 626 | "ctrl END", "selectLastChangeLead", | ||
| 627 | "F2", "startEditing", | ||
| 628 | "ctrl A", "selectAll", | ||
| 629 | "ctrl SLASH", "selectAll", | ||
| 630 | "ctrl BACK_SLASH", "clearSelection", | ||
| 631 | "ctrl LEFT", "scrollLeft", | ||
| 632 | "ctrl KP_LEFT", "scrollLeft", | ||
| 633 | "ctrl RIGHT", "scrollRight", | ||
| 634 | "ctrl KP_RIGHT", "scrollRight", | ||
| 635 | "SPACE", "addToSelection", | ||
| 636 | "ctrl SPACE", "toggleAndAnchor", | ||
| 637 | "shift SPACE", "extendTo", | ||
| 638 | "ctrl shift SPACE", "moveSelectionTo" | ||
| 639 | }), | ||
| 640 | "Tree.ancestorInputMap", | ||
| 641 | new UIDefaults.LazyInputMap(new Object[]{ | ||
| 642 | "ESCAPE", "cancel" | ||
| 643 | }), | ||
| 644 | }; | ||
| 645 | table.putDefaults(defaults); | ||
| 646 | } | ||
| 647 | |||
| 648 | } | ||