comparison dwtx/jface/action/LegacyActionTools.d @ 104:04b47443bb01

Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections. These new wrappers now use the tango.util.containers instead of the tango.util.collections.
author Frank Benoit <benoit@tionex.de>
date Thu, 07 Aug 2008 15:01:33 +0200
parents da5ad8eedf5d
children
comparison
equal deleted inserted replaced
103:2d6540440fe6 104:04b47443bb01
11 * Frank Benoit <benoit@tionex.de> 11 * Frank Benoit <benoit@tionex.de>
12 *******************************************************************************/ 12 *******************************************************************************/
13 13
14 module dwtx.jface.action.LegacyActionTools; 14 module dwtx.jface.action.LegacyActionTools;
15 15
16 import tango.util.collection.HashMap;
17 import tango.util.collection.model.Map;
18 16
19 import dwt.DWT; 17 import dwt.DWT;
20 import dwtx.jface.resource.JFaceResources; 18 import dwtx.jface.resource.JFaceResources;
21 19
22 import dwt.dwthelper.utils; 20 import dwt.dwthelper.utils;
21 import dwtx.dwtxhelper.Collection;
23 static import tango.text.Text; 22 static import tango.text.Text;
24 alias tango.text.Text.Text!(char) StringBuffer; 23 alias tango.text.Text.Text!(char) StringBuffer;
25 24
26 /** 25 /**
27 * <p> 26 * <p>
40 * Table of key codes (key type: <code>String</code>, value type: 39 * Table of key codes (key type: <code>String</code>, value type:
41 * <code>Integer</code>); <code>null</code> if not yet initialized. 40 * <code>Integer</code>); <code>null</code> if not yet initialized.
42 * 41 *
43 * @see #findKeyCode 42 * @see #findKeyCode
44 */ 43 */
45 private static Map!(String,Object) keyCodes = null; 44 private static Map keyCodes = null;
46 45
47 /** 46 /**
48 * Table of string representations of keys (key type: <code>Integer</code>, 47 * Table of string representations of keys (key type: <code>Integer</code>,
49 * value type: <code>String</code>); <code>null</code>> if not yet 48 * value type: <code>String</code>); <code>null</code>> if not yet
50 * initialized. 49 * initialized.
51 * 50 *
52 * @see #findKeyString 51 * @see #findKeyString
53 */ 52 */
54 private static Map!(Object,String) keyStrings = null; 53 private static Map keyStrings = null;
55 54
56 /** 55 /**
57 * The localized uppercase version of ALT 56 * The localized uppercase version of ALT
58 */ 57 */
59 private static String localizedAlt; 58 private static String localizedAlt;
73 * <code>Integer</code>); <code>null</code> if not yet initialized. The 72 * <code>Integer</code>); <code>null</code> if not yet initialized. The
74 * key is the localalized name of the key as it appears in menus. 73 * key is the localalized name of the key as it appears in menus.
75 * 74 *
76 * @see #findLocalizedKeyCode 75 * @see #findLocalizedKeyCode
77 */ 76 */
78 private static Map!(String,Object) localizedKeyCodes = null; 77 private static Map localizedKeyCodes = null;
79 78
80 /** 79 /**
81 * The localized uppercase version of SHIFT 80 * The localized uppercase version of SHIFT
82 */ 81 */
83 private static String localizedShift; 82 private static String localizedShift;
308 if (keyStrings is null) { 307 if (keyStrings is null) {
309 initKeyStrings(); 308 initKeyStrings();
310 } 309 }
311 int i = keyCode & ~(DWT.CTRL | DWT.ALT | DWT.SHIFT | DWT.COMMAND); 310 int i = keyCode & ~(DWT.CTRL | DWT.ALT | DWT.SHIFT | DWT.COMMAND);
312 Integer integer = new Integer(i); 311 Integer integer = new Integer(i);
313 String result = keyStrings.get(integer); 312 String result = stringcast(keyStrings.get(integer));
314 if (result !is null) { 313 if (result !is null) {
315 return result; 314 return result;
316 } 315 }
317 result = dcharToString( cast(dchar) i ); 316 result = dcharToString( cast(dchar) i );
318 return result; 317 return result;
481 480
482 /** 481 /**
483 * Initializes the internal key code table. 482 * Initializes the internal key code table.
484 */ 483 */
485 private static final void initKeyCodes() { 484 private static final void initKeyCodes() {
486 keyCodes = new HashMap!(String,Object); 485 keyCodes = new HashMap();
487 486
488 keyCodes.add("BACKSPACE", new Integer(8)); //$NON-NLS-1$ 487 keyCodes.put(stringcast("BACKSPACE"), new Integer(8)); //$NON-NLS-1$
489 keyCodes.add("TAB", new Integer(9)); //$NON-NLS-1$ 488 keyCodes.put(stringcast("TAB"), new Integer(9)); //$NON-NLS-1$
490 keyCodes.add("RETURN", new Integer(13)); //$NON-NLS-1$ 489 keyCodes.put(stringcast("RETURN"), new Integer(13)); //$NON-NLS-1$
491 keyCodes.add("ENTER", new Integer(13)); //$NON-NLS-1$ 490 keyCodes.put(stringcast("ENTER"), new Integer(13)); //$NON-NLS-1$
492 keyCodes.add("ESCAPE", new Integer(27)); //$NON-NLS-1$ 491 keyCodes.put(stringcast("ESCAPE"), new Integer(27)); //$NON-NLS-1$
493 keyCodes.add("ESC", new Integer(27)); //$NON-NLS-1$ 492 keyCodes.put(stringcast("ESC"), new Integer(27)); //$NON-NLS-1$
494 keyCodes.add("DELETE", new Integer(127)); //$NON-NLS-1$ 493 keyCodes.put(stringcast("DELETE"), new Integer(127)); //$NON-NLS-1$
495 494
496 keyCodes.add("SPACE", new Integer(' ')); //$NON-NLS-1$ 495 keyCodes.put(stringcast("SPACE"), new Integer(' ')); //$NON-NLS-1$
497 keyCodes.add("ARROW_UP", new Integer(DWT.ARROW_UP)); //$NON-NLS-1$ 496 keyCodes.put(stringcast("ARROW_UP"), new Integer(DWT.ARROW_UP)); //$NON-NLS-1$
498 keyCodes.add("ARROW_DOWN", new Integer(DWT.ARROW_DOWN)); //$NON-NLS-1$ 497 keyCodes.put(stringcast("ARROW_DOWN"), new Integer(DWT.ARROW_DOWN)); //$NON-NLS-1$
499 keyCodes.add("ARROW_LEFT", new Integer(DWT.ARROW_LEFT)); //$NON-NLS-1$ 498 keyCodes.put(stringcast("ARROW_LEFT"), new Integer(DWT.ARROW_LEFT)); //$NON-NLS-1$
500 keyCodes.add("ARROW_RIGHT", new Integer(DWT.ARROW_RIGHT)); //$NON-NLS-1$ 499 keyCodes.put(stringcast("ARROW_RIGHT"), new Integer(DWT.ARROW_RIGHT)); //$NON-NLS-1$
501 keyCodes.add("PAGE_UP", new Integer(DWT.PAGE_UP)); //$NON-NLS-1$ 500 keyCodes.put(stringcast("PAGE_UP"), new Integer(DWT.PAGE_UP)); //$NON-NLS-1$
502 keyCodes.add("PAGE_DOWN", new Integer(DWT.PAGE_DOWN)); //$NON-NLS-1$ 501 keyCodes.put(stringcast("PAGE_DOWN"), new Integer(DWT.PAGE_DOWN)); //$NON-NLS-1$
503 keyCodes.add("HOME", new Integer(DWT.HOME)); //$NON-NLS-1$ 502 keyCodes.put(stringcast("HOME"), new Integer(DWT.HOME)); //$NON-NLS-1$
504 keyCodes.add("END", new Integer(DWT.END)); //$NON-NLS-1$ 503 keyCodes.put(stringcast("END"), new Integer(DWT.END)); //$NON-NLS-1$
505 keyCodes.add("INSERT", new Integer(DWT.INSERT)); //$NON-NLS-1$ 504 keyCodes.put(stringcast("INSERT"), new Integer(DWT.INSERT)); //$NON-NLS-1$
506 keyCodes.add("F1", new Integer(DWT.F1)); //$NON-NLS-1$ 505 keyCodes.put(stringcast("F1"), new Integer(DWT.F1)); //$NON-NLS-1$
507 keyCodes.add("F2", new Integer(DWT.F2)); //$NON-NLS-1$ 506 keyCodes.put(stringcast("F2"), new Integer(DWT.F2)); //$NON-NLS-1$
508 keyCodes.add("F3", new Integer(DWT.F3)); //$NON-NLS-1$ 507 keyCodes.put(stringcast("F3"), new Integer(DWT.F3)); //$NON-NLS-1$
509 keyCodes.add("F4", new Integer(DWT.F4)); //$NON-NLS-1$ 508 keyCodes.put(stringcast("F4"), new Integer(DWT.F4)); //$NON-NLS-1$
510 keyCodes.add("F5", new Integer(DWT.F5)); //$NON-NLS-1$ 509 keyCodes.put(stringcast("F5"), new Integer(DWT.F5)); //$NON-NLS-1$
511 keyCodes.add("F6", new Integer(DWT.F6)); //$NON-NLS-1$ 510 keyCodes.put(stringcast("F6"), new Integer(DWT.F6)); //$NON-NLS-1$
512 keyCodes.add("F7", new Integer(DWT.F7)); //$NON-NLS-1$ 511 keyCodes.put(stringcast("F7"), new Integer(DWT.F7)); //$NON-NLS-1$
513 keyCodes.add("F8", new Integer(DWT.F8)); //$NON-NLS-1$ 512 keyCodes.put(stringcast("F8"), new Integer(DWT.F8)); //$NON-NLS-1$
514 keyCodes.add("F9", new Integer(DWT.F9)); //$NON-NLS-1$ 513 keyCodes.put(stringcast("F9"), new Integer(DWT.F9)); //$NON-NLS-1$
515 keyCodes.add("F10", new Integer(DWT.F10)); //$NON-NLS-1$ 514 keyCodes.put(stringcast("F10"), new Integer(DWT.F10)); //$NON-NLS-1$
516 keyCodes.add("F11", new Integer(DWT.F11)); //$NON-NLS-1$ 515 keyCodes.put(stringcast("F11"), new Integer(DWT.F11)); //$NON-NLS-1$
517 keyCodes.add("F12", new Integer(DWT.F12)); //$NON-NLS-1$ 516 keyCodes.put(stringcast("F12"), new Integer(DWT.F12)); //$NON-NLS-1$
518 } 517 }
519 518
520 /** 519 /**
521 * Initializes the internal key string table. 520 * Initializes the internal key string table.
522 */ 521 */
523 private static void initKeyStrings() { 522 private static void initKeyStrings() {
524 keyStrings = new HashMap!(Object,String); 523 keyStrings = new HashMap();
525 524
526 keyStrings.add(new Integer(8), JFaceResources.getString("Backspace")); //$NON-NLS-1$ 525 keyStrings.put(new Integer(8), stringcast(JFaceResources.getString("Backspace"))); //$NON-NLS-1$
527 keyStrings.add(new Integer(9), JFaceResources.getString("Tab")); //$NON-NLS-1$ 526 keyStrings.put(new Integer(9), stringcast(JFaceResources.getString("Tab"))); //$NON-NLS-1$
528 keyStrings.add(new Integer(13), JFaceResources.getString("Return")); //$NON-NLS-1$ 527 keyStrings.put(new Integer(13), stringcast(JFaceResources.getString("Return"))); //$NON-NLS-1$
529 keyStrings.add(new Integer(13), JFaceResources.getString("Enter")); //$NON-NLS-1$ 528 keyStrings.put(new Integer(13), stringcast(JFaceResources.getString("Enter"))); //$NON-NLS-1$
530 keyStrings.add(new Integer(27), JFaceResources.getString("Escape")); //$NON-NLS-1$ 529 keyStrings.put(new Integer(27), stringcast(JFaceResources.getString("Escape"))); //$NON-NLS-1$
531 keyStrings.add(new Integer(27), JFaceResources.getString("Esc")); //$NON-NLS-1$ 530 keyStrings.put(new Integer(27), stringcast(JFaceResources.getString("Esc"))); //$NON-NLS-1$
532 keyStrings.add(new Integer(127), JFaceResources.getString("Delete")); //$NON-NLS-1$ 531 keyStrings.put(new Integer(127), stringcast(JFaceResources.getString("Delete"))); //$NON-NLS-1$
533 532
534 keyStrings.add(new Integer(' '), JFaceResources.getString("Space")); //$NON-NLS-1$ 533 keyStrings.put(new Integer(cast(int)' '), stringcast(JFaceResources.getString("Space"))); //$NON-NLS-1$
535 534
536 keyStrings.add(new Integer(DWT.ARROW_UP), JFaceResources 535 keyStrings.put(new Integer(DWT.ARROW_UP), stringcast(JFaceResources
537 .getString("Arrow_Up")); //$NON-NLS-1$ 536 .getString("Arrow_Up"))); //$NON-NLS-1$
538 keyStrings.add(new Integer(DWT.ARROW_DOWN), JFaceResources 537 keyStrings.put(new Integer(DWT.ARROW_DOWN), stringcast(JFaceResources
539 .getString("Arrow_Down")); //$NON-NLS-1$ 538 .getString("Arrow_Down"))); //$NON-NLS-1$
540 keyStrings.add(new Integer(DWT.ARROW_LEFT), JFaceResources 539 keyStrings.put(new Integer(DWT.ARROW_LEFT), stringcast(JFaceResources
541 .getString("Arrow_Left")); //$NON-NLS-1$ 540 .getString("Arrow_Left"))); //$NON-NLS-1$
542 keyStrings.add(new Integer(DWT.ARROW_RIGHT), JFaceResources 541 keyStrings.put(new Integer(DWT.ARROW_RIGHT), stringcast(JFaceResources
543 .getString("Arrow_Right")); //$NON-NLS-1$ 542 .getString("Arrow_Right"))); //$NON-NLS-1$
544 keyStrings.add(new Integer(DWT.PAGE_UP), JFaceResources 543 keyStrings.put(new Integer(DWT.PAGE_UP), stringcast(JFaceResources
545 .getString("Page_Up")); //$NON-NLS-1$ 544 .getString("Page_Up"))); //$NON-NLS-1$
546 keyStrings.add(new Integer(DWT.PAGE_DOWN), JFaceResources 545 keyStrings.put(new Integer(DWT.PAGE_DOWN), stringcast(JFaceResources
547 .getString("Page_Down")); //$NON-NLS-1$ 546 .getString("Page_Down"))); //$NON-NLS-1$
548 keyStrings.add(new Integer(DWT.HOME), JFaceResources.getString("Home")); //$NON-NLS-1$ 547 keyStrings.put(new Integer(DWT.HOME), stringcast(JFaceResources.getString("Home"))); //$NON-NLS-1$
549 keyStrings.add(new Integer(DWT.END), JFaceResources.getString("End")); //$NON-NLS-1$ 548 keyStrings.put(new Integer(DWT.END), stringcast(JFaceResources.getString("End"))); //$NON-NLS-1$
550 keyStrings.add(new Integer(DWT.INSERT), JFaceResources 549 keyStrings.put(new Integer(DWT.INSERT), stringcast(JFaceResources
551 .getString("Insert")); //$NON-NLS-1$ 550 .getString("Insert"))); //$NON-NLS-1$
552 keyStrings.add(new Integer(DWT.F1), JFaceResources.getString("F1")); //$NON-NLS-1$ 551 keyStrings.put(new Integer(DWT.F1), stringcast(JFaceResources.getString("F1"))); //$NON-NLS-1$
553 keyStrings.add(new Integer(DWT.F2), JFaceResources.getString("F2")); //$NON-NLS-1$ 552 keyStrings.put(new Integer(DWT.F2), stringcast(JFaceResources.getString("F2"))); //$NON-NLS-1$
554 keyStrings.add(new Integer(DWT.F3), JFaceResources.getString("F3")); //$NON-NLS-1$ 553 keyStrings.put(new Integer(DWT.F3), stringcast(JFaceResources.getString("F3"))); //$NON-NLS-1$
555 keyStrings.add(new Integer(DWT.F4), JFaceResources.getString("F4")); //$NON-NLS-1$ 554 keyStrings.put(new Integer(DWT.F4), stringcast(JFaceResources.getString("F4"))); //$NON-NLS-1$
556 keyStrings.add(new Integer(DWT.F5), JFaceResources.getString("F5")); //$NON-NLS-1$ 555 keyStrings.put(new Integer(DWT.F5), stringcast(JFaceResources.getString("F5"))); //$NON-NLS-1$
557 keyStrings.add(new Integer(DWT.F6), JFaceResources.getString("F6")); //$NON-NLS-1$ 556 keyStrings.put(new Integer(DWT.F6), stringcast(JFaceResources.getString("F6"))); //$NON-NLS-1$
558 keyStrings.add(new Integer(DWT.F7), JFaceResources.getString("F7")); //$NON-NLS-1$ 557 keyStrings.put(new Integer(DWT.F7), stringcast(JFaceResources.getString("F7"))); //$NON-NLS-1$
559 keyStrings.add(new Integer(DWT.F8), JFaceResources.getString("F8")); //$NON-NLS-1$ 558 keyStrings.put(new Integer(DWT.F8), stringcast(JFaceResources.getString("F8"))); //$NON-NLS-1$
560 keyStrings.add(new Integer(DWT.F9), JFaceResources.getString("F9")); //$NON-NLS-1$ 559 keyStrings.put(new Integer(DWT.F9), stringcast(JFaceResources.getString("F9"))); //$NON-NLS-1$
561 keyStrings.add(new Integer(DWT.F10), JFaceResources.getString("F10")); //$NON-NLS-1$ 560 keyStrings.put(new Integer(DWT.F10), stringcast(JFaceResources.getString("F10"))); //$NON-NLS-1$
562 keyStrings.add(new Integer(DWT.F11), JFaceResources.getString("F11")); //$NON-NLS-1$ 561 keyStrings.put(new Integer(DWT.F11), stringcast(JFaceResources.getString("F11"))); //$NON-NLS-1$
563 keyStrings.add(new Integer(DWT.F12), JFaceResources.getString("F12")); //$NON-NLS-1$ 562 keyStrings.put(new Integer(DWT.F12), stringcast(JFaceResources.getString("F12"))); //$NON-NLS-1$
564 } 563 }
565 564
566 /** 565 /**
567 * Initializes the localized internal key code table. 566 * Initializes the localized internal key code table.
568 */ 567 */
569 private static void initLocalizedKeyCodes() { 568 private static void initLocalizedKeyCodes() {
570 localizedKeyCodes = new HashMap!(String,Object); 569 localizedKeyCodes = new HashMap();
571 570
572 localizedKeyCodes.add(JFaceResources 571 localizedKeyCodes.put(stringcast(JFaceResources
573 .getString("Backspace").toUpperCase(), new Integer(8)); //$NON-NLS-1$ 572 .getString("Backspace").toUpperCase()), new Integer(8)); //$NON-NLS-1$
574 localizedKeyCodes.add( 573 localizedKeyCodes.put(
575 JFaceResources.getString("Tab").toUpperCase(), new Integer(9)); //$NON-NLS-1$ 574 stringcast(JFaceResources.getString("Tab").toUpperCase()), new Integer(9)); //$NON-NLS-1$
576 localizedKeyCodes 575 localizedKeyCodes
577 .add( 576 .put(
578 JFaceResources.getString("Return").toUpperCase(), new Integer(13)); //$NON-NLS-1$ 577 stringcast(JFaceResources.getString("Return").toUpperCase()), new Integer(13)); //$NON-NLS-1$
579 localizedKeyCodes 578 localizedKeyCodes
580 .add( 579 .put(
581 JFaceResources.getString("Enter").toUpperCase(), new Integer(13)); //$NON-NLS-1$ 580 stringcast(JFaceResources.getString("Enter").toUpperCase()), new Integer(13)); //$NON-NLS-1$
582 localizedKeyCodes 581 localizedKeyCodes
583 .add( 582 .put(
584 JFaceResources.getString("Escape").toUpperCase(), new Integer(27)); //$NON-NLS-1$ 583 stringcast(JFaceResources.getString("Escape").toUpperCase()), new Integer(27)); //$NON-NLS-1$
585 localizedKeyCodes.add( 584 localizedKeyCodes.put(
586 JFaceResources.getString("Esc").toUpperCase(), new Integer(27)); //$NON-NLS-1$ 585 stringcast(JFaceResources.getString("Esc").toUpperCase()), new Integer(27)); //$NON-NLS-1$
587 localizedKeyCodes 586 localizedKeyCodes
588 .add( 587 .put(
589 JFaceResources.getString("Delete").toUpperCase(), new Integer(127)); //$NON-NLS-1$ 588 stringcast(JFaceResources.getString("Delete").toUpperCase()), new Integer(127)); //$NON-NLS-1$
590 589
591 localizedKeyCodes 590 localizedKeyCodes
592 .add( 591 .put(
593 JFaceResources.getString("Space").toUpperCase(), new Integer(' ')); //$NON-NLS-1$ 592 stringcast(JFaceResources.getString("Space").toUpperCase()), new Integer(' ')); //$NON-NLS-1$
594 593
595 localizedKeyCodes 594 localizedKeyCodes
596 .add( 595 .put(
597 JFaceResources.getString("Arrow_Up").toUpperCase(), new Integer(DWT.ARROW_UP)); //$NON-NLS-1$ 596 stringcast(JFaceResources.getString("Arrow_Up").toUpperCase()), new Integer(DWT.ARROW_UP)); //$NON-NLS-1$
598 localizedKeyCodes 597 localizedKeyCodes
599 .add( 598 .put(
600 JFaceResources.getString("Arrow_Down").toUpperCase(), new Integer(DWT.ARROW_DOWN)); //$NON-NLS-1$ 599 stringcast(JFaceResources.getString("Arrow_Down").toUpperCase()), new Integer(DWT.ARROW_DOWN)); //$NON-NLS-1$
601 localizedKeyCodes 600 localizedKeyCodes
602 .add( 601 .put(
603 JFaceResources.getString("Arrow_Left").toUpperCase(), new Integer(DWT.ARROW_LEFT)); //$NON-NLS-1$ 602 stringcast(JFaceResources.getString("Arrow_Left").toUpperCase()), new Integer(DWT.ARROW_LEFT)); //$NON-NLS-1$
604 localizedKeyCodes 603 localizedKeyCodes
605 .add( 604 .put(
606 JFaceResources.getString("Arrow_Right").toUpperCase(), new Integer(DWT.ARROW_RIGHT)); //$NON-NLS-1$ 605 stringcast(JFaceResources.getString("Arrow_Right").toUpperCase()), new Integer(DWT.ARROW_RIGHT)); //$NON-NLS-1$
607 localizedKeyCodes 606 localizedKeyCodes
608 .add( 607 .put(
609 JFaceResources.getString("Page_Up").toUpperCase(), new Integer(DWT.PAGE_UP)); //$NON-NLS-1$ 608 stringcast(JFaceResources.getString("Page_Up").toUpperCase()), new Integer(DWT.PAGE_UP)); //$NON-NLS-1$
610 localizedKeyCodes 609 localizedKeyCodes
611 .add( 610 .put(
612 JFaceResources.getString("Page_Down").toUpperCase(), new Integer(DWT.PAGE_DOWN)); //$NON-NLS-1$ 611 stringcast(JFaceResources.getString("Page_Down").toUpperCase()), new Integer(DWT.PAGE_DOWN)); //$NON-NLS-1$
613 localizedKeyCodes 612 localizedKeyCodes
614 .add( 613 .put(
615 JFaceResources.getString("Home").toUpperCase(), new Integer(DWT.HOME)); //$NON-NLS-1$ 614 stringcast(JFaceResources.getString("Home").toUpperCase()), new Integer(DWT.HOME)); //$NON-NLS-1$
616 localizedKeyCodes 615 localizedKeyCodes
617 .add( 616 .put(
618 JFaceResources.getString("End").toUpperCase(), new Integer(DWT.END)); //$NON-NLS-1$ 617 stringcast(JFaceResources.getString("End").toUpperCase()), new Integer(DWT.END)); //$NON-NLS-1$
619 localizedKeyCodes 618 localizedKeyCodes
620 .add( 619 .put(
621 JFaceResources.getString("Insert").toUpperCase(), new Integer(DWT.INSERT)); //$NON-NLS-1$ 620 stringcast(JFaceResources.getString("Insert").toUpperCase()), new Integer(DWT.INSERT)); //$NON-NLS-1$
622 localizedKeyCodes 621 localizedKeyCodes
623 .add( 622 .put(
624 JFaceResources.getString("F1").toUpperCase(), new Integer(DWT.F1)); //$NON-NLS-1$ 623 stringcast(JFaceResources.getString("F1").toUpperCase()), new Integer(DWT.F1)); //$NON-NLS-1$
625 localizedKeyCodes 624 localizedKeyCodes
626 .add( 625 .put(
627 JFaceResources.getString("F2").toUpperCase(), new Integer(DWT.F2)); //$NON-NLS-1$ 626 stringcast(JFaceResources.getString("F2").toUpperCase()), new Integer(DWT.F2)); //$NON-NLS-1$
628 localizedKeyCodes 627 localizedKeyCodes
629 .add( 628 .put(
630 JFaceResources.getString("F3").toUpperCase(), new Integer(DWT.F3)); //$NON-NLS-1$ 629 stringcast(JFaceResources.getString("F3").toUpperCase()), new Integer(DWT.F3)); //$NON-NLS-1$
631 localizedKeyCodes 630 localizedKeyCodes
632 .add( 631 .put(
633 JFaceResources.getString("F4").toUpperCase(), new Integer(DWT.F4)); //$NON-NLS-1$ 632 stringcast(JFaceResources.getString("F4").toUpperCase()), new Integer(DWT.F4)); //$NON-NLS-1$
634 localizedKeyCodes 633 localizedKeyCodes
635 .add( 634 .put(
636 JFaceResources.getString("F5").toUpperCase(), new Integer(DWT.F5)); //$NON-NLS-1$ 635 stringcast(JFaceResources.getString("F5").toUpperCase()), new Integer(DWT.F5)); //$NON-NLS-1$
637 localizedKeyCodes 636 localizedKeyCodes
638 .add( 637 .put(
639 JFaceResources.getString("F6").toUpperCase(), new Integer(DWT.F6)); //$NON-NLS-1$ 638 stringcast(JFaceResources.getString("F6").toUpperCase()), new Integer(DWT.F6)); //$NON-NLS-1$
640 localizedKeyCodes 639 localizedKeyCodes
641 .add( 640 .put(
642 JFaceResources.getString("F7").toUpperCase(), new Integer(DWT.F7)); //$NON-NLS-1$ 641 stringcast(JFaceResources.getString("F7").toUpperCase()), new Integer(DWT.F7)); //$NON-NLS-1$
643 localizedKeyCodes 642 localizedKeyCodes
644 .add( 643 .put(
645 JFaceResources.getString("F8").toUpperCase(), new Integer(DWT.F8)); //$NON-NLS-1$ 644 stringcast(JFaceResources.getString("F8").toUpperCase()), new Integer(DWT.F8)); //$NON-NLS-1$
646 localizedKeyCodes 645 localizedKeyCodes
647 .add( 646 .put(
648 JFaceResources.getString("F9").toUpperCase(), new Integer(DWT.F9)); //$NON-NLS-1$ 647 stringcast(JFaceResources.getString("F9").toUpperCase()), new Integer(DWT.F9)); //$NON-NLS-1$
649 localizedKeyCodes 648 localizedKeyCodes
650 .add( 649 .put(
651 JFaceResources.getString("F10").toUpperCase(), new Integer(DWT.F10)); //$NON-NLS-1$ 650 stringcast(JFaceResources.getString("F10").toUpperCase()), new Integer(DWT.F10)); //$NON-NLS-1$
652 localizedKeyCodes 651 localizedKeyCodes
653 .add( 652 .put(
654 JFaceResources.getString("F11").toUpperCase(), new Integer(DWT.F11)); //$NON-NLS-1$ 653 stringcast(JFaceResources.getString("F11").toUpperCase()), new Integer(DWT.F11)); //$NON-NLS-1$
655 localizedKeyCodes 654 localizedKeyCodes
656 .add( 655 .put(
657 JFaceResources.getString("F12").toUpperCase(), new Integer(DWT.F12)); //$NON-NLS-1$ 656 stringcast(JFaceResources.getString("F12").toUpperCase()), new Integer(DWT.F12)); //$NON-NLS-1$
658 } 657 }
659 658
660 /** 659 /**
661 * Initialize the list of localized modifiers 660 * Initialize the list of localized modifiers
662 */ 661 */