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