Source for javax.swing.plaf.basic.BasicLookAndFeel

   1: /* BasicLookAndFeel.java --
   2:    Copyright (C) 2002, 2004, 2005, 2006, Free Software Foundation, Inc.
   3: 
   4: This file is part of GNU Classpath.
   5: 
   6: GNU Classpath is free software; you can redistribute it and/or modify
   7: it under the terms of the GNU General Public License as published by
   8: the Free Software Foundation; either version 2, or (at your option)
   9: any later version.
  10: 
  11: GNU Classpath is distributed in the hope that it will be useful, but
  12: WITHOUT ANY WARRANTY; without even the implied warranty of
  13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14: General Public License for more details.
  15: 
  16: You should have received a copy of the GNU General Public License
  17: along with GNU Classpath; see the file COPYING.  If not, write to the
  18: Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  19: 02110-1301 USA.
  20: 
  21: Linking this library statically or dynamically with other modules is
  22: making a combined work based on this library.  Thus, the terms and
  23: conditions of the GNU General Public License cover the whole
  24: combination.
  25: 
  26: As a special exception, the copyright holders of this library give you
  27: permission to link this library with independent modules to produce an
  28: executable, regardless of the license terms of these independent
  29: modules, and to copy and distribute the resulting executable under
  30: terms of your choice, provided that you also meet, for each linked
  31: independent module, the terms and conditions of the license of that
  32: module.  An independent module is a module which is not derived from
  33: or based on this library.  If you modify this library, you may extend
  34: this exception to your version of the library, but you are not
  35: obligated to do so.  If you do not wish to do so, delete this
  36: exception statement from your version. */
  37: 
  38: 
  39: package javax.swing.plaf.basic;
  40: 
  41: import java.awt.AWTEvent;
  42: import java.awt.Color;
  43: import java.awt.Component;
  44: import java.awt.Container;
  45: import java.awt.Dimension;
  46: import java.awt.Font;
  47: import java.awt.SystemColor;
  48: import java.awt.Toolkit;
  49: import java.awt.event.AWTEventListener;
  50: import java.awt.event.ActionEvent;
  51: import java.awt.event.MouseEvent;
  52: import java.io.IOException;
  53: import java.io.InputStream;
  54: import java.io.Serializable;
  55: import java.util.Enumeration;
  56: import java.util.ResourceBundle;
  57: 
  58: import javax.sound.sampled.AudioInputStream;
  59: import javax.sound.sampled.AudioSystem;
  60: import javax.sound.sampled.Clip;
  61: import javax.sound.sampled.LineUnavailableException;
  62: import javax.sound.sampled.UnsupportedAudioFileException;
  63: import javax.swing.AbstractAction;
  64: import javax.swing.Action;
  65: import javax.swing.ActionMap;
  66: import javax.swing.BorderFactory;
  67: import javax.swing.JComponent;
  68: import javax.swing.KeyStroke;
  69: import javax.swing.LookAndFeel;
  70: import javax.swing.MenuSelectionManager;
  71: import javax.swing.UIDefaults;
  72: import javax.swing.UIManager;
  73: import javax.swing.border.BevelBorder;
  74: import javax.swing.border.Border;
  75: import javax.swing.plaf.BorderUIResource;
  76: import javax.swing.plaf.ColorUIResource;
  77: import javax.swing.plaf.DimensionUIResource;
  78: import javax.swing.plaf.FontUIResource;
  79: import javax.swing.plaf.IconUIResource;
  80: import javax.swing.plaf.InsetsUIResource;
  81: 
  82: /**
  83:  * A basic implementation of Swing's Look and Feel framework. This can serve
  84:  * as a base for custom look and feel implementations.
  85:  *
  86:  * @author Andrew Selkirk
  87:  */
  88: public abstract class BasicLookAndFeel extends LookAndFeel
  89:   implements Serializable
  90: {
  91: 
  92:   /**
  93:    * Helps closing menu popups when the user clicks outside of any menu area.
  94:    * This is implemented as an AWTEventListener that listens on the event
  95:    * queue directly, grabs all mouse events from there and finds out of they
  96:    * are targetted at a menu/submenu/menubar or not. If not,
  97:    * the MenuSelectionManager is messaged to close the currently opened menus,
  98:    * if any.
  99:    *
 100:    * @author Roman Kennke (kennke@aicas.com)
 101:    */
 102:   private class PopupHelper implements AWTEventListener
 103:   {
 104: 
 105:     /**
 106:      * Receives an event from the event queue.
 107:      *
 108:      * @param event
 109:      */
 110:     public void eventDispatched(AWTEvent event)
 111:     {
 112:       if (event instanceof MouseEvent)
 113:         {
 114:           MouseEvent mouseEvent = (MouseEvent) event;
 115:           if (mouseEvent.getID() == MouseEvent.MOUSE_PRESSED)
 116:             mousePressed(mouseEvent);
 117:         }
 118:     }
 119: 
 120:     /**
 121:      * Handles mouse pressed events from the event queue.
 122:      *
 123:      * @param ev the mouse pressed event
 124:      */
 125:     private void mousePressed(MouseEvent ev)
 126:     {
 127:       // Autoclose all menus managed by the MenuSelectionManager.
 128:       MenuSelectionManager m = MenuSelectionManager.defaultManager();
 129:       Component target = ev.getComponent();
 130:       if (target instanceof Container)
 131:         target = ((Container) target).findComponentAt(ev.getPoint());
 132:       if (m.getSelectedPath().length > 0
 133:           && ! m.isComponentPartOfCurrentMenu(target)
 134:           && (((JComponent)target).getClientProperty(DONT_CANCEL_POPUP) == null
 135:           || !((JComponent)target).getClientProperty(DONT_CANCEL_POPUP).equals(Boolean.TRUE)))
 136:         {
 137:           m.clearSelectedPath();
 138:         }
 139:     }
 140: 
 141:   }
 142: 
 143:   /**
 144:    * An action that can play an audio file.
 145:    *
 146:    * @author Roman Kennke (kennke@aicas.com)
 147:    */
 148:   private class AudioAction extends AbstractAction
 149:   {
 150:     /**
 151:      * The UIDefaults key that specifies the sound.
 152:      */
 153:     Object key;
 154: 
 155:     /**
 156:      * Creates a new AudioAction.
 157:      *
 158:      * @param key the key that describes the audio action, normally a filename
 159:      *        of an audio file relative to the current package
 160:      */
 161:     AudioAction(Object key)
 162:     {
 163:       this.key = key;
 164:     }
 165: 
 166:     /**
 167:      * Plays the sound represented by this action.
 168:      *
 169:      * @param event the action event that triggers this audio action
 170:      */
 171:     public void actionPerformed(ActionEvent event)
 172:     {
 173:       // We only can handle strings for now.
 174:       if (key instanceof String)
 175:         {
 176:           String name = UIManager.getString(key);
 177:           InputStream stream = getClass().getResourceAsStream(name);
 178:           try
 179:             {
 180:               Clip clip = AudioSystem.getClip();
 181:               AudioInputStream audioStream =
 182:                 AudioSystem.getAudioInputStream(stream);
 183:               clip.open(audioStream);
 184:             }
 185:           catch (LineUnavailableException ex)
 186:             {
 187:               // Nothing we can do about it.
 188:             }
 189:           catch (IOException ex)
 190:             {
 191:               // Nothing we can do about it.
 192:             }
 193:           catch (UnsupportedAudioFileException e)
 194:             {
 195:               // Nothing we can do about it.
 196:             }
 197:         }
 198:     }
 199:   }
 200: 
 201:   static final long serialVersionUID = -6096995660290287879L;
 202: 
 203:   /**
 204:    * This is a key for a client property that tells the PopupHelper that
 205:    * it shouldn't close popups when the mouse event target has this
 206:    * property set. This is used when the component handles popup closing
 207:    * itself.
 208:    */
 209:   static final String DONT_CANCEL_POPUP = "noCancelPopup";
 210: 
 211:   /**
 212:    * Helps closing menu popups when user clicks outside of the menu area.
 213:    */
 214:   private transient PopupHelper popupHelper;
 215: 
 216:   /**
 217:    * Maps the audio actions for this l&f.
 218:    */
 219:   private ActionMap audioActionMap;
 220: 
 221:   /**
 222:    * Creates a new instance of the Basic look and feel.
 223:    */
 224:   public BasicLookAndFeel()
 225:   {
 226:     // Nothing to do here.
 227:   }
 228: 
 229:   /**
 230:    * Creates and returns a new instance of the default resources for this look
 231:    * and feel.
 232:    *
 233:    * @return The UI defaults.
 234:    */
 235:   public UIDefaults getDefaults()
 236:   {
 237:     // Variables
 238:     UIDefaults def = new UIDefaults();
 239:     // Initialize Class Defaults
 240:     initClassDefaults(def);
 241:     // Initialize System Colour Defaults
 242:     initSystemColorDefaults(def);
 243:     // Initialize Component Defaults
 244:     initComponentDefaults(def);
 245:     // Return UI Defaults
 246:     return def;
 247:   }
 248: 
 249:   /**
 250:    * Populates the <code>defaults</code> table with mappings between class IDs
 251:    * and fully qualified class names for the UI delegates.
 252:    *
 253:    * @param defaults  the defaults table (<code>null</code> not permitted).
 254:    */
 255:   protected void initClassDefaults(UIDefaults defaults)
 256:   {
 257:     // Variables
 258:     Object[] uiDefaults;
 259:     // Initialize Class Defaults
 260:     uiDefaults = new Object[] {
 261:       "ButtonUI", "javax.swing.plaf.basic.BasicButtonUI",
 262:       "CheckBoxMenuItemUI", "javax.swing.plaf.basic.BasicCheckBoxMenuItemUI",
 263:       "CheckBoxUI", "javax.swing.plaf.basic.BasicCheckBoxUI",
 264:       "ColorChooserUI", "javax.swing.plaf.basic.BasicColorChooserUI",
 265:       "ComboBoxUI", "javax.swing.plaf.basic.BasicComboBoxUI",
 266:       "DesktopIconUI", "javax.swing.plaf.basic.BasicDesktopIconUI",
 267:       "DesktopPaneUI", "javax.swing.plaf.basic.BasicDesktopPaneUI",
 268:       "EditorPaneUI", "javax.swing.plaf.basic.BasicEditorPaneUI",
 269:       "FileChooserUI", "javax.swing.plaf.basic.BasicFileChooserUI",
 270:       "FormattedTextFieldUI", "javax.swing.plaf.basic.BasicFormattedTextFieldUI",
 271:       "InternalFrameUI", "javax.swing.plaf.basic.BasicInternalFrameUI",
 272:       "LabelUI", "javax.swing.plaf.basic.BasicLabelUI",
 273:       "ListUI", "javax.swing.plaf.basic.BasicListUI",
 274:       "MenuBarUI", "javax.swing.plaf.basic.BasicMenuBarUI",
 275:       "MenuItemUI", "javax.swing.plaf.basic.BasicMenuItemUI",
 276:       "MenuUI", "javax.swing.plaf.basic.BasicMenuUI",
 277:       "OptionPaneUI", "javax.swing.plaf.basic.BasicOptionPaneUI",
 278:       "PanelUI", "javax.swing.plaf.basic.BasicPanelUI",
 279:       "PasswordFieldUI", "javax.swing.plaf.basic.BasicPasswordFieldUI",
 280:       "PopupMenuSeparatorUI", "javax.swing.plaf.basic.BasicPopupMenuSeparatorUI",
 281:       "PopupMenuUI", "javax.swing.plaf.basic.BasicPopupMenuUI",
 282:       "ProgressBarUI", "javax.swing.plaf.basic.BasicProgressBarUI",
 283:       "RadioButtonMenuItemUI", "javax.swing.plaf.basic.BasicRadioButtonMenuItemUI",
 284:       "RadioButtonUI", "javax.swing.plaf.basic.BasicRadioButtonUI",
 285:       "RootPaneUI", "javax.swing.plaf.basic.BasicRootPaneUI",
 286:       "ScrollBarUI", "javax.swing.plaf.basic.BasicScrollBarUI",
 287:       "ScrollPaneUI", "javax.swing.plaf.basic.BasicScrollPaneUI",
 288:       "SeparatorUI", "javax.swing.plaf.basic.BasicSeparatorUI",
 289:       "SliderUI", "javax.swing.plaf.basic.BasicSliderUI",
 290:       "SplitPaneUI", "javax.swing.plaf.basic.BasicSplitPaneUI",
 291:       "SpinnerUI", "javax.swing.plaf.basic.BasicSpinnerUI",
 292:       "StandardDialogUI", "javax.swing.plaf.basic.BasicStandardDialogUI",
 293:       "TabbedPaneUI", "javax.swing.plaf.basic.BasicTabbedPaneUI",
 294:       "TableHeaderUI", "javax.swing.plaf.basic.BasicTableHeaderUI",
 295:       "TableUI", "javax.swing.plaf.basic.BasicTableUI",
 296:       "TextPaneUI", "javax.swing.plaf.basic.BasicTextPaneUI",
 297:       "TextAreaUI", "javax.swing.plaf.basic.BasicTextAreaUI",
 298:       "TextFieldUI", "javax.swing.plaf.basic.BasicTextFieldUI",
 299:       "ToggleButtonUI", "javax.swing.plaf.basic.BasicToggleButtonUI",
 300:       "ToolBarSeparatorUI", "javax.swing.plaf.basic.BasicToolBarSeparatorUI",
 301:       "ToolBarUI", "javax.swing.plaf.basic.BasicToolBarUI",
 302:       "ToolTipUI", "javax.swing.plaf.basic.BasicToolTipUI",
 303:       "TreeUI", "javax.swing.plaf.basic.BasicTreeUI",
 304:       "ViewportUI", "javax.swing.plaf.basic.BasicViewportUI"
 305:     };
 306:     // Add Class Defaults to UI Defaults table
 307:     defaults.putDefaults(uiDefaults);
 308:   }
 309: 
 310:   /**
 311:    * Populates the <code>defaults</code> table with system color defaults.
 312:    *
 313:    * This sets up a couple of default values and passes them to
 314:    * {@link #loadSystemColors(UIDefaults, String[], boolean)}. If the
 315:    * look and feel is a native look and feel, these defaults may be overridden
 316:    * by the corresponding SystemColor constants.
 317:    *
 318:    * @param defaults  the defaults table (<code>null</code> not permitted).
 319:    */
 320:   protected void initSystemColorDefaults(UIDefaults defaults)
 321:   {
 322:     String[] defaultColors = new String[] {
 323:       "activeCaption", "#000080",
 324:       "activeCaptionBorder", "#C0C0C0",
 325:       "activeCaptionText", "#FFFFFF",
 326:       "control", "#C0C0C0",
 327:       "controlDkShadow", "#000000",
 328:       "controlHighlight", "#C0C0C0",
 329:       "controlLtHighlight", "#FFFFFF",
 330:       "controlShadow", "#808080",
 331:       "controlText", "#000000",
 332:       "desktop", "#005C5C",
 333:       "inactiveCaption", "#808080",
 334:       "inactiveCaptionBorder", "#C0C0C0",
 335:       "inactiveCaptionText", "#C0C0C0",
 336:       "info", "#FFFFE1",
 337:       "infoText", "#000000",
 338:       "menu", "#C0C0C0",
 339:       "menuText", "#000000",
 340:       "scrollbar", "#E0E0E0",
 341:       "text", "#C0C0C0",
 342:       "textHighlight", "#000080",
 343:       "textHighlightText", "#FFFFFF",
 344:       "textInactiveText", "#808080",
 345:       "textText", "#000000",
 346:       "window", "#FFFFFF",
 347:       "windowBorder", "#000000",
 348:       "windowText", "#000000"
 349:     };
 350:     loadSystemColors(defaults, defaultColors, isNativeLookAndFeel());
 351:   }
 352: 
 353:   /**
 354:    * Populates the <code>defaults</code> table with the system colors. If
 355:    * <code>useNative</code> is <code>true</code>, the table is populated
 356:    * with the constants in {@link SystemColor}, otherwise the
 357:    * <code>systemColors</code> parameter is decoded into the defaults table.
 358:    * The system colors array is made up of pairs, where the first entry is the
 359:    * name of the system color, and the second entry is a string denoting
 360:    * an RGB color value like &quot;#C0C0C0&quot;, which is decoded using
 361:    * {@link Color#decode(String)}.
 362:    *
 363:    * @param defaults  the defaults table (<code>null</code> not permitted).
 364:    * @param systemColors defaults to use when <code>useNative</code> is
 365:    *        <code>false</code>
 366:    * @param useNative when <code>true</code>, installs the values of the
 367:    *        SystemColor constants, when <code>false</code>, install the values
 368:    *        from <code>systemColors</code>
 369:    */
 370:   protected void loadSystemColors(UIDefaults defaults, String[] systemColors,
 371:                                   boolean useNative)
 372:   {
 373:     if (useNative)
 374:       {
 375:         defaults.put("activeCaption",
 376:                      new ColorUIResource(SystemColor.ACTIVE_CAPTION));
 377:         defaults.put("activeCaptionBorder",
 378:                      new ColorUIResource(SystemColor.ACTIVE_CAPTION_BORDER));
 379:         defaults.put("activeCaptionText",
 380:                      new ColorUIResource(SystemColor.ACTIVE_CAPTION_TEXT));
 381:         defaults.put("control",
 382:                      new ColorUIResource(SystemColor.CONTROL));
 383:         defaults.put("controlDkShadow",
 384:                      new ColorUIResource(SystemColor.CONTROL_DK_SHADOW));
 385:         defaults.put("controlHighlight",
 386:                      new ColorUIResource(SystemColor.CONTROL_HIGHLIGHT));
 387:         defaults.put("controlLtHighlight",
 388:                      new ColorUIResource(SystemColor.CONTROL_LT_HIGHLIGHT));
 389:         defaults.put("controlShadow",
 390:                      new ColorUIResource(SystemColor.CONTROL_SHADOW));
 391:         defaults.put("controlText",
 392:                      new ColorUIResource(SystemColor.CONTROL_TEXT));
 393:         defaults.put("desktop",
 394:                      new ColorUIResource(SystemColor.DESKTOP));
 395:         defaults.put("inactiveCaption",
 396:                      new ColorUIResource(SystemColor.INACTIVE_CAPTION));
 397:         defaults.put("inactiveCaptionBorder",
 398:                      new ColorUIResource(SystemColor.INACTIVE_CAPTION_BORDER));
 399:         defaults.put("inactiveCaptionText",
 400:                      new ColorUIResource(SystemColor.INACTIVE_CAPTION_TEXT));
 401:         defaults.put("info",
 402:                      new ColorUIResource(SystemColor.INFO));
 403:         defaults.put("infoText",
 404:                      new ColorUIResource(SystemColor.INFO_TEXT));
 405:         defaults.put("menu",
 406:                      new ColorUIResource(SystemColor.MENU));
 407:         defaults.put("menuText",
 408:                      new ColorUIResource(SystemColor.MENU_TEXT));
 409:         defaults.put("scrollbar",
 410:                      new ColorUIResource(SystemColor.SCROLLBAR));
 411:         defaults.put("text",
 412:                      new ColorUIResource(SystemColor.TEXT));
 413:         defaults.put("textHighlight",
 414:                      new ColorUIResource(SystemColor.TEXT_HIGHLIGHT));
 415:         defaults.put("textHighlightText",
 416:                      new ColorUIResource(SystemColor.TEXT_HIGHLIGHT_TEXT));
 417:         defaults.put("textInactiveText",
 418:                      new ColorUIResource(SystemColor.TEXT_INACTIVE_TEXT));
 419:         defaults.put("textText",
 420:                      new ColorUIResource(SystemColor.TEXT_TEXT));
 421:         defaults.put("window",
 422:                      new ColorUIResource(SystemColor.WINDOW));
 423:         defaults.put("windowBorder",
 424:                      new ColorUIResource(SystemColor.WINDOW_BORDER));
 425:         defaults.put("windowText",
 426:                      new ColorUIResource(SystemColor.WINDOW_TEXT));
 427:       }
 428:     else
 429:       {
 430:         for (int i = 0; i < systemColors.length; i += 2)
 431:           {
 432:             Color color = Color.BLACK;
 433:             try
 434:               {
 435:                 color = Color.decode(systemColors[i + 1]);
 436:               }
 437:             catch (NumberFormatException e)
 438:               {
 439:                 e.printStackTrace();
 440:               }
 441:             defaults.put(systemColors[i], new ColorUIResource(color));
 442:           }
 443:       }
 444:   }
 445: 
 446:   /**
 447:    * Loads the resource bundle in 'resources/basic' and adds the contained
 448:    * key/value pairs to the <code>defaults</code> table.
 449:    *
 450:    * @param defaults the UI defaults to load the resources into
 451:    */
 452:   // FIXME: This method is not used atm and private and thus could be removed.
 453:   // However, I consider this method useful for providing localized
 454:   // descriptions and similar stuff and therefore think that we should use it
 455:   // instead and provide the resource bundles.
 456:   private void loadResourceBundle(UIDefaults defaults)
 457:   {
 458:     ResourceBundle bundle;
 459:     Enumeration e;
 460:     String key;
 461:     String value;
 462:     bundle = ResourceBundle.getBundle("resources/basic");
 463:     // Process Resources
 464:     e = bundle.getKeys();
 465:     while (e.hasMoreElements())
 466:       {
 467:         key = (String) e.nextElement();
 468:         value = bundle.getString(key);
 469:         defaults.put(key, value);
 470:       }
 471:   }
 472: 
 473:   /**
 474:    * Populates the <code>defaults</code> table with UI default values for
 475:    * colors, fonts, keybindings and much more.
 476:    *
 477:    * @param defaults  the defaults table (<code>null</code> not permitted).
 478:    */
 479:   protected void initComponentDefaults(UIDefaults defaults)
 480:   {
 481:     Object[] uiDefaults;
 482: 
 483:     Color highLight = new Color(249, 247, 246);
 484:     Color light = new Color(239, 235, 231);
 485:     Color shadow = new Color(139, 136, 134);
 486:     Color darkShadow = new Color(16, 16, 16);
 487: 
 488:     uiDefaults = new Object[] {
 489: 
 490:       "AbstractUndoableEdit.undoText", "Undo",
 491:       "AbstractUndoableEdit.redoText", "Redo",
 492:       "Button.background", new ColorUIResource(Color.LIGHT_GRAY),
 493:       "Button.border",
 494:       new UIDefaults.LazyValue()
 495:       {
 496:         public Object createValue(UIDefaults table)
 497:         {
 498:           return BasicBorders.getButtonBorder();
 499:         }
 500:       },
 501:       "Button.darkShadow", new ColorUIResource(Color.BLACK),
 502:       "Button.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 503:       "Button.foreground", new ColorUIResource(Color.BLACK),
 504:       "Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
 505:           KeyStroke.getKeyStroke("SPACE"), "pressed",
 506:           KeyStroke.getKeyStroke("released SPACE"), "released"
 507:       }),
 508:       "Button.highlight", new ColorUIResource(Color.WHITE),
 509:       "Button.light", new ColorUIResource(Color.LIGHT_GRAY),
 510:       "Button.margin", new InsetsUIResource(2, 14, 2, 14),
 511:       "Button.shadow", new ColorUIResource(Color.GRAY),
 512:       "Button.textIconGap", new Integer(4),
 513:       "Button.textShiftOffset", new Integer(0),
 514:       "CheckBox.background", new ColorUIResource(new Color(204, 204, 204)),
 515:       "CheckBox.border", new BorderUIResource.CompoundBorderUIResource(null,
 516:                                                                        null),
 517:       "CheckBox.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
 518:           KeyStroke.getKeyStroke("SPACE"), "pressed",
 519:           KeyStroke.getKeyStroke("released SPACE"), "released"
 520:       }),
 521:       "CheckBox.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 522:       "CheckBox.foreground", new ColorUIResource(darkShadow),
 523:       "CheckBox.icon",
 524:       new UIDefaults.LazyValue()
 525:       {
 526:         public Object createValue(UIDefaults def)
 527:         {
 528:           return BasicIconFactory.getCheckBoxIcon();
 529:         }
 530:       },
 531:       "CheckBox.checkIcon",
 532:       new UIDefaults.LazyValue()
 533:       {
 534:         public Object createValue(UIDefaults def)
 535:         {
 536:           return BasicIconFactory.getMenuItemCheckIcon();
 537:         }
 538:       },
 539:       "CheckBox.margin", new InsetsUIResource(2, 2, 2, 2),
 540:       "CheckBox.textIconGap", new Integer(4),
 541:       "CheckBox.textShiftOffset", new Integer(0),
 542:       "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog",
 543:                                                              Font.PLAIN, 12),
 544:       "CheckBoxMenuItem.acceleratorForeground",
 545:       new ColorUIResource(new Color(16, 16, 16)),
 546:       "CheckBoxMenuItem.acceleratorSelectionForeground",
 547:       new ColorUIResource(Color.white),
 548:       "CheckBoxMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(),
 549:       "CheckBoxMenuItem.background", new ColorUIResource(light),
 550:       "CheckBoxMenuItem.border", new BasicBorders.MarginBorder(),
 551:       "CheckBoxMenuItem.borderPainted", Boolean.FALSE,
 552:       "CheckBoxMenuItem.checkIcon",
 553:       new UIDefaults.LazyValue()
 554:       {
 555:         public Object createValue(UIDefaults def)
 556:         {
 557:           return BasicIconFactory.getCheckBoxMenuItemIcon();
 558:         }
 559:       },
 560:       "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 561:       "CheckBoxMenuItem.foreground", new ColorUIResource(darkShadow),
 562:       "CheckBoxMenuItem.margin", new InsetsUIResource(2, 2, 2, 2),
 563:       "CheckBoxMenuItem.selectionBackground", new ColorUIResource(Color.black),
 564:       "CheckBoxMenuItem.selectionForeground", new ColorUIResource(Color.white),
 565:       "ColorChooser.background", new ColorUIResource(light),
 566:       "ColorChooser.cancelText", "Cancel",
 567:       "ColorChooser.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 568:       "ColorChooser.foreground", new ColorUIResource(darkShadow),
 569:       "ColorChooser.hsbBlueText", "B",
 570:       "ColorChooser.hsbBrightnessText", "B",
 571:       "ColorChooser.hsbGreenText", "G",
 572:       "ColorChooser.hsbHueText", "H",
 573:       "ColorChooser.hsbNameText", "HSB",
 574:       "ColorChooser.hsbRedText", "R",
 575:       "ColorChooser.hsbSaturationText", "S",
 576:       "ColorChooser.okText", "OK",
 577:       "ColorChooser.previewText", "Preview",
 578:       "ColorChooser.resetText", "Reset",
 579:       "ColorChooser.rgbBlueMnemonic", "66",
 580:       "ColorChooser.rgbBlueText", "Blue",
 581:       "ColorChooser.rgbGreenMnemonic", "78",
 582:       "ColorChooser.rgbGreenText", "Green",
 583:       "ColorChooser.rgbNameText", "RGB",
 584:       "ColorChooser.rgbRedMnemonic", "68",
 585:       "ColorChooser.rgbRedText", "Red",
 586:       "ColorChooser.sampleText", "Sample Text  Sample Text",
 587:       "ColorChooser.swatchesDefaultRecentColor", new ColorUIResource(light),
 588:       "ColorChooser.swatchesNameText", "Swatches",
 589:       "ColorChooser.swatchesRecentSwatchSize", new Dimension(10, 10),
 590:       "ColorChooser.swatchesRecentText", "Recent:",
 591:       "ColorChooser.swatchesSwatchSize", new Dimension(10, 10),
 592:       "ComboBox.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
 593:         "ESCAPE", "hidePopup",
 594:         "PAGE_UP", "pageUpPassThrough",
 595:         "PAGE_DOWN", "pageDownPassThrough",
 596:         "HOME",  "homePassThrough",
 597:         "END",  "endPassThrough"
 598:       }),
 599:       "ComboBox.background", new ColorUIResource(Color.white),
 600:       "ComboBox.buttonBackground", new ColorUIResource(light),
 601:       "ComboBox.buttonDarkShadow", new ColorUIResource(darkShadow),
 602:       "ComboBox.buttonHighlight", new ColorUIResource(highLight),
 603:       "ComboBox.buttonShadow", new ColorUIResource(shadow),
 604:       "ComboBox.disabledBackground", new ColorUIResource(light),
 605:       "ComboBox.disabledForeground", new ColorUIResource(Color.gray),
 606:       "ComboBox.font", new FontUIResource("SansSerif", Font.PLAIN, 12),
 607:       "ComboBox.foreground", new ColorUIResource(Color.black),
 608:       "ComboBox.selectionBackground", new ColorUIResource(0, 0, 128),
 609:       "ComboBox.selectionForeground", new ColorUIResource(Color.white),
 610:       "Desktop.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
 611:         "KP_LEFT", "left",
 612:         "KP_RIGHT", "right",
 613:         "ctrl F5", "restore",
 614:         "LEFT",  "left",
 615:         "ctrl alt F6", "selectNextFrame",
 616:         "UP",  "up",
 617:         "ctrl F6", "selectNextFrame",
 618:         "RIGHT", "right",
 619:         "DOWN",  "down",
 620:         "ctrl F7", "move",
 621:         "ctrl F8", "resize",
 622:         "ESCAPE", "escape",
 623:         "ctrl TAB", "selectNextFrame",
 624:         "ctrl F9", "minimize",
 625:         "KP_UP", "up",
 626:         "ctrl F4", "close",
 627:         "KP_DOWN", "down",
 628:         "ctrl F10", "maximize",
 629:         "ctrl alt shift F6", "selectPreviousFrame"
 630:       }),
 631:       "DesktopIcon.border", new BorderUIResource.CompoundBorderUIResource(null,
 632:                                                                           null),
 633:       "EditorPane.background", new ColorUIResource(Color.white),
 634:       "EditorPane.border", BasicBorders.getMarginBorder(),
 635:       "EditorPane.caretBlinkRate", new Integer(500),
 636:       "EditorPane.caretForeground", new ColorUIResource(Color.black),
 637:       "EditorPane.font", new FontUIResource("Serif", Font.PLAIN, 12),
 638:       "EditorPane.foreground", new ColorUIResource(Color.black),
 639:       "EditorPane.inactiveForeground", new ColorUIResource(Color.gray),
 640:       "EditorPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
 641:                 KeyStroke.getKeyStroke("shift UP"), "selection-up",
 642:                 KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word",
 643:                 KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
 644:                 KeyStroke.getKeyStroke("shift KP_UP"), "selection-up",
 645:                 KeyStroke.getKeyStroke("DOWN"), "caret-down",
 646:                 KeyStroke.getKeyStroke("shift ctrl T"), "previous-link-action",
 647:                 KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word",
 648:                 KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
 649:                 KeyStroke.getKeyStroke("END"), "caret-end-line",
 650:                 KeyStroke.getKeyStroke("shift PAGE_UP"), "selection-page-up",
 651:                 KeyStroke.getKeyStroke("KP_UP"), "caret-up",
 652:                 KeyStroke.getKeyStroke("DELETE"), "delete-next",
 653:                 KeyStroke.getKeyStroke("ctrl HOME"), "caret-begin",
 654:                 KeyStroke.getKeyStroke("shift LEFT"), "selection-backward",
 655:                 KeyStroke.getKeyStroke("ctrl END"), "caret-end",
 656:                 KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
 657:                 KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word",
 658:                 KeyStroke.getKeyStroke("LEFT"), "caret-backward",
 659:                 KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
 660:                 KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
 661:                 KeyStroke.getKeyStroke("ctrl SPACE"), "activate-link-action",
 662:                 KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
 663:                 KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
 664:                 KeyStroke.getKeyStroke("ENTER"), "insert-break",
 665:                 KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
 666:                 KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
 667:                 KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "selection-page-left",
 668:                 KeyStroke.getKeyStroke("shift DOWN"), "selection-down",
 669:                 KeyStroke.getKeyStroke("PAGE_DOWN"), "page-down",
 670:                 KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
 671:                 KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
 672:                 KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
 673:                 KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "selection-page-right",
 674:                 KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
 675:                 KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word",
 676:                 KeyStroke.getKeyStroke("shift END"), "selection-end-line",
 677:                 KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word",
 678:                 KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
 679:                 KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
 680:                 KeyStroke.getKeyStroke("KP_DOWN"), "caret-down",
 681:                 KeyStroke.getKeyStroke("ctrl A"), "select-all",
 682:                 KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
 683:                 KeyStroke.getKeyStroke("shift ctrl END"), "selection-end",
 684:                 KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
 685:                 KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word",
 686:                 KeyStroke.getKeyStroke("ctrl T"), "next-link-action",
 687:                 KeyStroke.getKeyStroke("shift KP_DOWN"), "selection-down",
 688:                 KeyStroke.getKeyStroke("TAB"), "insert-tab",
 689:                 KeyStroke.getKeyStroke("UP"), "caret-up",
 690:                 KeyStroke.getKeyStroke("shift ctrl HOME"), "selection-begin",
 691:                 KeyStroke.getKeyStroke("shift PAGE_DOWN"), "selection-page-down",
 692:                 KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
 693:                 KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word",
 694:                 KeyStroke.getKeyStroke("PAGE_UP"), "page-up",
 695:                 KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard"
 696:           }),
 697:       "EditorPane.margin", new InsetsUIResource(3, 3, 3, 3),
 698:       "EditorPane.selectionBackground", new ColorUIResource(Color.black),
 699:       "EditorPane.selectionForeground", new ColorUIResource(Color.white),
 700:       "FileChooser.acceptAllFileFilterText", "All Files (*.*)",
 701:       "FileChooser.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
 702:         "ESCAPE", "cancelSelection"
 703:       }),
 704:       "FileChooser.cancelButtonMnemonic", "67",
 705:       "FileChooser.cancelButtonText", "Cancel",
 706:       "FileChooser.cancelButtonToolTipText", "Abort file chooser dialog",
 707:       "FileChooser.directoryDescriptionText", "Directory",
 708:       "FileChooser.fileDescriptionText", "Generic File",
 709:       "FileChooser.directoryOpenButtonMnemonic", "79",
 710:       "FileChooser.helpButtonMnemonic", "72",
 711:       "FileChooser.helpButtonText", "Help",
 712:       "FileChooser.helpButtonToolTipText", "FileChooser help",
 713:       "FileChooser.newFolderErrorSeparator", ":",
 714:       "FileChooser.newFolderErrorText", "Error creating new folder",
 715:       "FileChooser.openButtonMnemonic", "79",
 716:       "FileChooser.openButtonText", "Open",
 717:       "FileChooser.openButtonToolTipText", "Open selected file",
 718:       "FileChooser.saveButtonMnemonic", "83",
 719:       "FileChooser.saveButtonText", "Save",
 720:       "FileChooser.saveButtonToolTipText", "Save selected file",
 721:       "FileChooser.updateButtonMnemonic", "85",
 722:       "FileChooser.updateButtonText", "Update",
 723:       "FileChooser.updateButtonToolTipText", "Update directory listing",
 724:       "FocusManagerClassName", "TODO",
 725:       "FormattedTextField.background", new ColorUIResource(light),
 726:       "FormattedTextField.caretForeground", new ColorUIResource(Color.black),
 727:       "FormattedTextField.margin", new InsetsUIResource(0, 0, 0, 0),
 728:       "FormattedTextField.caretBlinkRate", new Integer(500),
 729:       "FormattedTextField.font",
 730:       new FontUIResource("SansSerif", Font.PLAIN, 12),
 731:       "FormattedTextField.foreground", new ColorUIResource(Color.black),
 732:       "FormattedTextField.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
 733:         KeyStroke.getKeyStroke("KP_UP"), "increment",
 734:         KeyStroke.getKeyStroke("END"), "caret-end-line",
 735:         KeyStroke.getKeyStroke("shift ctrl  O"), "toggle-componentOrientation",
 736:         KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
 737:         KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
 738:         KeyStroke.getKeyStroke("KP_DOWN"), "decrement",
 739:         KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
 740:         KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
 741:         KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
 742:         KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
 743:         KeyStroke.getKeyStroke("LEFT"), "caret-backward",
 744:         KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
 745:         KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
 746:         KeyStroke.getKeyStroke("UP"), "increment",
 747:         KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word",
 748:         KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
 749:         KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
 750:         KeyStroke.getKeyStroke("ESCAPE"), "reset-field-edit",
 751:         KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
 752:         KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
 753:         KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word",
 754:         KeyStroke.getKeyStroke("DOWN"), "decrement",
 755:         KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word",
 756:         KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard",
 757:         KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word",
 758:         KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
 759:         KeyStroke.getKeyStroke("ctrl A"), "select-all",
 760:         KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
 761:         KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
 762:         KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word",
 763:         KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
 764:         KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word",
 765:         KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
 766:         KeyStroke.getKeyStroke("shift END"), "selection-end-line",
 767:         KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word",
 768:         KeyStroke.getKeyStroke("DELETE"), "delete-next",
 769:         KeyStroke.getKeyStroke("ENTER"), "notify-field-accept",
 770:         KeyStroke.getKeyStroke("shift LEFT"), "selection-backward"
 771:       }),
 772:       "FormattedTextField.inactiveBackground", new ColorUIResource(light),
 773:       "FormattedTextField.inactiveForeground", new ColorUIResource(Color.gray),
 774:       "FormattedTextField.selectionBackground",
 775:       new ColorUIResource(Color.black),
 776:       "FormattedTextField.selectionForeground",
 777:       new ColorUIResource(Color.white),
 778:       "FormView.resetButtonText", "Reset",
 779:       "FormView.submitButtonText", "Submit Query",
 780:       "InternalFrame.activeTitleBackground", new ColorUIResource(0, 0, 128),
 781:       "InternalFrame.activeTitleForeground", new ColorUIResource(Color.white),
 782:       "InternalFrame.border",
 783:       new UIDefaults.LazyValue()
 784:       {
 785:         public Object createValue(UIDefaults table)
 786:         {
 787:           Color lineColor = new Color(238, 238, 238);
 788:           Border inner = BorderFactory.createLineBorder(lineColor, 1);
 789:           Color shadowInner = new Color(184, 207, 229);
 790:           Color shadowOuter = new Color(122, 138, 153);
 791:           Border outer = BorderFactory.createBevelBorder(BevelBorder.RAISED,
 792:                                                          Color.WHITE,
 793:                                                          Color.WHITE,
 794:                                                          shadowOuter,
 795:                                                          shadowInner);
 796:           Border border = new BorderUIResource.CompoundBorderUIResource(outer,
 797:                                                                         inner);
 798:           return border;
 799:         }
 800:       },
 801:       "InternalFrame.borderColor", new ColorUIResource(light),
 802:       "InternalFrame.borderDarkShadow", new ColorUIResource(Color.BLACK),
 803:       "InternalFrame.borderHighlight", new ColorUIResource(Color.WHITE),
 804:       "InternalFrame.borderLight", new ColorUIResource(Color.LIGHT_GRAY),
 805:       "InternalFrame.borderShadow", new ColorUIResource(Color.GRAY),
 806:       "InternalFrame.closeIcon", BasicIconFactory.createEmptyFrameIcon(),
 807:       "InternalFrame.icon",
 808:       new UIDefaults.LazyValue()
 809:       {
 810:         public Object createValue(UIDefaults def)
 811:         {
 812:           return new IconUIResource(BasicIconFactory.createEmptyFrameIcon());
 813:         }
 814:       },
 815:       "InternalFrame.iconifyIcon", BasicIconFactory.createEmptyFrameIcon(),
 816:       "InternalFrame.inactiveTitleBackground", new ColorUIResource(Color.gray),
 817:       "InternalFrame.inactiveTitleForeground",
 818:       new ColorUIResource(Color.lightGray),
 819:       "InternalFrame.maximizeIcon", BasicIconFactory.createEmptyFrameIcon(),
 820:       "InternalFrame.minimizeIcon", BasicIconFactory.createEmptyFrameIcon(),
 821:       "InternalFrame.titleFont", new FontUIResource("Dialog", Font.BOLD, 12),
 822:       "InternalFrame.windowBindings", new Object[] {
 823:         "shift ESCAPE", "showSystemMenu",
 824:         "ctrl SPACE",  "showSystemMenu",
 825:         "ESCAPE",  "showSystemMenu"
 826:       },
 827:       "Label.background", new ColorUIResource(light),
 828:       "Label.disabledForeground", new ColorUIResource(Color.white),
 829:       "Label.disabledShadow", new ColorUIResource(shadow),
 830:       "Label.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 831:       "Label.foreground", new ColorUIResource(darkShadow),
 832:       "List.background", new ColorUIResource(Color.white),
 833:       "List.border", new BasicBorders.MarginBorder(),
 834:       "List.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
 835:             KeyStroke.getKeyStroke("ctrl DOWN"), "selectNextRowChangeLead",
 836:             KeyStroke.getKeyStroke("shift UP"), "selectPreviousRowExtendSelection",
 837:             KeyStroke.getKeyStroke("ctrl RIGHT"), "selectNextColumnChangeLead",
 838:             KeyStroke.getKeyStroke("shift ctrl LEFT"), "selectPreviousColumnExtendSelection",
 839:             KeyStroke.getKeyStroke("shift KP_UP"), "selectPreviousRowExtendSelection",
 840:             KeyStroke.getKeyStroke("DOWN"), "selectNextRow",
 841:             KeyStroke.getKeyStroke("ctrl UP"), "selectPreviousRowChangeLead",
 842:             KeyStroke.getKeyStroke("ctrl LEFT"), "selectPreviousColumnChangeLead",
 843:             KeyStroke.getKeyStroke("CUT"), "cut",
 844:             KeyStroke.getKeyStroke("END"), "selectLastRow",
 845:             KeyStroke.getKeyStroke("shift PAGE_UP"), "scrollUpExtendSelection",
 846:             KeyStroke.getKeyStroke("KP_UP"), "selectPreviousRow",
 847:             KeyStroke.getKeyStroke("shift ctrl UP"), "selectPreviousRowExtendSelection",
 848:             KeyStroke.getKeyStroke("ctrl HOME"), "selectFirstRowChangeLead",
 849:             KeyStroke.getKeyStroke("shift LEFT"), "selectPreviousColumnExtendSelection",
 850:             KeyStroke.getKeyStroke("ctrl END"), "selectLastRowChangeLead",
 851:             KeyStroke.getKeyStroke("ctrl PAGE_DOWN"), "scrollDownChangeLead",
 852:             KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selectNextColumnExtendSelection",
 853:             KeyStroke.getKeyStroke("LEFT"), "selectPreviousColumn",
 854:             KeyStroke.getKeyStroke("ctrl PAGE_UP"), "scrollUpChangeLead",
 855:             KeyStroke.getKeyStroke("KP_LEFT"), "selectPreviousColumn",
 856:             KeyStroke.getKeyStroke("shift KP_RIGHT"), "selectNextColumnExtendSelection",
 857:             KeyStroke.getKeyStroke("SPACE"), "addToSelection",
 858:             KeyStroke.getKeyStroke("ctrl SPACE"), "toggleAndAnchor",
 859:             KeyStroke.getKeyStroke("shift SPACE"), "extendTo",
 860:             KeyStroke.getKeyStroke("shift ctrl SPACE"), "moveSelectionTo",
 861:             KeyStroke.getKeyStroke("shift ctrl DOWN"), "selectNextRowExtendSelection",
 862:             KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "clearSelection",
 863:             KeyStroke.getKeyStroke("shift HOME"), "selectFirstRowExtendSelection",
 864:             KeyStroke.getKeyStroke("RIGHT"), "selectNextColumn",
 865:             KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "scrollUpExtendSelection",
 866:             KeyStroke.getKeyStroke("shift DOWN"), "selectNextRowExtendSelection",
 867:             KeyStroke.getKeyStroke("PAGE_DOWN"), "scrollDown",
 868:             KeyStroke.getKeyStroke("shift ctrl KP_UP"), "selectPreviousRowExtendSelection",
 869:             KeyStroke.getKeyStroke("shift KP_LEFT"), "selectPreviousColumnExtendSelection",
 870:             KeyStroke.getKeyStroke("ctrl X"), "cut",
 871:             KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "scrollDownExtendSelection",
 872:             KeyStroke.getKeyStroke("ctrl SLASH"), "selectAll",
 873:             KeyStroke.getKeyStroke("ctrl C"), "copy",
 874:             KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "selectNextColumnChangeLead",
 875:             KeyStroke.getKeyStroke("shift END"), "selectLastRowExtendSelection",
 876:             KeyStroke.getKeyStroke("shift ctrl KP_DOWN"), "selectNextRowExtendSelection",
 877:             KeyStroke.getKeyStroke("ctrl KP_LEFT"), "selectPreviousColumnChangeLead",
 878:             KeyStroke.getKeyStroke("HOME"), "selectFirstRow",
 879:             KeyStroke.getKeyStroke("ctrl V"), "paste",
 880:             KeyStroke.getKeyStroke("KP_DOWN"), "selectNextRow",
 881:             KeyStroke.getKeyStroke("ctrl KP_DOWN"), "selectNextRowChangeLead",
 882:             KeyStroke.getKeyStroke("shift RIGHT"), "selectNextColumnExtendSelection",
 883:             KeyStroke.getKeyStroke("ctrl A"), "selectAll",
 884:             KeyStroke.getKeyStroke("shift ctrl END"), "selectLastRowExtendSelection",
 885:             KeyStroke.getKeyStroke("COPY"), "copy",
 886:             KeyStroke.getKeyStroke("ctrl KP_UP"), "selectPreviousRowChangeLead",
 887:             KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selectPreviousColumnExtendSelection",
 888:             KeyStroke.getKeyStroke("shift KP_DOWN"), "selectNextRowExtendSelection",
 889:             KeyStroke.getKeyStroke("UP"), "selectPreviousRow",
 890:             KeyStroke.getKeyStroke("shift ctrl HOME"), "selectFirstRowExtendSelection",
 891:             KeyStroke.getKeyStroke("shift PAGE_DOWN"), "scrollDownExtendSelection",
 892:             KeyStroke.getKeyStroke("KP_RIGHT"), "selectNextColumn",
 893:             KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selectNextColumnExtendSelection",
 894:             KeyStroke.getKeyStroke("PAGE_UP"), "scrollUp",
 895:             KeyStroke.getKeyStroke("PASTE"), "paste"
 896:       }),
 897:       "List.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 898:       "List.foreground", new ColorUIResource(Color.black),
 899:       "List.selectionBackground", new ColorUIResource(0, 0, 128),
 900:       "List.selectionForeground", new ColorUIResource(Color.white),
 901:       "List.focusCellHighlightBorder",
 902:       new BorderUIResource.
 903:       LineBorderUIResource(new ColorUIResource(Color.yellow)),
 904:       "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12),
 905:       "Menu.crossMenuMnemonic", Boolean.TRUE,
 906:       "Menu.acceleratorForeground", new ColorUIResource(darkShadow),
 907:       "Menu.acceleratorSelectionForeground", new ColorUIResource(Color.white),
 908:       "Menu.arrowIcon", BasicIconFactory.getMenuArrowIcon(),
 909:       "Menu.background", new ColorUIResource(light),
 910:       "Menu.border", new BasicBorders.MarginBorder(),
 911:       "Menu.borderPainted", Boolean.FALSE,
 912:       "Menu.checkIcon", BasicIconFactory.getMenuItemCheckIcon(),
 913:       "Menu.consumesTabs", Boolean.TRUE,
 914:       "Menu.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 915:       "Menu.foreground", new ColorUIResource(darkShadow),
 916:       "Menu.margin", new InsetsUIResource(2, 2, 2, 2),
 917:       "Menu.selectedWindowInputMapBindings", new Object[] {
 918:         "ESCAPE", "cancel",
 919:         "DOWN",  "selectNext",
 920:         "KP_DOWN", "selectNext",
 921:         "UP",  "selectPrevious",
 922:         "KP_UP", "selectPrevious",
 923:         "LEFT",  "selectParent",
 924:         "KP_LEFT", "selectParent",
 925:         "RIGHT", "selectChild",
 926:         "KP_RIGHT", "selectChild",
 927:         "ENTER", "return",
 928:         "SPACE", "return"
 929:       },
 930:       "Menu.menuPopupOffsetX", new Integer(0),
 931:       "Menu.menuPopupOffsetY", new Integer(0),
 932:       "Menu.submenuPopupOffsetX", new Integer(0),
 933:       "Menu.submenuPopupOffsetY", new Integer(0),
 934:       "Menu.selectionBackground", new ColorUIResource(Color.black),
 935:       "Menu.selectionForeground", new ColorUIResource(Color.white),
 936:       "MenuBar.background", new ColorUIResource(light),
 937:       "MenuBar.border", new BasicBorders.MenuBarBorder(null, null),
 938:       "MenuBar.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 939:       "MenuBar.foreground", new ColorUIResource(darkShadow),
 940:       "MenuBar.highlight", new ColorUIResource(highLight),
 941:       "MenuBar.shadow", new ColorUIResource(shadow),
 942:       "MenuBar.windowBindings", new Object[] {
 943:         "F10", "takeFocus"
 944:       },
 945:       "MenuItem.acceleratorDelimiter", "+",
 946:       "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12),
 947:       "MenuItem.acceleratorForeground", new ColorUIResource(darkShadow),
 948:       "MenuItem.acceleratorSelectionForeground",
 949:       new ColorUIResource(Color.white),
 950:       "MenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(),
 951:       "MenuItem.background", new ColorUIResource(light),
 952:       "MenuItem.border", new BasicBorders.MarginBorder(),
 953:       "MenuItem.borderPainted", Boolean.FALSE,
 954:       "MenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 955:       "MenuItem.foreground", new ColorUIResource(darkShadow),
 956:       "MenuItem.margin", new InsetsUIResource(2, 2, 2, 2),
 957:       "MenuItem.selectionBackground", new ColorUIResource(Color.black),
 958:       "MenuItem.selectionForeground", new ColorUIResource(Color.white),
 959:       "OptionPane.background", new ColorUIResource(light),
 960:       "OptionPane.border",
 961:       new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0),
 962:       "OptionPane.buttonAreaBorder",
 963:       new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0),
 964:       "OptionPane.buttonClickThreshhold", new Integer(500),
 965:       "OptionPane.cancelButtonText", "Cancel",
 966:       "OptionPane.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 967:       "OptionPane.foreground", new ColorUIResource(darkShadow),
 968:       "OptionPane.messageAreaBorder",
 969:       new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0),
 970:       "OptionPane.messageForeground", new ColorUIResource(darkShadow),
 971:       "OptionPane.minimumSize",
 972:       new DimensionUIResource(BasicOptionPaneUI.MinimumWidth,
 973:                               BasicOptionPaneUI.MinimumHeight),
 974:       "OptionPane.noButtonText", "No",
 975:       "OptionPane.okButtonText", "OK",
 976:       "OptionPane.windowBindings", new Object[] {
 977:         "ESCAPE",  "close"
 978:       },
 979:       "OptionPane.yesButtonText", "Yes",
 980:       "Panel.background", new ColorUIResource(light),
 981:       "Panel.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 982:       "Panel.foreground", new ColorUIResource(Color.black),
 983:       "PasswordField.background", new ColorUIResource(light),
 984:       "PasswordField.border", new BasicBorders.FieldBorder(null, null,
 985:                                                            null, null),
 986:       "PasswordField.caretBlinkRate", new Integer(500),
 987:       "PasswordField.caretForeground", new ColorUIResource(Color.black),
 988:       "PasswordField.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12),
 989:       "PasswordField.foreground", new ColorUIResource(Color.black),
 990:       "PasswordField.inactiveBackground", new ColorUIResource(light),
 991:       "PasswordField.inactiveForeground", new ColorUIResource(Color.gray),
 992:       "PasswordField.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
 993:                       KeyStroke.getKeyStroke("END"), "caret-end-line",
 994:                       KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
 995:                       KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
 996:                       KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
 997:                       KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
 998:                       KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
 999:                       KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
1000:                       KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
1001:                       KeyStroke.getKeyStroke("LEFT"), "caret-backward",
1002:                       KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
1003:                       KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
1004:                       KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-end-line",
1005:                       KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
1006:                       KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
1007:                       KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
1008:                       KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-begin-line",
1009:                       KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-begin-line",
1010:                       KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-end-line",
1011:                       KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard",
1012:                       KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-end-line",
1013:                       KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
1014:                       KeyStroke.getKeyStroke("ctrl A"), "select-all",
1015:                       KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
1016:                       KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
1017:                       KeyStroke.getKeyStroke("ctrl LEFT"), "caret-begin-line",
1018:                       KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
1019:                       KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-begin-line",
1020:                       KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
1021:                       KeyStroke.getKeyStroke("shift END"), "selection-end-line",
1022:                       KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-end-line",
1023:                       KeyStroke.getKeyStroke("DELETE"), "delete-next",
1024:                       KeyStroke.getKeyStroke("ENTER"), "notify-field-accept",
1025:                       KeyStroke.getKeyStroke("shift LEFT"), "selection-backward"
1026:                             }),
1027:       "PasswordField.margin", new InsetsUIResource(0, 0, 0, 0),
1028:       "PasswordField.selectionBackground", new ColorUIResource(Color.black),
1029:       "PasswordField.selectionForeground", new ColorUIResource(Color.white),
1030:       "PopupMenu.background", new ColorUIResource(light),
1031:       "PopupMenu.border", new BorderUIResource.BevelBorderUIResource(0),
1032:       "PopupMenu.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1033:       "PopupMenu.foreground", new ColorUIResource(darkShadow),
1034:       "PopupMenu.selectedWindowInputMapBindings",
1035:       new Object[] {"ESCAPE", "cancel",
1036:                     "DOWN", "selectNext",
1037:                     "KP_DOWN", "selectNext",
1038:                     "UP", "selectPrevious",
1039:                     "KP_UP", "selectPrevious",
1040:                     "LEFT", "selectParent",
1041:                     "KP_LEFT", "selectParent",
1042:                     "RIGHT", "selectChild",
1043:                     "KP_RIGHT", "selectChild",
1044:                     "ENTER", "return",
1045:                     "SPACE", "return"
1046:       },
1047:       "PopupMenu.selectedWindowInputMapBindings.RightToLeft",
1048:       new Object[] {"LEFT", "selectChild",
1049:                     "KP_LEFT", "selectChild",
1050:                     "RIGHT", "selectParent",
1051:                     "KP_RIGHT", "selectParent",
1052:       },
1053:       "ProgressBar.background", new ColorUIResource(Color.LIGHT_GRAY),
1054:       "ProgressBar.border",
1055:       new BorderUIResource.LineBorderUIResource(Color.GREEN, 2),
1056:       "ProgressBar.cellLength", new Integer(1),
1057:       "ProgressBar.cellSpacing", new Integer(0),
1058:       "ProgressBar.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1059:       "ProgressBar.foreground", new ColorUIResource(0, 0, 128),
1060:       "ProgressBar.selectionBackground", new ColorUIResource(0, 0, 128),
1061:       "ProgressBar.selectionForeground", new ColorUIResource(Color.LIGHT_GRAY),
1062:       "ProgressBar.repaintInterval", new Integer(50),
1063:       "ProgressBar.cycleTime", new Integer(3000),
1064:       "RadioButton.background", new ColorUIResource(light),
1065:       "RadioButton.border", BasicBorders.getRadioButtonBorder(),
1066:       "RadioButton.darkShadow", new ColorUIResource(shadow),
1067:       "RadioButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
1068:         KeyStroke.getKeyStroke("SPACE"),  "pressed",
1069:         KeyStroke.getKeyStroke("released SPACE"), "released"
1070:       }),
1071:       "RadioButton.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1072:       "RadioButton.foreground", new ColorUIResource(darkShadow),
1073:       "RadioButton.highlight", new ColorUIResource(highLight),
1074:       "RadioButton.icon",
1075:       new UIDefaults.LazyValue()
1076:       {
1077:         public Object createValue(UIDefaults def)
1078:         {
1079:           return BasicIconFactory.getRadioButtonIcon();
1080:         }
1081:       },
1082:       "RadioButton.light", new ColorUIResource(highLight),
1083:       "RadioButton.margin", new InsetsUIResource(2, 2, 2, 2),
1084:       "RadioButton.shadow", new ColorUIResource(shadow),
1085:       "RadioButton.textIconGap", new Integer(4),
1086:       "RadioButton.textShiftOffset", new Integer(0),
1087:       "RadioButtonMenuItem.acceleratorFont",
1088:       new FontUIResource("Dialog", Font.PLAIN, 12),
1089:       "RadioButtonMenuItem.acceleratorForeground",
1090:       new ColorUIResource(darkShadow),
1091:       "RadioButtonMenuItem.acceleratorSelectionForeground",
1092:       new ColorUIResource(Color.white),
1093:       "RadioButtonMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(),
1094:       "RadioButtonMenuItem.background", new ColorUIResource(light),
1095:       "RadioButtonMenuItem.border", new BasicBorders.MarginBorder(),
1096:       "RadioButtonMenuItem.borderPainted", Boolean.FALSE,
1097:       "RadioButtonMenuItem.checkIcon", BasicIconFactory.getRadioButtonMenuItemIcon(),
1098:       "RadioButtonMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1099:       "RadioButtonMenuItem.foreground", new ColorUIResource(darkShadow),
1100:       "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2),
1101:       "RadioButtonMenuItem.selectionBackground",
1102:       new ColorUIResource(Color.black),
1103:       "RadioButtonMenuItem.selectionForeground",
1104:       new ColorUIResource(Color.white),
1105:       "RootPane.defaultButtonWindowKeyBindings", new Object[] {
1106:         "ENTER",  "press",
1107:         "released ENTER", "release",
1108:         "ctrl ENTER",  "press",
1109:         "ctrl released ENTER", "release"
1110:       },
1111:       "ScrollBar.background", new ColorUIResource(224, 224, 224),
1112:       "ScrollBar.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
1113:         "PAGE_UP", "negativeBlockIncrement",
1114:         "PAGE_DOWN", "positiveBlockIncrement",
1115:         "END",  "maxScroll",
1116:         "HOME",  "minScroll",
1117:         "LEFT",  "negativeUnitIncrement",
1118:         "KP_UP", "negativeUnitIncrement",
1119:         "KP_DOWN", "positiveUnitIncrement",
1120:         "UP",  "negativeUnitIncrement",
1121:         "RIGHT", "positiveUnitIncrement",
1122:         "KP_LEFT", "negativeUnitIncrement",
1123:         "DOWN",  "positiveUnitIncrement",
1124:         "KP_RIGHT", "positiveUnitIncrement"
1125:       }),
1126:       "ScrollBar.foreground", new ColorUIResource(light),
1127:       "ScrollBar.maximumThumbSize", new DimensionUIResource(4096, 4096),
1128:       "ScrollBar.minimumThumbSize", new DimensionUIResource(8, 8),
1129:       "ScrollBar.thumb", new ColorUIResource(light),
1130:       "ScrollBar.thumbDarkShadow", new ColorUIResource(shadow),
1131:       "ScrollBar.thumbHighlight", new ColorUIResource(highLight),
1132:       "ScrollBar.thumbShadow", new ColorUIResource(shadow),
1133:       "ScrollBar.track", new ColorUIResource(light),
1134:       "ScrollBar.trackHighlight", new ColorUIResource(shadow),
1135:       "ScrollBar.width", new Integer(16),
1136:       "ScrollPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
1137:         "PAGE_UP", "scrollUp",
1138:         "KP_LEFT", "unitScrollLeft",
1139:         "ctrl PAGE_DOWN", "scrollRight",
1140:         "PAGE_DOWN", "scrollDown",
1141:         "KP_RIGHT", "unitScrollRight",
1142:         "LEFT",  "unitScrollLeft",
1143:         "ctrl END", "scrollEnd",
1144:         "UP",  "unitScrollUp",
1145:         "RIGHT", "unitScrollRight",
1146:         "DOWN",  "unitScrollDown",
1147:         "ctrl HOME", "scrollHome",
1148:         "ctrl PAGE_UP", "scrollLeft",
1149:         "KP_UP", "unitScrollUp",
1150:         "KP_DOWN", "unitScrollDown"
1151:       }),
1152:       "ScrollPane.background", new ColorUIResource(light),
1153:       "ScrollPane.border", new BorderUIResource.EtchedBorderUIResource(),
1154:       "ScrollPane.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1155:       "ScrollPane.foreground", new ColorUIResource(darkShadow),
1156:       "Separator.background", new ColorUIResource(highLight),
1157:       "Separator.foreground", new ColorUIResource(shadow),
1158:       "Separator.highlight", new ColorUIResource(highLight),
1159:       "Separator.shadow", new ColorUIResource(shadow),
1160:       "Slider.background", new ColorUIResource(light),
1161:       "Slider.focus", new ColorUIResource(shadow),
1162:       "Slider.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
1163:             "ctrl PAGE_DOWN", "negativeBlockIncrement",
1164:             "PAGE_DOWN", "negativeBlockIncrement",
1165:             "PAGE_UP", "positiveBlockIncrement",
1166:             "ctrl PAGE_UP", "positiveBlockIncrement",
1167:             "KP_RIGHT", "positiveUnitIncrement",
1168:             "DOWN", "negativeUnitIncrement",
1169:             "KP_LEFT", "negativeUnitIncrement",
1170:             "RIGHT", "positiveUnitIncrement",
1171:             "KP_DOWN", "negativeUnitIncrement",
1172:             "UP", "positiveUnitIncrement",
1173:             "KP_UP", "positiveUnitIncrement",
1174:             "LEFT", "negativeUnitIncrement",
1175:             "HOME", "minScroll",
1176:             "END", "maxScroll"
1177:       }),
1178:       "Slider.focusInsets", new InsetsUIResource(2, 2, 2, 2),
1179:       "Slider.foreground", new ColorUIResource(light),
1180:       "Slider.highlight", new ColorUIResource(highLight),
1181:       "Slider.shadow", new ColorUIResource(shadow),
1182:       "Slider.thumbHeight", new Integer(20),
1183:       "Slider.thumbWidth", new Integer(11),
1184:       "Slider.tickHeight", new Integer(12),
1185:       "Slider.horizontalSize", new Dimension(200, 21),
1186:       "Slider.verticalSize", new Dimension(21, 200),
1187:       "Slider.minimumHorizontalSize", new Dimension(36, 21),
1188:       "Slider.minimumVerticalSize", new Dimension(21, 36),
1189:       "Spinner.background", new ColorUIResource(light),
1190:       "Spinner.foreground", new ColorUIResource(light),
1191:       "Spinner.arrowButtonSize", new DimensionUIResource(16, 5),
1192:       "Spinner.editorBorderPainted", Boolean.FALSE,
1193:       "Spinner.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12),
1194:       "SplitPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
1195:         "F6",  "toggleFocus",
1196:         "F8",  "startResize",
1197:         "END",  "selectMax",
1198:         "HOME",  "selectMin",
1199:         "LEFT",  "negativeIncrement",
1200:         "KP_UP", "negativeIncrement",
1201:         "KP_DOWN", "positiveIncrement",
1202:         "UP",  "negativeIncrement",
1203:         "RIGHT", "positiveIncrement",
1204:         "KP_LEFT", "negativeIncrement",
1205:         "DOWN",  "positiveIncrement",
1206:         "KP_RIGHT", "positiveIncrement",
1207:         "shift ctrl pressed TAB", "focusOutBackward",
1208:         "ctrl pressed TAB", "focusOutForward"
1209:       }),
1210:       "SplitPane.background", new ColorUIResource(light),
1211:       "SplitPane.border", new BasicBorders.SplitPaneBorder(null, null),
1212:       "SplitPane.darkShadow", new ColorUIResource(shadow),
1213:       "SplitPane.dividerSize", new Integer(7),
1214:       "SplitPane.highlight", new ColorUIResource(highLight),
1215:       "SplitPane.shadow", new ColorUIResource(shadow),
1216:       "SplitPaneDivider.border", BasicBorders.getSplitPaneDividerBorder(),
1217:       "SplitPaneDivider.draggingColor", new ColorUIResource(Color.DARK_GRAY),
1218:       "TabbedPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
1219:         "ctrl PAGE_DOWN", "navigatePageDown",
1220:         "ctrl PAGE_UP", "navigatePageUp",
1221:         "ctrl UP", "requestFocus",
1222:         "ctrl KP_UP", "requestFocus"
1223:       }),
1224:       "TabbedPane.background", new ColorUIResource(192, 192, 192),
1225:       "TabbedPane.contentBorderInsets", new InsetsUIResource(2, 2, 3, 3),
1226:       "TabbedPane.darkShadow", new ColorUIResource(Color.black),
1227:       "TabbedPane.focus", new ColorUIResource(Color.black),
1228:       "TabbedPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
1229:             KeyStroke.getKeyStroke("ctrl DOWN"), "requestFocusForVisibleComponent",
1230:             KeyStroke.getKeyStroke("KP_UP"), "navigateUp",
1231:             KeyStroke.getKeyStroke("LEFT"), "navigateLeft",
1232:             KeyStroke.getKeyStroke("ctrl KP_DOWN"), "requestFocusForVisibleComponent",
1233:             KeyStroke.getKeyStroke("UP"), "navigateUp",
1234:             KeyStroke.getKeyStroke("KP_DOWN"), "navigateDown",
1235:             KeyStroke.getKeyStroke("KP_LEFT"), "navigateLeft",
1236:             KeyStroke.getKeyStroke("RIGHT"), "navigateRight",
1237:             KeyStroke.getKeyStroke("KP_RIGHT"), "navigateRight",
1238:             KeyStroke.getKeyStroke("DOWN"), "navigateDown"
1239:       }),
1240:       "TabbedPane.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1241:       "TabbedPane.foreground", new ColorUIResource(Color.black),
1242:       "TabbedPane.highlight", new ColorUIResource(Color.white),
1243:       "TabbedPane.light", new ColorUIResource(192, 192, 192),
1244:       "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1),
1245:       "TabbedPane.shadow", new ColorUIResource(128, 128, 128),
1246:       "TabbedPane.tabsOpaque", Boolean.TRUE,
1247:       "TabbedPane.tabAreaInsets", new InsetsUIResource(3, 2, 0, 2),
1248:       "TabbedPane.tabInsets", new InsetsUIResource(0, 4, 1, 4),
1249:       "TabbedPane.tabRunOverlay", new Integer(2),
1250:       "TabbedPane.tabsOverlapBorder", Boolean.FALSE,
1251:       "TabbedPane.textIconGap", new Integer(4),
1252:       "Table.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
1253:         "ctrl DOWN", "selectNextRowChangeLead",
1254:         "ctrl RIGHT", "selectNextColumnChangeLead",
1255:         "ctrl UP", "selectPreviousRowChangeLead",
1256:         "ctrl LEFT", "selectPreviousColumnChangeLead",
1257:         "CUT", "cut",
1258:         "SPACE", "addToSelection",
1259:         "ctrl SPACE", "toggleAndAnchor",
1260:         "shift SPACE", "extendTo",
1261:         "shift ctrl SPACE", "moveSelectionTo",
1262:         "ctrl X", "cut",
1263:         "ctrl C", "copy",
1264:         "ctrl KP_RIGHT", "selectNextColumnChangeLead",
1265:         "ctrl KP_LEFT", "selectPreviousColumnChangeLead",
1266:         "ctrl V", "paste",
1267:         "ctrl KP_DOWN", "selectNextRowChangeLead",
1268:         "COPY", "copy",
1269:         "ctrl KP_UP", "selectPreviousRowChangeLead",
1270:         "PASTE", "paste",
1271:         "shift PAGE_DOWN", "scrollDownExtendSelection",
1272:         "PAGE_DOWN", "scrollDownChangeSelection",
1273:         "END",  "selectLastColumn",
1274:         "shift END", "selectLastColumnExtendSelection",
1275:         "HOME",  "selectFirstColumn",
1276:         "ctrl END", "selectLastRow",
1277:         "ctrl shift END", "selectLastRowExtendSelection",
1278:         "LEFT",  "selectPreviousColumn",
1279:         "shift HOME", "selectFirstColumnExtendSelection",
1280:         "UP",  "selectPreviousRow",
1281:         "RIGHT", "selectNextColumn",
1282:         "ctrl HOME", "selectFirstRow",
1283:         "shift LEFT", "selectPreviousColumnExtendSelection",
1284:         "DOWN",  "selectNextRow",
1285:         "ctrl shift HOME", "selectFirstRowExtendSelection",
1286:         "shift UP", "selectPreviousRowExtendSelection",
1287:         "F2",  "startEditing",
1288:         "shift RIGHT", "selectNextColumnExtendSelection",
1289:         "TAB",  "selectNextColumnCell",
1290:         "shift DOWN", "selectNextRowExtendSelection",
1291:         "ENTER", "selectNextRowCell",
1292:         "KP_UP", "selectPreviousRow",
1293:         "KP_DOWN", "selectNextRow",
1294:         "KP_LEFT", "selectPreviousColumn",
1295:         "KP_RIGHT", "selectNextColumn",
1296:         "shift TAB", "selectPreviousColumnCell",
1297:         "ctrl A", "selectAll",
1298:         "shift ENTER", "selectPreviousRowCell",
1299:         "shift KP_DOWN", "selectNextRowExtendSelection",
1300:         "shift KP_LEFT", "selectPreviousColumnExtendSelection",
1301:         "ESCAPE",  "cancel",
1302:         "ctrl shift PAGE_UP", "scrollLeftExtendSelection",
1303:         "shift KP_RIGHT", "selectNextColumnExtendSelection",
1304:         "ctrl PAGE_UP",  "scrollLeftChangeSelection",
1305:         "shift PAGE_UP", "scrollUpExtendSelection",
1306:         "ctrl shift PAGE_DOWN", "scrollRightExtendSelection",
1307:         "ctrl PAGE_DOWN", "scrollRightChangeSelection",
1308:         "PAGE_UP",   "scrollUpChangeSelection",
1309:         "ctrl shift LEFT", "selectPreviousColumnExtendSelection",
1310:         "shift KP_UP", "selectPreviousRowExtendSelection",
1311:         "ctrl shift UP", "selectPreviousRowExtendSelection",
1312:         "ctrl shift RIGHT", "selectNextColumnExtendSelection",
1313:         "ctrl shift KP_RIGHT", "selectNextColumnExtendSelection",
1314:         "ctrl shift DOWN", "selectNextRowExtendSelection",
1315:         "ctrl BACK_SLASH", "clearSelection",
1316:         "ctrl shift KP_UP", "selectPreviousRowExtendSelection",
1317:         "ctrl shift KP_LEFT", "selectPreviousColumnExtendSelection",
1318:         "ctrl SLASH", "selectAll",
1319:         "ctrl shift KP_DOWN", "selectNextRowExtendSelection",
1320:       }),
1321:       "Table.background", new ColorUIResource(new ColorUIResource(255, 255, 255)),
1322:       "Table.focusCellBackground", new ColorUIResource(new ColorUIResource(255, 255, 255)),
1323:       "Table.focusCellForeground", new ColorUIResource(new ColorUIResource(0, 0, 0)),
1324:       "Table.focusCellHighlightBorder",
1325:       new BorderUIResource.LineBorderUIResource(
1326:                                              new ColorUIResource(255, 255, 0)),
1327:       "Table.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1328:       "Table.foreground", new ColorUIResource(new ColorUIResource(0, 0, 0)),
1329:       "Table.gridColor", new ColorUIResource(new ColorUIResource(128, 128, 128)),
1330:       "Table.scrollPaneBorder", new BorderUIResource.BevelBorderUIResource(0),
1331:       "Table.selectionBackground", new ColorUIResource(new ColorUIResource(0, 0, 128)),
1332:       "Table.selectionForeground", new ColorUIResource(new ColorUIResource(255, 255, 255)),
1333:       "TableHeader.background", new ColorUIResource(new ColorUIResource(192, 192, 192)),
1334:       "TableHeader.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1335:       "TableHeader.foreground", new ColorUIResource(new ColorUIResource(0, 0, 0)),
1336: 
1337:       "TextArea.background", new ColorUIResource(light),
1338:       "TextArea.border", new BorderUIResource(BasicBorders.getMarginBorder()),
1339:       "TextArea.caretBlinkRate", new Integer(500),
1340:       "TextArea.caretForeground", new ColorUIResource(Color.black),
1341:       "TextArea.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12),
1342:       "TextArea.foreground", new ColorUIResource(Color.black),
1343:       "TextArea.inactiveForeground", new ColorUIResource(Color.gray),
1344:       "TextArea.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
1345:          KeyStroke.getKeyStroke("shift UP"), "selection-up",
1346:          KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word",
1347:          KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
1348:          KeyStroke.getKeyStroke("shift KP_UP"), "selection-up",
1349:          KeyStroke.getKeyStroke("DOWN"), "caret-down",
1350:          KeyStroke.getKeyStroke("shift ctrl T"), "previous-link-action",
1351:          KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word",
1352:          KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
1353:          KeyStroke.getKeyStroke("END"), "caret-end-line",
1354:          KeyStroke.getKeyStroke("shift PAGE_UP"), "selection-page-up",
1355:          KeyStroke.getKeyStroke("KP_UP"), "caret-up",
1356:          KeyStroke.getKeyStroke("DELETE"), "delete-next",
1357:          KeyStroke.getKeyStroke("ctrl HOME"), "caret-begin",
1358:          KeyStroke.getKeyStroke("shift LEFT"), "selection-backward",
1359:          KeyStroke.getKeyStroke("ctrl END"), "caret-end",
1360:          KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
1361:          KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word",
1362:          KeyStroke.getKeyStroke("LEFT"), "caret-backward",
1363:          KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
1364:          KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
1365:          KeyStroke.getKeyStroke("ctrl SPACE"), "activate-link-action",
1366:          KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
1367:          KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
1368:          KeyStroke.getKeyStroke("ENTER"), "insert-break",
1369:          KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
1370:          KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
1371:          KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "selection-page-left",
1372:          KeyStroke.getKeyStroke("shift DOWN"), "selection-down",
1373:          KeyStroke.getKeyStroke("PAGE_DOWN"), "page-down",
1374:          KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
1375:          KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
1376:          KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
1377:          KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "selection-page-right",
1378:          KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
1379:          KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word",
1380:          KeyStroke.getKeyStroke("shift END"), "selection-end-line",
1381:          KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word",
1382:          KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
1383:          KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
1384:          KeyStroke.getKeyStroke("KP_DOWN"), "caret-down",
1385:          KeyStroke.getKeyStroke("ctrl A"), "select-all",
1386:          KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
1387:          KeyStroke.getKeyStroke("shift ctrl END"), "selection-end",
1388:          KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
1389:          KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word",
1390:          KeyStroke.getKeyStroke("ctrl T"), "next-link-action",
1391:          KeyStroke.getKeyStroke("shift KP_DOWN"), "selection-down",
1392:          KeyStroke.getKeyStroke("TAB"), "insert-tab",
1393:          KeyStroke.getKeyStroke("UP"), "caret-up",
1394:          KeyStroke.getKeyStroke("shift ctrl HOME"), "selection-begin",
1395:          KeyStroke.getKeyStroke("shift PAGE_DOWN"), "selection-page-down",
1396:          KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
1397:          KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word",
1398:          KeyStroke.getKeyStroke("PAGE_UP"), "page-up",
1399:          KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard"
1400:       }),
1401:       "TextArea.margin", new InsetsUIResource(0, 0, 0, 0),
1402:       "TextArea.selectionBackground", new ColorUIResource(Color.black),
1403:       "TextArea.selectionForeground", new ColorUIResource(Color.white),
1404:       "TextField.background", new ColorUIResource(light),
1405:       "TextField.border", new BasicBorders.FieldBorder(null, null, null, null),
1406:       "TextField.caretBlinkRate", new Integer(500),
1407:       "TextField.caretForeground", new ColorUIResource(Color.black),
1408:       "TextField.darkShadow", new ColorUIResource(shadow),
1409:       "TextField.font", new FontUIResource("SansSerif", Font.PLAIN, 12),
1410:       "TextField.foreground", new ColorUIResource(Color.black),
1411:       "TextField.highlight", new ColorUIResource(highLight),
1412:       "TextField.inactiveBackground", new ColorUIResource(Color.LIGHT_GRAY),
1413:       "TextField.inactiveForeground", new ColorUIResource(Color.GRAY),
1414:       "TextField.light", new ColorUIResource(highLight),
1415:       "TextField.highlight", new ColorUIResource(light),
1416:       "TextField.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
1417:          KeyStroke.getKeyStroke("ENTER"), "notify-field-accept",
1418:          KeyStroke.getKeyStroke("LEFT"), "caret-backward",
1419:          KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
1420:          KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
1421:          KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
1422:          KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
1423:          KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
1424:          KeyStroke.getKeyStroke("shift LEFT"), "selection-backward",
1425:          KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
1426:          KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
1427:          KeyStroke.getKeyStroke("END"), "caret-end-line",
1428:          KeyStroke.getKeyStroke("DELETE"), "delete-next",
1429:          KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
1430:          KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
1431:          KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
1432:          KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
1433:          KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
1434:          KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word",
1435:          KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
1436:          KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
1437:          KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
1438:          KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word",
1439:          KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word",
1440:          KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard",
1441:          KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word",
1442:          KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
1443:          KeyStroke.getKeyStroke("ctrl A"), "select-all",
1444:          KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
1445:          KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
1446:          KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word",
1447:          KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word",
1448:          KeyStroke.getKeyStroke("shift END"), "selection-end-line",
1449:          KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word"
1450:       }),
1451:       "TextField.margin", new InsetsUIResource(0, 0, 0, 0),
1452:       "TextField.selectionBackground", new ColorUIResource(Color.black),
1453:       "TextField.selectionForeground", new ColorUIResource(Color.white),
1454:       "TextPane.background", new ColorUIResource(Color.white),
1455:       "TextPane.border", BasicBorders.getMarginBorder(),
1456:       "TextPane.caretBlinkRate", new Integer(500),
1457:       "TextPane.caretForeground", new ColorUIResource(Color.black),
1458:       "TextPane.font", new FontUIResource("Serif", Font.PLAIN, 12),
1459:       "TextPane.foreground", new ColorUIResource(Color.black),
1460:       "TextPane.inactiveForeground", new ColorUIResource(Color.gray),
1461:       "TextPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
1462:           KeyStroke.getKeyStroke("shift UP"), "selection-up",
1463:           KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word",
1464:           KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
1465:           KeyStroke.getKeyStroke("shift KP_UP"), "selection-up",
1466:           KeyStroke.getKeyStroke("DOWN"), "caret-down",
1467:           KeyStroke.getKeyStroke("shift ctrl T"), "previous-link-action",
1468:           KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word",
1469:           KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
1470:           KeyStroke.getKeyStroke("END"), "caret-end-line",
1471:           KeyStroke.getKeyStroke("shift PAGE_UP"), "selection-page-up",
1472:           KeyStroke.getKeyStroke("KP_UP"), "caret-up",
1473:           KeyStroke.getKeyStroke("DELETE"), "delete-next",
1474:           KeyStroke.getKeyStroke("ctrl HOME"), "caret-begin",
1475:           KeyStroke.getKeyStroke("shift LEFT"), "selection-backward",
1476:           KeyStroke.getKeyStroke("ctrl END"), "caret-end",
1477:           KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
1478:           KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word",
1479:           KeyStroke.getKeyStroke("LEFT"), "caret-backward",
1480:           KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
1481:           KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
1482:           KeyStroke.getKeyStroke("ctrl SPACE"), "activate-link-action",
1483:           KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
1484:           KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
1485:           KeyStroke.getKeyStroke("ENTER"), "insert-break",
1486:           KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
1487:           KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
1488:           KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "selection-page-left",
1489:           KeyStroke.getKeyStroke("shift DOWN"), "selection-down",
1490:           KeyStroke.getKeyStroke("PAGE_DOWN"), "page-down",
1491:           KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
1492:           KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
1493:           KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
1494:           KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "selection-page-right",
1495:           KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
1496:           KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word",
1497:           KeyStroke.getKeyStroke("shift END"), "selection-end-line",
1498:           KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word",
1499:           KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
1500:           KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
1501:           KeyStroke.getKeyStroke("KP_DOWN"), "caret-down",
1502:           KeyStroke.getKeyStroke("ctrl A"), "select-all",
1503:           KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
1504:           KeyStroke.getKeyStroke("shift ctrl END"), "selection-end",
1505:           KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
1506:           KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word",
1507:           KeyStroke.getKeyStroke("ctrl T"), "next-link-action",
1508:           KeyStroke.getKeyStroke("shift KP_DOWN"), "selection-down",
1509:           KeyStroke.getKeyStroke("TAB"), "insert-tab",
1510:           KeyStroke.getKeyStroke("UP"), "caret-up",
1511:           KeyStroke.getKeyStroke("shift ctrl HOME"), "selection-begin",
1512:           KeyStroke.getKeyStroke("shift PAGE_DOWN"), "selection-page-down",
1513:           KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
1514:           KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word",
1515:           KeyStroke.getKeyStroke("PAGE_UP"), "page-up",
1516:           KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard"
1517:       }),
1518:       "TextPane.margin", new InsetsUIResource(3, 3, 3, 3),
1519:       "TextPane.selectionBackground", new ColorUIResource(Color.black),
1520:       "TextPane.selectionForeground", new ColorUIResource(Color.white),
1521:       "TitledBorder.border", new BorderUIResource.EtchedBorderUIResource(),
1522:       "TitledBorder.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1523:       "TitledBorder.titleColor", new ColorUIResource(darkShadow),
1524:       "ToggleButton.background", new ColorUIResource(light),
1525:       "ToggleButton.border",
1526:       new BorderUIResource.CompoundBorderUIResource(null, null),
1527:       "ToggleButton.darkShadow", new ColorUIResource(shadow),
1528:       "ToggleButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
1529:           KeyStroke.getKeyStroke("SPACE"),  "pressed",
1530:           KeyStroke.getKeyStroke("released SPACE"), "released"
1531:       }),
1532:       "ToggleButton.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1533:       "ToggleButton.foreground", new ColorUIResource(darkShadow),
1534:       "ToggleButton.highlight", new ColorUIResource(highLight),
1535:       "ToggleButton.light", new ColorUIResource(light),
1536:       "ToggleButton.margin", new InsetsUIResource(2, 14, 2, 14),
1537:       "ToggleButton.shadow", new ColorUIResource(shadow),
1538:       "ToggleButton.textIconGap", new Integer(4),
1539:       "ToggleButton.textShiftOffset", new Integer(0),
1540:       "ToolBar.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
1541:         "UP",  "navigateUp",
1542:         "KP_UP", "navigateUp",
1543:         "DOWN",  "navigateDown",
1544:         "KP_DOWN", "navigateDown",
1545:         "LEFT",  "navigateLeft",
1546:         "KP_LEFT", "navigateLeft",
1547:         "RIGHT", "navigateRight",
1548:         "KP_RIGHT", "navigateRight"
1549:       }),
1550:       "ToolBar.background", new ColorUIResource(light),
1551:       "ToolBar.border", new BorderUIResource.EtchedBorderUIResource(),
1552:       "ToolBar.darkShadow", new ColorUIResource(shadow),
1553:       "ToolBar.dockingBackground", new ColorUIResource(light),
1554:       "ToolBar.dockingForeground", new ColorUIResource(Color.red),
1555:       "ToolBar.floatingBackground", new ColorUIResource(light),
1556:       "ToolBar.floatingForeground", new ColorUIResource(Color.darkGray),
1557:       "ToolBar.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1558:       "ToolBar.foreground", new ColorUIResource(darkShadow),
1559:       "ToolBar.highlight", new ColorUIResource(highLight),
1560:       "ToolBar.light", new ColorUIResource(highLight),
1561:       "ToolBar.separatorSize", new DimensionUIResource(10, 10),
1562:       "ToolBar.shadow", new ColorUIResource(shadow),
1563:       "ToolTip.background", new ColorUIResource(light),
1564:       "ToolTip.border", new BorderUIResource.LineBorderUIResource(Color.lightGray),
1565:       "ToolTip.font", new FontUIResource("SansSerif", Font.PLAIN, 12),
1566:       "ToolTip.foreground", new ColorUIResource(darkShadow),
1567:       "Tree.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
1568:         "ESCAPE", "cancel"
1569:       }),
1570:       "Tree.background", new ColorUIResource(new Color(255, 255, 255)),
1571:       "Tree.changeSelectionWithFocus", Boolean.TRUE,
1572:       "Tree.drawsFocusBorderAroundIcon", Boolean.FALSE,
1573:       "Tree.editorBorder", new BorderUIResource.LineBorderUIResource(Color.lightGray),
1574:       "Tree.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
1575:               KeyStroke.getKeyStroke("ctrl DOWN"), "selectNextChangeLead",
1576:               KeyStroke.getKeyStroke("shift UP"), "selectPreviousExtendSelection",
1577:               KeyStroke.getKeyStroke("ctrl RIGHT"), "scrollRight",
1578:               KeyStroke.getKeyStroke("shift KP_UP"), "selectPreviousExtendSelection",
1579:               KeyStroke.getKeyStroke("DOWN"), "selectNext",
1580:               KeyStroke.getKeyStroke("ctrl UP"), "selectPreviousChangeLead",
1581:               KeyStroke.getKeyStroke("ctrl LEFT"), "scrollLeft",
1582:               KeyStroke.getKeyStroke("CUT"), "cut",
1583:               KeyStroke.getKeyStroke("END"), "selectLast",
1584:               KeyStroke.getKeyStroke("shift PAGE_UP"), "scrollUpExtendSelection",
1585:               KeyStroke.getKeyStroke("KP_UP"), "selectPrevious",
1586:               KeyStroke.getKeyStroke("shift ctrl UP"), "selectPreviousExtendSelection",
1587:               KeyStroke.getKeyStroke("ctrl HOME"), "selectFirstChangeLead",
1588:               KeyStroke.getKeyStroke("ctrl END"), "selectLastChangeLead",
1589:               KeyStroke.getKeyStroke("ctrl PAGE_DOWN"), "scrollDownChangeLead",
1590:               KeyStroke.getKeyStroke("LEFT"), "selectParent",
1591:               KeyStroke.getKeyStroke("ctrl PAGE_UP"), "scrollUpChangeLead",
1592:               KeyStroke.getKeyStroke("KP_LEFT"), "selectParent",
1593:               KeyStroke.getKeyStroke("SPACE"), "addToSelection",
1594:               KeyStroke.getKeyStroke("ctrl SPACE"), "toggleAndAnchor",
1595:               KeyStroke.getKeyStroke("shift SPACE"), "extendTo",
1596:               KeyStroke.getKeyStroke("shift ctrl SPACE"), "moveSelectionTo",
1597:               KeyStroke.getKeyStroke("ADD"), "expand",
1598:               KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "clearSelection",
1599:               KeyStroke.getKeyStroke("shift ctrl DOWN"), "selectNextExtendSelection",
1600:               KeyStroke.getKeyStroke("shift HOME"), "selectFirstExtendSelection",
1601:               KeyStroke.getKeyStroke("RIGHT"), "selectChild",
1602:               KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "scrollUpExtendSelection",
1603:               KeyStroke.getKeyStroke("shift DOWN"), "selectNextExtendSelection",
1604:               KeyStroke.getKeyStroke("PAGE_DOWN"), "scrollDownChangeSelection",
1605:               KeyStroke.getKeyStroke("shift ctrl KP_UP"), "selectPreviousExtendSelection",
1606:               KeyStroke.getKeyStroke("SUBTRACT"), "collapse",
1607:               KeyStroke.getKeyStroke("ctrl X"), "cut",
1608:               KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "scrollDownExtendSelection",
1609:               KeyStroke.getKeyStroke("ctrl SLASH"), "selectAll",
1610:               KeyStroke.getKeyStroke("ctrl C"), "copy",
1611:               KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "scrollRight",
1612:               KeyStroke.getKeyStroke("shift END"), "selectLastExtendSelection",
1613:               KeyStroke.getKeyStroke("shift ctrl KP_DOWN"), "selectNextExtendSelection",
1614:               KeyStroke.getKeyStroke("ctrl KP_LEFT"), "scrollLeft",
1615:               KeyStroke.getKeyStroke("HOME"), "selectFirst",
1616:               KeyStroke.getKeyStroke("ctrl V"), "paste",
1617:               KeyStroke.getKeyStroke("KP_DOWN"), "selectNext",
1618:               KeyStroke.getKeyStroke("ctrl A"), "selectAll",
1619:               KeyStroke.getKeyStroke("ctrl KP_DOWN"), "selectNextChangeLead",
1620:               KeyStroke.getKeyStroke("shift ctrl END"), "selectLastExtendSelection",
1621:               KeyStroke.getKeyStroke("COPY"), "copy",
1622:               KeyStroke.getKeyStroke("ctrl KP_UP"), "selectPreviousChangeLead",
1623:               KeyStroke.getKeyStroke("shift KP_DOWN"), "selectNextExtendSelection",
1624:               KeyStroke.getKeyStroke("UP"), "selectPrevious",
1625:               KeyStroke.getKeyStroke("shift ctrl HOME"), "selectFirstExtendSelection",
1626:               KeyStroke.getKeyStroke("shift PAGE_DOWN"), "scrollDownExtendSelection",
1627:               KeyStroke.getKeyStroke("KP_RIGHT"), "selectChild",
1628:               KeyStroke.getKeyStroke("F2"), "startEditing",
1629:               KeyStroke.getKeyStroke("PAGE_UP"), "scrollUpChangeSelection",
1630:               KeyStroke.getKeyStroke("PASTE"), "paste"
1631:       }),
1632:       "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1633:       "Tree.foreground", new ColorUIResource(Color.black),
1634:       "Tree.hash", new ColorUIResource(new Color(184, 207, 228)),
1635:       "Tree.leftChildIndent", new Integer(7),
1636:       "Tree.rightChildIndent", new Integer(13),
1637:       "Tree.rowHeight", new Integer(16),
1638:       "Tree.scrollsOnExpand", Boolean.TRUE,
1639:       "Tree.selectionBackground", new ColorUIResource(Color.black),
1640:       "Tree.nonSelectionBackground", new ColorUIResource(new Color(255, 255, 255)),
1641:       "Tree.selectionBorderColor", new ColorUIResource(Color.black),
1642:       "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(Color.black),
1643:       "Tree.selectionForeground", new ColorUIResource(new Color(255, 255, 255)),
1644:       "Viewport.background", new ColorUIResource(light),
1645:       "Viewport.foreground", new ColorUIResource(Color.black),
1646:       "Viewport.font", new FontUIResource("Dialog", Font.PLAIN, 12)
1647:     };
1648:     defaults.putDefaults(uiDefaults);
1649:   }
1650: 
1651:   /**
1652:    * Returns the <code>ActionMap</code> that stores all the actions that are
1653:    * responsibly for rendering auditory cues.
1654:    *
1655:    * @return the action map that stores all the actions that are
1656:    *         responsibly for rendering auditory cues
1657:    *
1658:    * @see #createAudioAction
1659:    * @see #playSound
1660:    *
1661:    * @since 1.4
1662:    */
1663:   protected ActionMap getAudioActionMap()
1664:   {
1665:     if (audioActionMap != null)
1666:       audioActionMap = new ActionMap();
1667:     return audioActionMap;
1668:   }
1669: 
1670:   /**
1671:    * Creates an <code>Action</code> that can play an auditory cue specified by
1672:    * the key. The UIDefaults value for the key is normally a String that points
1673:    * to an audio file relative to the current package.
1674:    *
1675:    * @param key a UIDefaults key that specifies the sound
1676:    *
1677:    * @return an action that can play the sound
1678:    *
1679:    * @see #playSound
1680:    *
1681:    * @since 1.4
1682:    */
1683:   protected Action createAudioAction(Object key)
1684:   {
1685:     return new AudioAction(key);
1686:   }
1687: 
1688:   /**
1689:    * Plays the sound of the action if it is listed in
1690:    * <code>AuditoryCues.playList</code>.
1691:    *
1692:    * @param audioAction the audio action to play
1693:    *
1694:    * @since 1.4
1695:    */
1696:   protected void playSound(Action audioAction)
1697:   {
1698:     if (audioAction instanceof AudioAction)
1699:       {
1700:         Object[] playList = (Object[]) UIManager.get("AuditoryCues.playList");
1701:         for (int i = 0; i < playList.length; ++i)
1702:           {
1703:             if (playList[i].equals(((AudioAction) audioAction).key))
1704:               {
1705:                 ActionEvent ev = new ActionEvent(this,
1706:                                                  ActionEvent.ACTION_PERFORMED,
1707:                                                  (String) playList[i]);
1708:                 audioAction.actionPerformed(ev);
1709:                 break;
1710:               }
1711:           }
1712:       }
1713:   }
1714: 
1715:   /**
1716:    * Initializes the Look and Feel.
1717:    */
1718:   public void initialize()
1719:   {
1720:     Toolkit toolkit = Toolkit.getDefaultToolkit();
1721:     popupHelper = new PopupHelper();
1722:     toolkit.addAWTEventListener(popupHelper, AWTEvent.MOUSE_EVENT_MASK);
1723:   }
1724: 
1725:   /**
1726:    * Uninitializes the Look and Feel.
1727:    */
1728:   public void uninitialize()
1729:   {
1730:     Toolkit toolkit = Toolkit.getDefaultToolkit();
1731:     toolkit.removeAWTEventListener(popupHelper);
1732:     popupHelper = null;
1733:   }
1734: }