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