503
504 // ** for tabbedpane
505
506 Object tabbedPaneTabInsets = new InsetsUIResource(3, 4, 3, 4);
507
508 Object tabbedPaneTabPadInsets = new InsetsUIResource(3, 0, 1, 0);
509
510 Object tabbedPaneTabAreaInsets = new InsetsUIResource(4, 2, 0, 8);
511
512 Object tabbedPaneContentBorderInsets = new InsetsUIResource(2, 2, 2, 2);
513
514
515 // ** for optionpane
516
517 Object optionPaneBorder = new BorderUIResource.EmptyBorderUIResource(10,0,0,0);
518
519 Object optionPaneButtonAreaBorder = new BorderUIResource.EmptyBorderUIResource(10,10,10,10);
520
521 Object optionPaneMessageAreaBorder = new BorderUIResource.EmptyBorderUIResource(10,10,12,10);
522
523
524 Object[] defaults = {
525
526 "Desktop.background", table.get("desktop"),
527 "Desktop.ancestorInputMap",
528 new UIDefaults.LazyInputMap(new Object[] {
529 "ctrl F5", "restore",
530 "ctrl F4", "close",
531 "ctrl F7", "move",
532 "ctrl F8", "resize",
533 "RIGHT", "right",
534 "KP_RIGHT", "right",
535 "shift RIGHT", "shrinkRight",
536 "shift KP_RIGHT", "shrinkRight",
537 "LEFT", "left",
538 "KP_LEFT", "left",
539 "shift LEFT", "shrinkLeft",
540 "shift KP_LEFT", "shrinkLeft",
541 "UP", "up",
542 "KP_UP", "up",
543 "shift UP", "shrinkUp",
615 "SPACE", "pressed",
616 "released SPACE", "released"
617 }),
618
619 // Menus
620 "Menu.border", menuMarginBorder,
621 "Menu.font", dialogPlain12,
622 "Menu.acceleratorFont", dialogPlain12,
623 "Menu.acceleratorSelectionForeground", menuItemPressedForeground,
624 "Menu.foreground", table.get("menuText"),
625 "Menu.background", table.get("menu"),
626 "Menu.selectionForeground", menuItemPressedForeground,
627 "Menu.selectionBackground", menuItemPressedBackground,
628 "Menu.checkIcon", menuItemCheckIcon,
629 "Menu.arrowIcon", menuArrowIcon,
630 "Menu.menuPopupOffsetX", 0,
631 "Menu.menuPopupOffsetY", 0,
632 "Menu.submenuPopupOffsetX", -2,
633 "Menu.submenuPopupOffsetY", 3,
634 "Menu.shortcutKeys", new int[]{
635 SwingUtilities2.getSystemMnemonicKeyMask(),
636 KeyEvent.META_MASK
637 },
638 "Menu.cancelMode", "hideMenuTree",
639
640 "MenuBar.border", menuBarBorder,
641 "MenuBar.background", table.get("menu"),
642 "MenuBar.foreground", table.get("menuText"),
643 "MenuBar.font", dialogPlain12,
644 "MenuBar.windowBindings", new Object[] {
645 "F10", "takeFocus" },
646
647 "MenuItem.border", menuMarginBorder,
648 "MenuItem.font", dialogPlain12,
649 "MenuItem.acceleratorFont", dialogPlain12,
650 "MenuItem.acceleratorSelectionForeground", menuItemPressedForeground,
651 "MenuItem.foreground", table.get("menuText"),
652 "MenuItem.background", table.get("menu"),
653 "MenuItem.selectionForeground", menuItemPressedForeground,
654 "MenuItem.selectionBackground", menuItemPressedBackground,
655 "MenuItem.checkIcon", menuItemCheckIcon,
656 "MenuItem.arrowIcon", menuItemArrowIcon,
|
503
504 // ** for tabbedpane
505
506 Object tabbedPaneTabInsets = new InsetsUIResource(3, 4, 3, 4);
507
508 Object tabbedPaneTabPadInsets = new InsetsUIResource(3, 0, 1, 0);
509
510 Object tabbedPaneTabAreaInsets = new InsetsUIResource(4, 2, 0, 8);
511
512 Object tabbedPaneContentBorderInsets = new InsetsUIResource(2, 2, 2, 2);
513
514
515 // ** for optionpane
516
517 Object optionPaneBorder = new BorderUIResource.EmptyBorderUIResource(10,0,0,0);
518
519 Object optionPaneButtonAreaBorder = new BorderUIResource.EmptyBorderUIResource(10,10,10,10);
520
521 Object optionPaneMessageAreaBorder = new BorderUIResource.EmptyBorderUIResource(10,10,12,10);
522
523 @SuppressWarnings("deprecation")
524 final int metaMask = KeyEvent.META_MASK;
525 Object[] defaults = {
526
527 "Desktop.background", table.get("desktop"),
528 "Desktop.ancestorInputMap",
529 new UIDefaults.LazyInputMap(new Object[] {
530 "ctrl F5", "restore",
531 "ctrl F4", "close",
532 "ctrl F7", "move",
533 "ctrl F8", "resize",
534 "RIGHT", "right",
535 "KP_RIGHT", "right",
536 "shift RIGHT", "shrinkRight",
537 "shift KP_RIGHT", "shrinkRight",
538 "LEFT", "left",
539 "KP_LEFT", "left",
540 "shift LEFT", "shrinkLeft",
541 "shift KP_LEFT", "shrinkLeft",
542 "UP", "up",
543 "KP_UP", "up",
544 "shift UP", "shrinkUp",
616 "SPACE", "pressed",
617 "released SPACE", "released"
618 }),
619
620 // Menus
621 "Menu.border", menuMarginBorder,
622 "Menu.font", dialogPlain12,
623 "Menu.acceleratorFont", dialogPlain12,
624 "Menu.acceleratorSelectionForeground", menuItemPressedForeground,
625 "Menu.foreground", table.get("menuText"),
626 "Menu.background", table.get("menu"),
627 "Menu.selectionForeground", menuItemPressedForeground,
628 "Menu.selectionBackground", menuItemPressedBackground,
629 "Menu.checkIcon", menuItemCheckIcon,
630 "Menu.arrowIcon", menuArrowIcon,
631 "Menu.menuPopupOffsetX", 0,
632 "Menu.menuPopupOffsetY", 0,
633 "Menu.submenuPopupOffsetX", -2,
634 "Menu.submenuPopupOffsetY", 3,
635 "Menu.shortcutKeys", new int[]{
636 SwingUtilities2.getSystemMnemonicKeyMask(), metaMask
637 },
638 "Menu.cancelMode", "hideMenuTree",
639
640 "MenuBar.border", menuBarBorder,
641 "MenuBar.background", table.get("menu"),
642 "MenuBar.foreground", table.get("menuText"),
643 "MenuBar.font", dialogPlain12,
644 "MenuBar.windowBindings", new Object[] {
645 "F10", "takeFocus" },
646
647 "MenuItem.border", menuMarginBorder,
648 "MenuItem.font", dialogPlain12,
649 "MenuItem.acceleratorFont", dialogPlain12,
650 "MenuItem.acceleratorSelectionForeground", menuItemPressedForeground,
651 "MenuItem.foreground", table.get("menuText"),
652 "MenuItem.background", table.get("menu"),
653 "MenuItem.selectionForeground", menuItemPressedForeground,
654 "MenuItem.selectionBackground", menuItemPressedBackground,
655 "MenuItem.checkIcon", menuItemCheckIcon,
656 "MenuItem.arrowIcon", menuItemArrowIcon,
|