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