Source for javax.swing.plaf.basic.BasicLookAndFeel

   1: /* BasicLookAndFeel.java --
   2:    Copyright (C) 2002, 2004, 2005 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.Color;
  42: import java.awt.Dimension;
  43: import java.awt.Font;
  44: import java.awt.event.InputEvent;
  45: import java.awt.event.KeyEvent;
  46: import java.io.Serializable;
  47: import java.util.Enumeration;
  48: import java.util.ResourceBundle;
  49: 
  50: import javax.swing.BorderFactory;
  51: import javax.swing.KeyStroke;
  52: import javax.swing.LookAndFeel;
  53: import javax.swing.UIDefaults;
  54: import javax.swing.border.BevelBorder;
  55: import javax.swing.border.Border;
  56: import javax.swing.plaf.BorderUIResource;
  57: import javax.swing.plaf.ColorUIResource;
  58: import javax.swing.plaf.DimensionUIResource;
  59: import javax.swing.plaf.FontUIResource;
  60: import javax.swing.plaf.IconUIResource;
  61: import javax.swing.plaf.InsetsUIResource;
  62: import javax.swing.text.JTextComponent;
  63: 
  64: /**
  65:  * BasicLookAndFeel
  66:  * @author Andrew Selkirk
  67:  */
  68: public abstract class BasicLookAndFeel extends LookAndFeel
  69:   implements Serializable
  70: {
  71:   static final long serialVersionUID = -6096995660290287879L;
  72: 
  73:   /**
  74:    * Creates a new instance of the Basic look and feel.
  75:    */
  76:   public BasicLookAndFeel()
  77:   {
  78:     // TODO
  79:   }
  80: 
  81:   /**
  82:    * Creates and returns a new instance of the default resources for this look 
  83:    * and feel.
  84:    * 
  85:    * @return The UI defaults.
  86:    */
  87:   public UIDefaults getDefaults()
  88:   {
  89:     // Variables
  90:     UIDefaults def = new UIDefaults();
  91:     // Initialize Class Defaults
  92:     initClassDefaults(def);
  93:     // Initialize System Colour Defaults
  94:     initSystemColorDefaults(def);
  95:     // Initialize Component Defaults
  96:     initComponentDefaults(def);
  97:     // Return UI Defaults
  98:     return def;
  99:   }
 100: 
 101:   /**
 102:    * Populates the <code>defaults</code> table with mappings between class IDs 
 103:    * and fully qualified class names for the UI delegates.
 104:    * 
 105:    * @param defaults  the defaults table (<code>null</code> not permitted).
 106:    */
 107:   protected void initClassDefaults(UIDefaults defaults)
 108:   {
 109:     // Variables
 110:     Object[] uiDefaults;
 111:     // Initialize Class Defaults
 112:     uiDefaults = new Object[] {
 113:       "ButtonUI", "javax.swing.plaf.basic.BasicButtonUI",
 114:       "CheckBoxMenuItemUI", "javax.swing.plaf.basic.BasicCheckBoxMenuItemUI",
 115:       "CheckBoxUI", "javax.swing.plaf.basic.BasicCheckBoxUI",
 116:       "ColorChooserUI", "javax.swing.plaf.basic.BasicColorChooserUI",
 117:       "ComboBoxUI", "javax.swing.plaf.basic.BasicComboBoxUI",
 118:       "DesktopIconUI", "javax.swing.plaf.basic.BasicDesktopIconUI",
 119:       "DesktopPaneUI", "javax.swing.plaf.basic.BasicDesktopPaneUI",
 120:       "EditorPaneUI", "javax.swing.plaf.basic.BasicEditorPaneUI",
 121:       "FileChooserUI", "javax.swing.plaf.basic.BasicFileChooserUI",
 122:       "FormattedTextFieldUI", "javax.swing.plaf.basic.BasicFormattedTextFieldUI",
 123:       "InternalFrameUI", "javax.swing.plaf.basic.BasicInternalFrameUI",
 124:       "LabelUI", "javax.swing.plaf.basic.BasicLabelUI",
 125:       "ListUI", "javax.swing.plaf.basic.BasicListUI",
 126:       "MenuBarUI", "javax.swing.plaf.basic.BasicMenuBarUI",
 127:       "MenuItemUI", "javax.swing.plaf.basic.BasicMenuItemUI",
 128:       "MenuUI", "javax.swing.plaf.basic.BasicMenuUI",
 129:       "OptionPaneUI", "javax.swing.plaf.basic.BasicOptionPaneUI",
 130:       "PanelUI", "javax.swing.plaf.basic.BasicPanelUI",
 131:       "PasswordFieldUI", "javax.swing.plaf.basic.BasicPasswordFieldUI",
 132:       "PopupMenuSeparatorUI", "javax.swing.plaf.basic.BasicPopupMenuSeparatorUI",
 133:       "PopupMenuUI", "javax.swing.plaf.basic.BasicPopupMenuUI",
 134:       "ProgressBarUI", "javax.swing.plaf.basic.BasicProgressBarUI",
 135:       "RadioButtonMenuItemUI", "javax.swing.plaf.basic.BasicRadioButtonMenuItemUI",
 136:       "RadioButtonUI", "javax.swing.plaf.basic.BasicRadioButtonUI",
 137:       "RootPaneUI", "javax.swing.plaf.basic.BasicRootPaneUI",
 138:       "ScrollBarUI", "javax.swing.plaf.basic.BasicScrollBarUI",
 139:       "ScrollPaneUI", "javax.swing.plaf.basic.BasicScrollPaneUI",
 140:       "SeparatorUI", "javax.swing.plaf.basic.BasicSeparatorUI",
 141:       "SliderUI", "javax.swing.plaf.basic.BasicSliderUI",
 142:       "SplitPaneUI", "javax.swing.plaf.basic.BasicSplitPaneUI",
 143:       "SpinnerUI", "javax.swing.plaf.basic.BasicSpinnerUI",
 144:       "StandardDialogUI", "javax.swing.plaf.basic.BasicStandardDialogUI",
 145:       "TabbedPaneUI", "javax.swing.plaf.basic.BasicTabbedPaneUI",
 146:       "TableHeaderUI", "javax.swing.plaf.basic.BasicTableHeaderUI",
 147:       "TableUI", "javax.swing.plaf.basic.BasicTableUI",
 148:       "TextPaneUI", "javax.swing.plaf.basic.BasicTextPaneUI",
 149:       "TextAreaUI", "javax.swing.plaf.basic.BasicTextAreaUI",
 150:       "TextFieldUI", "javax.swing.plaf.basic.BasicTextFieldUI",
 151:       "TextPaneUI", "javax.swing.plaf.basic.BasicTextPaneUI",
 152:       "ToggleButtonUI", "javax.swing.plaf.basic.BasicToggleButtonUI",
 153:       "ToolBarSeparatorUI", "javax.swing.plaf.basic.BasicToolBarSeparatorUI",
 154:       "ToolBarUI", "javax.swing.plaf.basic.BasicToolBarUI",
 155:       "ToolTipUI", "javax.swing.plaf.basic.BasicToolTipUI",
 156:       "TreeUI", "javax.swing.plaf.basic.BasicTreeUI",
 157:       "ViewportUI", "javax.swing.plaf.basic.BasicViewportUI"
 158:     };
 159:     // Add Class Defaults to UI Defaults table
 160:     defaults.putDefaults(uiDefaults);
 161:   }
 162: 
 163:   /**
 164:    * Populates the <code>defaults</code> table with system color defaults.
 165:    * 
 166:    * @param defaults  the defaults table (<code>null</code> not permitted).
 167:    */
 168:   protected void initSystemColorDefaults(UIDefaults defaults)
 169:   {
 170:     Color highLight = new Color(249, 247, 246);
 171:     Color light = new Color(239, 235, 231);
 172:     Color shadow = new Color(139, 136, 134);
 173:     Color darkShadow = new Color(16, 16, 16);
 174: 
 175:     Object[] uiDefaults;
 176:     uiDefaults = new Object[] {
 177:       "activeCaption", new ColorUIResource(0, 0, 128),
 178:       "activeCaptionBorder", new ColorUIResource(Color.lightGray),
 179:       "activeCaptionText", new ColorUIResource(Color.white),
 180:       "control", new ColorUIResource(light),
 181:       "controlDkShadow", new ColorUIResource(shadow),
 182:       "controlHighlight", new ColorUIResource(highLight),
 183:       "controlLtHighlight", new ColorUIResource(highLight),
 184:       "controlShadow", new ColorUIResource(shadow),
 185:       "controlText", new ColorUIResource(darkShadow),
 186:       "desktop", new ColorUIResource(0, 92, 92),
 187:       "inactiveCaption", new ColorUIResource(Color.gray),
 188:       "inactiveCaptionBorder", new ColorUIResource(Color.lightGray),
 189:       "inactiveCaptionText", new ColorUIResource(Color.lightGray),
 190:       "info", new ColorUIResource(light),
 191:       "infoText", new ColorUIResource(darkShadow),
 192:       "menu", new ColorUIResource(light),
 193:       "menuText", new ColorUIResource(darkShadow),
 194:       "scrollbar", new ColorUIResource(light),
 195:       "text", new ColorUIResource(Color.white),
 196:       "textHighlight", new ColorUIResource(Color.black),
 197:       "textHighlightText", new ColorUIResource(Color.white),
 198:       "textInactiveText", new ColorUIResource(Color.gray),
 199:       "textText", new ColorUIResource(Color.black),
 200:       "window", new ColorUIResource(light),
 201:       "windowBorder", new ColorUIResource(Color.black),
 202:       "windowText", new ColorUIResource(darkShadow)
 203:     };
 204:     defaults.putDefaults(uiDefaults);
 205:   }
 206: 
 207:   /**
 208:    * Loads the system colors.  This method is not implemented yet.
 209:    * 
 210:    * @param defaults  the defaults table (<code>null</code> not permitted).
 211:    * @param systemColors TODO
 212:    * @param useNative TODO
 213:    */
 214:   protected void loadSystemColors(UIDefaults defaults, String[] systemColors,
 215:                                   boolean useNative)
 216:   {
 217:     // TODO
 218:   }
 219: 
 220:   /**
 221:    * loadResourceBundle
 222:    * @param defaults TODO
 223:    */
 224:   private void loadResourceBundle(UIDefaults defaults)
 225:   {
 226:     ResourceBundle bundle;
 227:     Enumeration e;
 228:     String key;
 229:     String value;
 230:     bundle = ResourceBundle.getBundle("resources/basic");
 231:     // Process Resources
 232:     e = bundle.getKeys();
 233:     while (e.hasMoreElements())
 234:       {
 235:         key = (String) e.nextElement();
 236:         value = bundle.getString(key);
 237:         defaults.put(key, value);
 238:       }
 239:   }
 240: 
 241:   /**
 242:    * initComponentDefaults
 243:    * @param defaults  the defaults table (<code>null</code> not permitted).
 244:    */
 245:   protected void initComponentDefaults(UIDefaults defaults)
 246:   {
 247:     Object[] uiDefaults;
 248:     
 249:     Color highLight = new Color(249, 247, 246);
 250:     Color light = new Color(239, 235, 231);
 251:     Color shadow = new Color(139, 136, 134);
 252:     Color darkShadow = new Color(16, 16, 16);
 253:     
 254:     uiDefaults = new Object[] {
 255: 
 256:       "AbstractUndoableEdit.undoText", "Undo",
 257:       "AbstractUndoableEdit.redoText", "Redo",
 258:       "Button.background", new ColorUIResource(Color.LIGHT_GRAY),
 259:       "Button.border",
 260:       new UIDefaults.LazyValue() 
 261:       {
 262:         public Object createValue(UIDefaults table)
 263:         {
 264:           return BasicBorders.getButtonBorder();
 265:         }
 266:       },
 267:       "Button.darkShadow", new ColorUIResource(Color.BLACK),
 268:       "Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
 269:         "SPACE",  "pressed",
 270:         "released SPACE", "released"
 271:       }),
 272:       "Button.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 273:       "Button.foreground", new ColorUIResource(Color.BLACK),
 274:       "Button.highlight", new ColorUIResource(Color.WHITE),
 275:       "Button.light", new ColorUIResource(Color.LIGHT_GRAY),
 276:       "Button.margin", new InsetsUIResource(2, 2, 2, 2),
 277:       "Button.shadow", new ColorUIResource(Color.GRAY),
 278:       "Button.textIconGap", new Integer(4),
 279:       "Button.textShiftOffset", new Integer(0),
 280:       "CheckBox.background", new ColorUIResource(new Color(204, 204, 204)),
 281:       "CheckBox.border", new BorderUIResource.CompoundBorderUIResource(null,
 282:                                                                        null),
 283:       "CheckBox.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
 284:         "SPACE",  "pressed",
 285:         "released SPACE", "released"
 286:       }),
 287:       "CheckBox.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 288:       "CheckBox.foreground", new ColorUIResource(darkShadow),
 289:       "CheckBox.icon",
 290:       new UIDefaults.LazyValue()
 291:       {
 292:         public Object createValue(UIDefaults def)
 293:         {
 294:           return BasicIconFactory.getCheckBoxIcon();
 295:         }
 296:       },
 297:       "CheckBox.checkIcon", 
 298:       new UIDefaults.LazyValue()
 299:       {
 300:         public Object createValue(UIDefaults def)
 301:         {
 302:           return BasicIconFactory.getMenuItemCheckIcon();
 303:         }
 304:       },
 305:       "CheckBox.margin",new InsetsUIResource(2, 2, 2, 2),
 306:       "CheckBox.textIconGap", new Integer(4),
 307:       "CheckBox.textShiftOffset", new Integer(0),
 308:       "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog",
 309:                                                              Font.PLAIN, 12),
 310:       "CheckBoxMenuItem.acceleratorForeground",
 311:       new ColorUIResource(new Color(16, 16, 16)),
 312:       "CheckBoxMenuItem.acceleratorSelectionForeground",
 313:       new ColorUIResource(Color.white),
 314:       "CheckBoxMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(),
 315:       "CheckBoxMenuItem.background", new ColorUIResource(light),
 316:       "CheckBoxMenuItem.border", new BasicBorders.MarginBorder(),
 317:       "CheckBoxMenuItem.borderPainted", Boolean.FALSE,
 318:       "CheckBoxMenuItem.checkIcon", 
 319:       new UIDefaults.LazyValue()
 320:       {
 321:         public Object createValue(UIDefaults def)
 322:         {
 323:           return BasicIconFactory.getCheckBoxMenuItemIcon();
 324:         }
 325:       },
 326:       "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 327:       "CheckBoxMenuItem.foreground", new ColorUIResource(darkShadow),
 328:       "CheckBoxMenuItem.margin", new InsetsUIResource(2, 2, 2, 2),
 329:       "CheckBoxMenuItem.selectionBackground", new ColorUIResource(Color.black),
 330:       "CheckBoxMenuItem.selectionForeground", new ColorUIResource(Color.white),
 331:       "ColorChooser.background", new ColorUIResource(light),
 332:       "ColorChooser.cancelText", "Cancel",
 333:       "ColorChooser.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 334:       "ColorChooser.foreground", new ColorUIResource(darkShadow),
 335:       "ColorChooser.hsbBlueText", "B",
 336:       "ColorChooser.hsbBrightnessText", "B",
 337:       "ColorChooser.hsbGreenText", "G",
 338:       "ColorChooser.hsbHueText", "H",
 339:       "ColorChooser.hsbNameText", "HSB",
 340:       "ColorChooser.hsbRedText", "R",
 341:       "ColorChooser.hsbSaturationText", "S",
 342:       "ColorChooser.okText", "OK",
 343:       "ColorChooser.previewText", "Preview",
 344:       "ColorChooser.resetText", "Reset",
 345:       "ColorChooser.rgbBlueMnemonic", new Integer(66),
 346:       "ColorChooser.rgbBlueText", "Blue",
 347:       "ColorChooser.rgbGreenMnemonic", new Integer(71),
 348:       "ColorChooser.rgbGreenText", "Green",
 349:       "ColorChooser.rgbNameText", "RGB",
 350:       "ColorChooser.rgbRedMnemonic", new Integer(82),
 351:       "ColorChooser.rgbRedText", "Red",
 352:       "ColorChooser.sampleText", "Sample Text  Sample Text",
 353:       "ColorChooser.swatchesDefaultRecentColor", new ColorUIResource(light),
 354:       "ColorChooser.swatchesNameText", "Swatches",
 355:       "ColorChooser.swatchesRecentSwatchSize", new Dimension(10, 10),
 356:       "ColorChooser.swatchesRecentText", "Recent:",
 357:       "ColorChooser.swatchesSwatchSize", new Dimension(10, 10),
 358:       "ComboBox.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
 359:         "ESCAPE", "hidePopup",
 360:         "PAGE_UP", "pageUpPassThrough",
 361:         "PAGE_DOWN", "pageDownPassThrough",
 362:         "HOME",  "homePassThrough",
 363:         "END",  "endPassThrough"
 364:       }),
 365:       "ComboBox.background", new ColorUIResource(light),
 366:       "ComboBox.buttonBackground", new ColorUIResource(light),
 367:       "ComboBox.buttonDarkShadow", new ColorUIResource(shadow),
 368:       "ComboBox.buttonHighlight", new ColorUIResource(highLight),
 369:       "ComboBox.buttonShadow", new ColorUIResource(shadow),
 370:       "ComboBox.disabledBackground", new ColorUIResource(light),
 371:       "ComboBox.disabledForeground", new ColorUIResource(Color.gray),
 372:       "ComboBox.font", new FontUIResource("SansSerif", Font.PLAIN, 12),
 373:       "ComboBox.foreground", new ColorUIResource(Color.black),
 374:       "ComboBox.selectionBackground", new ColorUIResource(Color.black),
 375:       "ComboBox.selectionForeground", new ColorUIResource(Color.white),
 376:       "Desktop.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
 377:         "KP_LEFT", "left",
 378:         "KP_RIGHT", "right",
 379:         "ctrl F5", "restore",
 380:         "LEFT",  "left",
 381:         "ctrl alt F6", "selectNextFrame",
 382:         "UP",  "up",
 383:         "ctrl F6", "selectNextFrame",
 384:         "RIGHT", "right",
 385:         "DOWN",  "down",
 386:         "ctrl F7", "move",
 387:         "ctrl F8", "resize",
 388:         "ESCAPE", "escape",
 389:         "ctrl TAB", "selectNextFrame",
 390:         "ctrl F9", "minimize",
 391:         "KP_UP", "up",
 392:         "ctrl F4", "close",
 393:         "KP_DOWN", "down",
 394:         "ctrl F10", "maximize",
 395:         "ctrl alt shift F6","selectPreviousFrame"
 396:       }),
 397:       "DesktopIcon.border", new BorderUIResource.CompoundBorderUIResource(null,
 398:                                                                           null),
 399:       "EditorPane.background", new ColorUIResource(Color.white),
 400:       "EditorPane.border", new BasicBorders.MarginBorder(),
 401:       "EditorPane.caretBlinkRate", new Integer(500),
 402:       "EditorPane.caretForeground", new ColorUIResource(Color.black),
 403:       "EditorPane.font", new FontUIResource("Serif", Font.PLAIN, 12),
 404:       "EditorPane.foreground", new ColorUIResource(Color.black),
 405:       "EditorPane.inactiveForeground", new ColorUIResource(Color.gray),
 406:       "EditorPane.keyBindings", new JTextComponent.KeyBinding[] {
 407:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP,
 408:                                                              0), "caret-up"),
 409:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN,
 410:                                                              0), "caret-down"),
 411:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP,
 412:                                                              0), "page-up"),
 413:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN,
 414:                                                              0), "page-down"),
 415:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,
 416:                                                              0), "insert-break"),
 417:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,
 418:                                                              0), "insert-tab")
 419:           },
 420:       "EditorPane.margin", new InsetsUIResource(3, 3, 3, 3),
 421:       "EditorPane.selectionBackground", new ColorUIResource(Color.black),
 422:       "EditorPane.selectionForeground", new ColorUIResource(Color.white),
 423:       "FileChooser.acceptAllFileFilterText", "All Files (*.*)",
 424:       "FileChooser.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
 425:         "ESCAPE", "cancelSelection"
 426:       }),
 427:       "FileChooser.cancelButtonMnemonic", new Integer(67),
 428:       "FileChooser.cancelButtonText", "Cancel",
 429:       "FileChooser.cancelButtonToolTipText", "Abort file chooser dialog",
 430:       // XXX Don't use gif
 431: //      "FileChooser.detailsViewIcon", new IconUIResource(new ImageIcon("icons/DetailsView.gif")),
 432:       "FileChooser.directoryDescriptionText", "Directory",
 433:       "FileChooser.fileDescriptionText", "Generic File",
 434:       "FileChooser.helpButtonMnemonic", new Integer(72),
 435:       "FileChooser.helpButtonText", "Help",
 436:       "FileChooser.helpButtonToolTipText", "FileChooser help",
 437:       // XXX Don't use gif
 438: //      "FileChooser.homeFolderIcon", new IconUIResource(new ImageIcon("icons/HomeFolder.gif")),
 439:       // XXX Don't use gif
 440: //      "FileChooser.listViewIcon", new IconUIResource(new ImageIcon("icons/ListView.gif")),
 441:       "FileChooser.newFolderErrorSeparator", ":",
 442:       "FileChooser.newFolderErrorText", "Error creating new folder",
 443:       // XXX Don't use gif
 444: //      "FileChooser.newFolderIcon", new IconUIResource(new ImageIcon("icons/NewFolder.gif")),
 445:       "FileChooser.openButtonMnemonic", new Integer(79),
 446:       "FileChooser.openButtonText", "Open",
 447:       "FileChooser.openButtonToolTipText", "Open selected file",
 448:       "FileChooser.saveButtonMnemonic", new Integer(83),
 449:       "FileChooser.saveButtonText", "Save",
 450:       "FileChooser.saveButtonToolTipText", "Save selected file",
 451:       // XXX Don't use gif
 452: //      "FileChooser.upFolderIcon", new IconUIResource(new ImageIcon("icons/UpFolder.gif")),
 453:       "FileChooser.updateButtonMnemonic", new Integer(85),
 454:       "FileChooser.updateButtonText", "Update",
 455:       "FileChooser.updateButtonToolTipText", "Update directory listing",
 456:       // XXX Don't use gif
 457: //      "FileView.computerIcon", new IconUIResource(new ImageIcon("icons/Computer.gif")),
 458:       // XXX Don't use gif
 459: //      "FileView.directoryIcon", new IconUIResource(new ImageIcon("icons/Directory.gif")),
 460:       // XXX Don't use gif
 461: //      "FileView.fileIcon", new IconUIResource(new ImageIcon("icons/File.gif")),
 462:       // XXX Don't use gif
 463: //      "FileView.floppyDriveIcon", new IconUIResource(new ImageIcon("icons/Floppy.gif")),
 464:       // XXX Don't use gif
 465: //      "FileView.hardDriveIcon", new IconUIResource(new ImageIcon("icons/HardDrive.gif")),
 466:       "FocusManagerClassName", "TODO",
 467:       "FormattedTextField.background", new ColorUIResource(light),
 468:       "FormattedTextField.caretForeground", new ColorUIResource(Color.black),
 469:       "FormattedTextField.foreground", new ColorUIResource(Color.black),
 470:       "FormattedTextField.inactiveBackground", new ColorUIResource(light),
 471:       "FormattedTextField.inactiveForeground", new ColorUIResource(Color.gray),
 472:       "FormattedTextField.selectionBackground",
 473:       new ColorUIResource(Color.black),
 474:       "FormattedTextField.selectionForeground",
 475:       new ColorUIResource(Color.white),
 476:       "FormView.resetButtonText", "Reset",
 477:       "FormView.submitButtonText", "Submit Query",
 478:       "InternalFrame.activeTitleBackground", new ColorUIResource(0, 0, 128),
 479:       "InternalFrame.activeTitleForeground", new ColorUIResource(Color.white),
 480:       "InternalFrame.border",
 481:       new UIDefaults.LazyValue()
 482:       {
 483:     public Object createValue(UIDefaults table)
 484:     {
 485:       Color lineColor = new Color(238, 238, 238);
 486:       Border inner = BorderFactory.createLineBorder(lineColor, 1);
 487:       Color shadowInner = new Color(184, 207, 229);
 488:       Color shadowOuter = new Color(122, 138, 153);
 489:       Border outer = BorderFactory.createBevelBorder(BevelBorder.RAISED,
 490:                              Color.WHITE,
 491:                              Color.WHITE,
 492:                              shadowOuter,
 493:                              shadowInner);
 494:       Border border = new BorderUIResource.CompoundBorderUIResource(outer,
 495:                                     inner);
 496:       return border;
 497:     }
 498:       },
 499:       "InternalFrame.borderColor", new ColorUIResource(light),
 500:       "InternalFrame.borderDarkShadow", new ColorUIResource(Color.BLACK),
 501:       "InternalFrame.borderHighlight", new ColorUIResource(Color.WHITE),
 502:       "InternalFrame.borderLight", new ColorUIResource(Color.LIGHT_GRAY),
 503:       "InternalFrame.borderShadow", new ColorUIResource(Color.GRAY),
 504:       "InternalFrame.closeIcon", BasicIconFactory.createEmptyFrameIcon(),
 505:       // FIXME: Set a nice icon for InternalFrames here.
 506:       "InternalFrame.icon",
 507:       new UIDefaults.LazyValue()
 508:       {
 509:         public Object createValue(UIDefaults def)
 510:         {
 511:           return new IconUIResource(BasicIconFactory.createEmptyFrameIcon());
 512:         }
 513:       },
 514:       "InternalFrame.iconifyIcon", BasicIconFactory.createEmptyFrameIcon(),
 515:       "InternalFrame.inactiveTitleBackground", new ColorUIResource(Color.gray),
 516:       "InternalFrame.inactiveTitleForeground",
 517:       new ColorUIResource(Color.lightGray),
 518:       "InternalFrame.maximizeIcon", BasicIconFactory.createEmptyFrameIcon(),
 519:       "InternalFrame.minimizeIcon", BasicIconFactory.createEmptyFrameIcon(),
 520:       "InternalFrame.titleFont", new FontUIResource("Dialog", Font.BOLD, 12),
 521:       "InternalFrame.windowBindings", new Object[] {
 522:         "shift ESCAPE", "showSystemMenu",
 523:         "ctrl SPACE",  "showSystemMenu",
 524:         "ESCAPE",  "showSystemMenu"
 525:       },
 526:       "Label.background", new ColorUIResource(light),
 527:       "Label.disabledForeground", new ColorUIResource(Color.white),
 528:       "Label.disabledShadow", new ColorUIResource(shadow),
 529:       "Label.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 530:       "Label.foreground", new ColorUIResource(darkShadow),
 531:       "List.background", new ColorUIResource(light),
 532:       "List.border", new BasicBorders.MarginBorder(),
 533:       "List.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
 534:         "PAGE_UP", "scrollUp",
 535:         "ctrl \\", "clearSelection",
 536:         "PAGE_DOWN", "scrollDown",
 537:         "shift PAGE_DOWN","scrollDownExtendSelection",
 538:         "END",  "selectLastRow",
 539:         "HOME",  "selectFirstRow",
 540:         "shift END", "selectLastRowExtendSelection",
 541:         "shift HOME", "selectFirstRowExtendSelection",
 542:         "UP",  "selectPreviousRow",
 543:         "ctrl /", "selectAll",
 544:         "ctrl A", "selectAll",
 545:         "DOWN",  "selectNextRow",
 546:         "shift UP", "selectPreviousRowExtendSelection",
 547:         "ctrl SPACE", "selectNextRowExtendSelection",
 548:         "shift DOWN", "selectNextRowExtendSelection",
 549:         "KP_UP", "selectPreviousRow",
 550:         "shift PAGE_UP","scrollUpExtendSelection",
 551:         "KP_DOWN", "selectNextRow"
 552:       }),
 553:       "List.foreground", new ColorUIResource(darkShadow),
 554:       "List.selectionBackground", new ColorUIResource(Color.black),
 555:       "List.selectionForeground", new ColorUIResource(Color.white),
 556:       "List.focusCellHighlightBorder",
 557:       new BorderUIResource.
 558:       LineBorderUIResource(new ColorUIResource(Color.yellow)),
 559:       "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12),
 560:       "Menu.acceleratorForeground", new ColorUIResource(darkShadow),
 561:       "Menu.acceleratorSelectionForeground", new ColorUIResource(Color.white),
 562:       "Menu.arrowIcon", BasicIconFactory.getMenuArrowIcon(),
 563:       "Menu.background", new ColorUIResource(light),
 564:       "Menu.border", new BasicBorders.MarginBorder(),
 565:       "Menu.borderPainted", Boolean.FALSE,
 566:       "Menu.checkIcon", BasicIconFactory.getMenuItemCheckIcon(),
 567:       "Menu.consumesTabs", Boolean.TRUE,
 568:       "Menu.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 569:       "Menu.foreground", new ColorUIResource(darkShadow),
 570:       "Menu.margin", new InsetsUIResource(2, 2, 2, 2),
 571:       "Menu.selectedWindowInputMapBindings", new Object[] {
 572:         "ESCAPE", "cancel",
 573:         "DOWN",  "selectNext",
 574:         "KP_DOWN", "selectNext",
 575:         "UP",  "selectPrevious",
 576:         "KP_UP", "selectPrevious",
 577:         "LEFT",  "selectParent",
 578:         "KP_LEFT", "selectParent",
 579:         "RIGHT", "selectChild",
 580:         "KP_RIGHT", "selectChild",
 581:         "ENTER", "return",
 582:         "SPACE", "return"
 583:       },
 584:       "Menu.selectionBackground", new ColorUIResource(Color.black),
 585:       "Menu.selectionForeground", new ColorUIResource(Color.white),
 586:       "MenuBar.background", new ColorUIResource(light),
 587:       "MenuBar.border", new BasicBorders.MenuBarBorder(null, null),
 588:       "MenuBar.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 589:       "MenuBar.foreground", new ColorUIResource(darkShadow),
 590:       "MenuBar.highlight", new ColorUIResource(highLight),
 591:       "MenuBar.shadow", new ColorUIResource(shadow),
 592:       "MenuBar.windowBindings", new Object[] {
 593:         "F10", "takeFocus"
 594:       },
 595:       "MenuItem.acceleratorDelimiter", "-",
 596:       "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12),
 597:       "MenuItem.acceleratorForeground", new ColorUIResource(darkShadow),
 598:       "MenuItem.acceleratorSelectionForeground",
 599:       new ColorUIResource(Color.white),
 600:       "MenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(),
 601:       "MenuItem.background", new ColorUIResource(light),
 602:       "MenuItem.border", new BasicBorders.MarginBorder(),
 603:       "MenuItem.borderPainted", Boolean.FALSE,
 604:       "MenuItem.checkIcon", BasicIconFactory.getMenuItemCheckIcon(),
 605:       "MenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 606:       "MenuItem.foreground", new ColorUIResource(darkShadow),
 607:       "MenuItem.margin", new InsetsUIResource(2, 2, 2, 2),
 608:       "MenuItem.selectionBackground", new ColorUIResource(Color.black),
 609:       "MenuItem.selectionForeground", new ColorUIResource(Color.white),
 610:       "OptionPane.background", new ColorUIResource(light),
 611:       "OptionPane.border",
 612:       new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0),
 613:       "OptionPane.buttonAreaBorder",
 614:       new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0),
 615:       "OptionPane.cancelButtonText", "Cancel",
 616:       // XXX Don't use gif
 617: //      "OptionPane.errorIcon",
 618: //      new IconUIResource(new ImageIcon("icons/Error.gif")),
 619:       "OptionPane.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 620:       "OptionPane.foreground", new ColorUIResource(darkShadow),
 621:       // XXX Don't use gif
 622: //      "OptionPane.informationIcon",
 623: //      new IconUIResource(new ImageIcon("icons/Inform.gif")),
 624:       "OptionPane.messageAreaBorder",
 625:       new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0),
 626:       "OptionPane.messageForeground", new ColorUIResource(darkShadow),
 627:       "OptionPane.minimumSize", new DimensionUIResource(262, 90),
 628:       "OptionPane.noButtonText", "No",
 629:       "OptionPane.okButtonText", "OK",
 630:       // XXX Don't use gif
 631: //      "OptionPane.questionIcon",
 632: //      new IconUIResource(new ImageIcon("icons/Question.gif")),
 633:       // XXX Don't use gif
 634: //      "OptionPane.warningIcon",
 635: //      new IconUIResource(new ImageIcon("icons/Warn.gif")),
 636:       "OptionPane.windowBindings", new Object[] {
 637:         "ESCAPE",  "close"
 638:       },
 639:       "OptionPane.yesButtonText", "Yes",
 640:       "Panel.background", new ColorUIResource(light),
 641:       "Panel.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 642:       "Panel.foreground", new ColorUIResource(Color.black),
 643:       "PasswordField.background", new ColorUIResource(light),
 644:       "PasswordField.border", new BasicBorders.FieldBorder(null, null,
 645:                                                            null, null),
 646:       "PasswordField.caretBlinkRate", new Integer(500),
 647:       "PasswordField.caretForeground", new ColorUIResource(Color.black),
 648:       "PasswordField.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 649:       "PasswordField.foreground", new ColorUIResource(Color.black),
 650:       "PasswordField.inactiveBackground", new ColorUIResource(light),
 651:       "PasswordField.inactiveForeground", new ColorUIResource(Color.gray),
 652:       "PasswordField.keyBindings", new JTextComponent.KeyBinding[] {
 653:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,
 654:                                                              0),
 655:                                       "notify-field-accept")},
 656:       "PasswordField.margin", new InsetsUIResource(0, 0, 0, 0),
 657:       "PasswordField.selectionBackground", new ColorUIResource(Color.black),
 658:       "PasswordField.selectionForeground", new ColorUIResource(Color.white),
 659:       "PopupMenu.background", new ColorUIResource(light),
 660:       "PopupMenu.border", new BorderUIResource.BevelBorderUIResource(0),
 661:       "PopupMenu.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 662:       "PopupMenu.foreground", new ColorUIResource(darkShadow),
 663:       "ProgressBar.background", new ColorUIResource(light),
 664:       "ProgressBar.border", new BorderUIResource.LineBorderUIResource(Color.darkGray),
 665:       "ProgressBar.cellLength", new Integer(1),
 666:       "ProgressBar.cellSpacing", new Integer(0),
 667:       "ProgressBar.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 668:       "ProgressBar.foreground", new ColorUIResource(Color.black),
 669:       "ProgressBar.selectionBackground", new ColorUIResource(Color.black),
 670:       "ProgressBar.selectionForeground", new ColorUIResource(light),
 671:       "ProgressBar.repaintInterval", new Integer(250),
 672:       "ProgressBar.cycleTime", new Integer(6000),
 673:       "RadioButton.background", new ColorUIResource(light),
 674:       "RadioButton.border", new BorderUIResource.CompoundBorderUIResource(null,
 675:                                                                           null),
 676:       "RadioButton.darkShadow", new ColorUIResource(shadow),
 677:       "RadioButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
 678:         "SPACE",  "pressed",
 679:         "released SPACE", "released"
 680:       }),
 681:       "RadioButton.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 682:       "RadioButton.foreground", new ColorUIResource(darkShadow),
 683:       "RadioButton.highlight", new ColorUIResource(highLight),
 684:       "RadioButton.icon",
 685:       new UIDefaults.LazyValue()
 686:       {
 687:         public Object createValue(UIDefaults def)
 688:         {
 689:           return BasicIconFactory.getRadioButtonIcon();
 690:         }
 691:       },
 692:       "RadioButton.light", new ColorUIResource(highLight),
 693:       "RadioButton.margin", new InsetsUIResource(2, 2, 2, 2),
 694:       "RadioButton.shadow", new ColorUIResource(shadow),
 695:       "RadioButton.textIconGap", new Integer(4),
 696:       "RadioButton.textShiftOffset", new Integer(0),
 697:       "RadioButtonMenuItem.acceleratorFont",
 698:       new FontUIResource("Dialog", Font.PLAIN, 12),
 699:       "RadioButtonMenuItem.acceleratorForeground",
 700:       new ColorUIResource(darkShadow),
 701:       "RadioButtonMenuItem.acceleratorSelectionForeground",
 702:       new ColorUIResource(Color.white),
 703:       "RadioButtonMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(),
 704:       "RadioButtonMenuItem.background", new ColorUIResource(light),
 705:       "RadioButtonMenuItem.border", new BasicBorders.MarginBorder(),
 706:       "RadioButtonMenuItem.borderPainted", Boolean.FALSE,
 707:       "RadioButtonMenuItem.checkIcon", BasicIconFactory.getRadioButtonMenuItemIcon(),
 708:       "RadioButtonMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 709:       "RadioButtonMenuItem.foreground", new ColorUIResource(darkShadow),
 710:       "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2),
 711:       "RadioButtonMenuItem.selectionBackground",
 712:       new ColorUIResource(Color.black),
 713:       "RadioButtonMenuItem.selectionForeground",
 714:       new ColorUIResource(Color.white),
 715:       "RootPane.defaultButtonWindowKeyBindings", new Object[] {
 716:         "ENTER",  "press",
 717:         "released ENTER", "release",
 718:         "ctrl ENTER",  "press",
 719:         "ctrl released ENTER", "release"
 720:       },
 721:       "ScrollBar.background", new ColorUIResource(224, 224, 224),
 722:       "ScrollBar.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
 723:         "PAGE_UP", "negativeBlockIncrement",
 724:         "PAGE_DOWN", "positiveBlockIncrement",
 725:         "END",  "maxScroll",
 726:         "HOME",  "minScroll",
 727:         "LEFT",  "positiveUnitIncrement",
 728:         "KP_UP", "negativeUnitIncrement",
 729:         "KP_DOWN", "positiveUnitIncrement",
 730:         "UP",  "negativeUnitIncrement",
 731:         "RIGHT", "negativeUnitIncrement",
 732:         "KP_LEFT", "positiveUnitIncrement",
 733:         "DOWN",  "positiveUnitIncrement",
 734:         "KP_RIGHT", "negativeUnitIncrement"
 735:       }),
 736:       "ScrollBar.foreground", new ColorUIResource(light),
 737:       "ScrollBar.maximumThumbSize", new DimensionUIResource(4096, 4096),
 738:       "ScrollBar.minimumThumbSize", new DimensionUIResource(8, 8),
 739:       "ScrollBar.thumb", new ColorUIResource(light),
 740:       "ScrollBar.thumbDarkShadow", new ColorUIResource(shadow),
 741:       "ScrollBar.thumbHighlight", new ColorUIResource(highLight),
 742:       "ScrollBar.thumbShadow", new ColorUIResource(shadow),
 743:       "ScrollBar.track", new ColorUIResource(light),
 744:       "ScrollBar.trackHighlight", new ColorUIResource(shadow),
 745:       "ScrollPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
 746:         "PAGE_UP", "scrollUp",
 747:         "KP_LEFT", "unitScrollLeft",
 748:         "ctrl PAGE_DOWN","scrollRight",
 749:         "PAGE_DOWN", "scrollDown",
 750:         "KP_RIGHT", "unitScrollRight",
 751:         "LEFT",  "unitScrollLeft",
 752:         "ctrl END", "scrollEnd",
 753:         "UP",  "unitScrollUp",
 754:         "RIGHT", "unitScrollRight",
 755:         "DOWN",  "unitScrollDown",
 756:         "ctrl HOME", "scrollHome",
 757:         "ctrl PAGE_UP", "scrollLeft",
 758:         "KP_UP", "unitScrollUp",
 759:         "KP_DOWN", "unitScrollDown"
 760:       }),
 761:       "ScrollPane.background", new ColorUIResource(light),
 762:       "ScrollPane.border", new BorderUIResource.EtchedBorderUIResource(),
 763:       "ScrollPane.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 764:       "ScrollPane.foreground", new ColorUIResource(darkShadow),
 765:       "Separator.background", new ColorUIResource(highLight),
 766:       "Separator.foreground", new ColorUIResource(shadow),
 767:       "Separator.highlight", new ColorUIResource(highLight),
 768:       "Separator.shadow", new ColorUIResource(shadow),
 769:       "Slider.background", new ColorUIResource(light),
 770:       "Slider.focus", new ColorUIResource(shadow),
 771:       "Slider.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
 772:         "PAGE_UP", "positiveBlockIncrement",
 773:         "PAGE_DOWN", "negativeBlockIncrement",
 774:         "END",  "maxScroll",
 775:         "HOME",  "minScroll",
 776:         "LEFT",  "negativeUnitIncrement",
 777:         "KP_UP", "positiveUnitIncrement",
 778:         "KP_DOWN", "negativeUnitIncrement",
 779:         "UP",  "positiveUnitIncrement",
 780:         "RIGHT", "positiveUnitIncrement",
 781:         "KP_LEFT", "negativeUnitIncrement",
 782:         "DOWN",  "negativeUnitIncrement",
 783:         "KP_RIGHT", "positiveUnitIncrement"
 784:       }),
 785:       "Slider.focusInsets", new InsetsUIResource(2, 2, 2, 2),
 786:       "Slider.foreground", new ColorUIResource(light),
 787:       "Slider.highlight", new ColorUIResource(highLight),
 788:       "Slider.shadow", new ColorUIResource(shadow),
 789:       "Slider.thumbHeight", new Integer(20),
 790:       "Slider.thumbWidth", new Integer(11),
 791:       "Slider.tickHeight", new Integer(12),
 792:       "Spinner.background", new ColorUIResource(light),
 793:       "Spinner.foreground", new ColorUIResource(light),
 794:       "SplitPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
 795:         "F6",  "toggleFocus",
 796:         "F8",  "startResize",
 797:         "END",  "selectMax",
 798:         "HOME",  "selectMin",
 799:         "LEFT",  "negativeIncremnent",
 800:         "KP_UP", "negativeIncrement",
 801:         "KP_DOWN", "positiveIncrement",
 802:         "UP",  "negativeIncrement",
 803:         "RIGHT", "positiveIncrement",
 804:         "KP_LEFT", "negativeIncrement",
 805:         "DOWN",  "positiveIncrement",
 806:         "KP_RIGHT", "positiveIncrement"
 807:       }),
 808:       "SplitPane.background", new ColorUIResource(light),
 809:       "SplitPane.border", new BasicBorders.SplitPaneBorder(null, null),
 810:       "SplitPane.darkShadow", new ColorUIResource(shadow),
 811:       "SplitPane.dividerSize", new Integer(10),
 812:       "SplitPane.highlight", new ColorUIResource(highLight),
 813:       "SplitPane.shadow", new ColorUIResource(shadow),
 814:       "TabbedPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
 815:         "ctrl PAGE_DOWN","navigatePageDown",
 816:         "ctrl PAGE_UP", "navigatePageUp",
 817:         "ctrl UP", "requestFocus",
 818:         "ctrl KP_UP", "requestFocus"
 819:       }),
 820:       "TabbedPane.background", new ColorUIResource(light),
 821:       "TabbedPane.contentBorderInsets", new InsetsUIResource(2, 2, 3, 3),
 822:       "TabbedPane.darkShadow", new ColorUIResource(shadow),
 823:       "TabbedPane.focus", new ColorUIResource(darkShadow),
 824:       "TabbedPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
 825:         "LEFT",  "navigateLeft",
 826:         "KP_UP", "navigateUp",
 827:         "ctrl DOWN", "requestFocusForVisibleComponent",
 828:         "UP", "navigateUp",
 829:         "KP_DOWN", "navigateDown",
 830:         "RIGHT", "navigateRight",
 831:         "KP_LEFT", "navigateLeft",
 832:         "ctrl KP_DOWN", "requestFocusForVisibleComponent",
 833:         "KP_RIGHT", "navigateRight",
 834:         "DOWN",  "navigateDown"
 835:       }),
 836:       "TabbedPane.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 837:       "TabbedPane.foreground", new ColorUIResource(darkShadow),
 838:       "TabbedPane.highlight", new ColorUIResource(highLight),
 839:       "TabbedPane.light", new ColorUIResource(highLight),
 840:       "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1),
 841:       "TabbedPane.shadow", new ColorUIResource(shadow),
 842:       "TabbedPane.tabbedPaneTabAreaInsets", new InsetsUIResource(3, 2, 1, 2),
 843:       "TabbedPane.tabbedPaneTabInsets", new InsetsUIResource(1, 4, 1, 4),
 844:       "TabbedPane.tabbedPaneContentBorderInsets", new InsetsUIResource(3, 2, 1, 2),
 845:       "TabbedPane.tabbedPaneTabPadInsets", new InsetsUIResource(1, 1, 1, 1),
 846:       "TabbedPane.tabRunOverlay", new Integer(2),
 847:       "TabbedPane.textIconGap", new Integer(4),
 848:       "Table.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
 849:         "shift PAGE_DOWN","scrollDownExtendSelection",
 850:         "PAGE_DOWN", "scrollDownChangeSelection",
 851:         "END",  "selectLastColumn",
 852:         "shift END", "selectLastColumnExtendSelection",
 853:         "HOME",  "selectFirstColumn",
 854:         "ctrl END", "selectLastRow",
 855:         "ctrl shift END","selectLastRowExtendSelection",
 856:         "LEFT",  "selectPreviousColumn",
 857:         "shift HOME", "selectFirstColumnExtendSelection",
 858:         "UP",  "selectPreviousRow",
 859:         "RIGHT", "selectNextColumn",
 860:         "ctrl HOME", "selectFirstRow",
 861:         "shift LEFT", "selectPreviousColumnExtendSelection",
 862:         "DOWN",  "selectNextRow",
 863:         "ctrl shift HOME","selectFirstRowExtendSelection",
 864:         "shift UP", "selectPreviousRowExtendSelection",
 865:         "F2",  "startEditing",
 866:         "shift RIGHT", "selectNextColumnExtendSelection",
 867:         "TAB",  "selectNextColumnCell",
 868:         "shift DOWN", "selectNextRowExtendSelection",
 869:         "ENTER", "selectNextRowCell",
 870:         "KP_UP", "selectPreviousRow",
 871:         "KP_DOWN", "selectNextRow",
 872:         "KP_LEFT", "selectPreviousColumn",
 873:         "KP_RIGHT", "selectNextColumn",
 874:         "shift TAB", "selectPreviousColumnCell",
 875:         "ctrl A", "selectAll",
 876:         "shift ENTER", "selectPreviousRowCell",
 877:         "shift KP_DOWN", "selectNextRowExtendSelection",
 878:         "shift KP_LEFT", "selectPreviousColumnExtendSelection",
 879:         "ESCAPE",  "cancel",
 880:         "ctrl shift PAGE_UP", "scrollLeftExtendSelection",
 881:         "shift KP_RIGHT", "selectNextColumnExtendSelection",
 882:         "ctrl PAGE_UP",  "scrollLeftChangeSelection",
 883:         "shift PAGE_UP", "scrollUpExtendSelection",
 884:         "ctrl shift PAGE_DOWN", "scrollRightExtendSelection",
 885:         "ctrl PAGE_DOWN", "scrollRightChangeSelection",
 886:         "PAGE_UP",   "scrollUpChangeSelection",
 887:         "ctrl shift LEFT", "selectPreviousColumnExtendSelection",
 888:         "shift KP_UP", "selectPreviousRowExtendSelection",
 889:         "ctrl shift UP", "selectPreviousRowExtendSelection",
 890:         "ctrl shift RIGHT", "selectNextColumnExtendSelection",
 891:         "ctrl shift KP_RIGHT", "selectNextColumnExtendSelection",
 892:         "ctrl shift DOWN", "selectNextRowExtendSelection",
 893:         "ctrl BACK_SLASH", "clearSelection",
 894:         "ctrl shift KP_UP", "selectPreviousRowExtendSelection",
 895:         "ctrl shift KP_LEFT", "selectPreviousColumnExtendSelection",
 896:         "ctrl SLASH", "selectAll",
 897:         "ctrl shift KP_DOWN", "selectNextRowExtendSelection",
 898:       }),
 899:       "Table.background", new ColorUIResource(light),
 900:       "Table.focusCellBackground", new ColorUIResource(light),
 901:       "Table.focusCellForeground", new ColorUIResource(darkShadow),
 902:       "Table.focusCellHighlightBorder",
 903:       new BorderUIResource.LineBorderUIResource(
 904:                                              new ColorUIResource(255, 255, 0)),
 905:       "Table.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 906:       "Table.foreground", new ColorUIResource(darkShadow),
 907:       "Table.gridColor", new ColorUIResource(Color.gray),
 908:       "Table.scrollPaneBorder", new BorderUIResource.BevelBorderUIResource(0),
 909:       "Table.selectionBackground", new ColorUIResource(Color.black),
 910:       "Table.selectionForeground", new ColorUIResource(Color.white),
 911:       "TableHeader.background", new ColorUIResource(light),
 912:       "TableHeader.cellBorder", new BorderUIResource.BevelBorderUIResource(0),
 913:       "TableHeader.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 914:       "TableHeader.foreground", new ColorUIResource(darkShadow),
 915: 
 916:             "TextArea.background", new ColorUIResource(light),
 917:       "TextArea.border", new BasicBorders.MarginBorder(),
 918:       "TextArea.caretBlinkRate", new Integer(500),
 919:       "TextArea.caretForeground", new ColorUIResource(Color.black),
 920:       "TextArea.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12),
 921:       "TextArea.foreground", new ColorUIResource(Color.black),
 922:       "TextArea.inactiveForeground", new ColorUIResource(Color.gray),
 923:       "TextArea.keyBindings", new JTextComponent.KeyBinding[] {
 924:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP,
 925:                                                              0), "caret-up"),
 926:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN,
 927:                                                              0), "caret-down"),
 928:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP,
 929:                                                              0), "page-up"),
 930:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN,
 931:                                                              0), "page-down"),
 932:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,
 933:                                                              0), "insert-break"),
 934:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,
 935:                                                              0), "insert-tab")
 936:           },
 937:       "TextArea.margin", new InsetsUIResource(0, 0, 0, 0),
 938:       "TextArea.selectionBackground", new ColorUIResource(Color.black),
 939:       "TextArea.selectionForeground", new ColorUIResource(Color.white),
 940:       "TextField.background", new ColorUIResource(light),
 941:       "TextField.border", new BasicBorders.FieldBorder(null, null, null, null),
 942:       "TextField.caretBlinkRate", new Integer(500),
 943:       "TextField.caretForeground", new ColorUIResource(Color.black),
 944:       "TextField.darkShadow", new ColorUIResource(shadow),
 945:       "TextField.font", new FontUIResource("SansSerif", Font.PLAIN, 12),
 946:       "TextField.foreground", new ColorUIResource(Color.black),
 947:       "TextField.highlight", new ColorUIResource(highLight),
 948:       "TextField.inactiveBackground", new ColorUIResource(light),
 949:       "TextField.inactiveForeground", new ColorUIResource(Color.gray),
 950:       "TextField.light", new ColorUIResource(highLight),
 951:       "TextField.highlight", new ColorUIResource(light),
 952:       "TextField.keyBindings", new JTextComponent.KeyBinding[] {
 953:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,
 954:                                                              0),
 955:                                       "notify-field-accept"),
 956:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT,
 957:                                  InputEvent.SHIFT_DOWN_MASK),
 958:                                  "selection-backward"),
 959:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT,
 960:                                  InputEvent.SHIFT_DOWN_MASK),
 961:                                  "selection-forward"),
 962:           },
 963:       "TextField.margin", new InsetsUIResource(0, 0, 0, 0),
 964:       "TextField.selectionBackground", new ColorUIResource(Color.black),
 965:       "TextField.selectionForeground", new ColorUIResource(Color.white),
 966:       "TextPane.background", new ColorUIResource(Color.white),
 967:       "TextPane.border", new BasicBorders.MarginBorder(),
 968:       "TextPane.caretBlinkRate", new Integer(500),
 969:       "TextPane.caretForeground", new ColorUIResource(Color.black),
 970:       "TextPane.font", new FontUIResource("Serif", Font.PLAIN, 12),
 971:       "TextPane.foreground", new ColorUIResource(Color.black),
 972:       "TextPane.inactiveForeground", new ColorUIResource(Color.gray),
 973:       "TextPane.keyBindings", new JTextComponent.KeyBinding[] {
 974:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP,
 975:                                                              0), "caret-up"),
 976:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN,
 977:                                                              0), "caret-down"),
 978:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP,
 979:                                                              0), "page-up"),
 980:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN,
 981:                                                              0), "page-down"),
 982:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,
 983:                                                              0), "insert-break"),
 984:         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,
 985:                                                              0), "insert-tab")
 986:           },
 987:       "TextPane.margin", new InsetsUIResource(3, 3, 3, 3),
 988:       "TextPane.selectionBackground", new ColorUIResource(Color.black),
 989:       "TextPane.selectionForeground", new ColorUIResource(Color.white),
 990:       "TitledBorder.border", new BorderUIResource.EtchedBorderUIResource(),
 991:       "TitledBorder.font", new FontUIResource("Dialog", Font.PLAIN, 12),
 992:       "TitledBorder.titleColor", new ColorUIResource(darkShadow),
 993:       "ToggleButton.background", new ColorUIResource(light),
 994:       "ToggleButton.border",
 995:       new BorderUIResource.CompoundBorderUIResource(null, null),
 996:       "ToggleButton.darkShadow", new ColorUIResource(shadow),
 997:       "ToggleButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
 998:         "SPACE",  "pressed",
 999:         "released SPACE", "released"
1000:       }),
1001:       "ToggleButton.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1002:       "ToggleButton.foreground", new ColorUIResource(darkShadow),
1003:       "ToggleButton.highlight", new ColorUIResource(highLight),
1004:       "ToggleButton.light", new ColorUIResource(light),
1005:       "ToggleButton.margin", new InsetsUIResource(2, 14, 2, 14),
1006:       "ToggleButton.shadow", new ColorUIResource(shadow),
1007:       "ToggleButton.textIconGap", new Integer(4),
1008:       "ToggleButton.textShiftOffset", new Integer(0),
1009:       "ToolBar.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
1010:         "UP",  "navigateUp",
1011:         "KP_UP", "navigateUp",
1012:         "DOWN",  "navigateDown",
1013:         "KP_DOWN", "navigateDown",
1014:         "LEFT",  "navigateLeft",
1015:         "KP_LEFT", "navigateLeft",
1016:         "RIGHT", "navigateRight",
1017:         "KP_RIGHT", "navigateRight"
1018:       }),
1019:       "ToolBar.background", new ColorUIResource(light),
1020:       "ToolBar.border", new BorderUIResource.EtchedBorderUIResource(),
1021:       "ToolBar.darkShadow", new ColorUIResource(shadow),
1022:       "ToolBar.dockingBackground", new ColorUIResource(light),
1023:       "ToolBar.dockingForeground", new ColorUIResource(Color.red),
1024:       "ToolBar.floatingBackground", new ColorUIResource(light),
1025:       "ToolBar.floatingForeground", new ColorUIResource(Color.darkGray),
1026:       "ToolBar.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1027:       "ToolBar.foreground", new ColorUIResource(darkShadow),
1028:       "ToolBar.highlight", new ColorUIResource(highLight),
1029:       "ToolBar.light", new ColorUIResource(highLight),
1030:       "ToolBar.separatorSize", new DimensionUIResource(20, 20),
1031:       "ToolBar.shadow", new ColorUIResource(shadow),
1032:       "ToolTip.background", new ColorUIResource(light),
1033:       "ToolTip.border", new BorderUIResource.LineBorderUIResource(Color.lightGray),
1034:       "ToolTip.font", new FontUIResource("SansSerif", Font.PLAIN, 12),
1035:       "ToolTip.foreground", new ColorUIResource(darkShadow),
1036:       "Tree.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
1037:         "ESCAPE", "cancel"
1038:       }),
1039:       "Tree.background", new ColorUIResource(light),
1040:       "Tree.changeSelectionWithFocus", Boolean.TRUE,
1041: //      "Tree.closedIcon", new IconUIResource(new ImageIcon("icons/TreeClosed.png")),
1042: //      "Tree.collapsedIcon", new IconUIResource(new ImageIcon("icons/TreeCollapsed.png")),
1043:       "Tree.drawsFocusBorderAroundIcon", Boolean.FALSE,
1044:       "Tree.editorBorder", new BorderUIResource.LineBorderUIResource(Color.lightGray),
1045:       "Tree.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
1046:         "shift PAGE_DOWN", "scrollDownExtendSelection",
1047:         "PAGE_DOWN", "scrollDownChangeSelection",
1048:         "END",  "selectLast",
1049:         "ctrl KP_UP", "selectPreviousChangeLead",
1050:         "shift END", "selectLastExtendSelection",
1051:         "HOME",  "selectFirst",
1052:         "ctrl END", "selectLastChangeLead",
1053:         "ctrl SLASH", "selectAll",
1054:         "LEFT",  "selectParent",
1055:         "shift HOME", "selectFirstExtendSelection",
1056:         "UP",  "selectPrevious",
1057:         "ctrl KP_DOWN", "selectNextChangeLead",
1058:         "RIGHT", "selectChild",
1059:         "ctrl HOME", "selectFirstChangeLead",
1060:         "DOWN",  "selectNext",
1061:         "ctrl KP_LEFT", "scrollLeft",
1062:         "shift UP", "selectPreviousExtendSelection",
1063:         "F2",  "startEditing",
1064:         "ctrl LEFT", "scrollLeft",
1065:         "ctrl KP_RIGHT","scrollRight",
1066:         "ctrl UP", "selectPreviousChangeLead",
1067:         "shift DOWN", "selectNextExtendSelection",
1068:         "ENTER", "toggle",
1069:         "KP_UP", "selectPrevious",
1070:         "KP_DOWN", "selectNext",
1071:         "ctrl RIGHT", "scrollRight",
1072:         "KP_LEFT", "selectParent",
1073:         "KP_RIGHT", "selectChild",
1074:         "ctrl DOWN", "selectNextChangeLead",
1075:         "ctrl A", "selectAll",
1076:         "shift KP_UP", "selectPreviousExtendSelection",
1077:         "shift KP_DOWN","selectNextExtendSelection",
1078:         "ctrl SPACE", "toggleSelectionPreserveAnchor",
1079:         "ctrl shift PAGE_UP", "scrollUpExtendSelection",
1080:         "ctrl BACK_SLASH", "clearSelection",
1081:         "shift SPACE", "extendSelection",
1082:         "ctrl PAGE_UP", "scrollUpChangeLead",
1083:         "shift PAGE_UP","scrollUpExtendSelection",
1084:         "SPACE", "toggleSelectionPreserveAnchor",
1085:         "ctrl shift PAGE_DOWN", "scrollDownExtendSelection",
1086:         "PAGE_UP",  "scrollUpChangeSelection",
1087:         "ctrl PAGE_DOWN", "scrollDownChangeLead"
1088:       }),
1089:       "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)),
1090:       "Tree.foreground", new ColorUIResource(Color.black),
1091:       "Tree.hash", new ColorUIResource(new Color(128, 128, 128)),
1092:       "Tree.leftChildIndent", new Integer(7),
1093:       "Tree.rightChildIndent", new Integer(13),
1094:       "Tree.rowHeight", new Integer(20), // FIXME
1095:       "Tree.scrollsOnExpand", Boolean.TRUE,
1096:       "Tree.selectionBackground", new ColorUIResource(Color.black),
1097:       "Tree.nonSelectionBackground", new ColorUIResource(new Color(239, 235, 231)),
1098:       "Tree.selectionBorderColor", new ColorUIResource(Color.black),
1099:       "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(Color.black),
1100:       "Tree.selectionForeground", new ColorUIResource(new Color(255, 255, 255)),
1101:       "Tree.textBackground", new ColorUIResource(new Color(255, 255, 255)),
1102:       "Tree.textForeground", new ColorUIResource(Color.black),
1103:       "Viewport.background", new ColorUIResource(light),
1104:       "Viewport.foreground", new ColorUIResource(Color.black),
1105:       "Viewport.font", new FontUIResource("Dialog", Font.PLAIN, 12)
1106:     };
1107:     defaults.putDefaults(uiDefaults);
1108:   }
1109: } // class BasicLookAndFeel