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