1:
37:
38:
39: package ;
40:
41: import ;
42: import ;
43: import ;
44: import ;
45: import ;
46: import ;
47: import ;
48: import ;
49: import ;
50: import ;
51: import ;
52: import ;
53: import ;
54: import ;
55: import ;
56: import ;
57:
58: import ;
59: import ;
60: import ;
61: import ;
62: import ;
63: import ;
64: import ;
65: import ;
66: import ;
67: import ;
68: import ;
69: import ;
70: import ;
71: import ;
72: import ;
73: import ;
74: import ;
75: import ;
76: import ;
77: import ;
78: import ;
79: import ;
80:
81:
85: public abstract class BasicLookAndFeel extends LookAndFeel
86: implements Serializable
87: {
88:
89:
99: private class PopupHelper implements AWTEventListener
100: {
101:
102:
107: public void eventDispatched(AWTEvent event)
108: {
109: if (event instanceof MouseEvent)
110: {
111: MouseEvent mouseEvent = (MouseEvent) event;
112: if (mouseEvent.getID() == MouseEvent.MOUSE_PRESSED)
113: mousePressed(mouseEvent);
114: }
115: }
116:
117:
122: private void mousePressed(MouseEvent ev)
123: {
124:
125: MenuSelectionManager m = MenuSelectionManager.defaultManager();
126: Component target = ev.getComponent();
127: if (target instanceof Container)
128: target = ((Container) target).findComponentAt(ev.getPoint());
129: if (! m.isComponentPartOfCurrentMenu(target))
130: m.clearSelectedPath();
131: }
132:
133: }
134:
135:
140: private class AudioAction extends AbstractAction
141: {
142:
145: Object key;
146:
147:
153: AudioAction(Object key)
154: {
155: this.key = key;
156: }
157:
158:
163: public void actionPerformed(ActionEvent event)
164: {
165:
166: if (key instanceof String)
167: {
168: String name = UIManager.getString(key);
169: InputStream stream = getClass().getResourceAsStream(name);
170: try
171: {
172: Clip clip = AudioSystem.getClip();
173: AudioInputStream audioStream =
174: AudioSystem.getAudioInputStream(stream);
175: clip.open(audioStream);
176: }
177: catch (LineUnavailableException ex)
178: {
179:
180: }
181: catch (IOException ex)
182: {
183:
184: }
185: catch (UnsupportedAudioFileException e)
186: {
187:
188: }
189: }
190: }
191: }
192:
193: static final long serialVersionUID = -6096995660290287879L;
194:
195:
198: private transient PopupHelper popupHelper;
199:
200: private ActionMap audioActionMap;
201:
202:
205: public BasicLookAndFeel()
206: {
207:
208: }
209:
210:
216: public UIDefaults getDefaults()
217: {
218:
219: UIDefaults def = new UIDefaults();
220:
221: initClassDefaults(def);
222:
223: initSystemColorDefaults(def);
224:
225: initComponentDefaults(def);
226:
227: return def;
228: }
229:
230:
236: protected void initClassDefaults(UIDefaults defaults)
237: {
238:
239: Object[] uiDefaults;
240:
241: uiDefaults = new Object[] {
242: "ButtonUI", "javax.swing.plaf.basic.BasicButtonUI",
243: "CheckBoxMenuItemUI", "javax.swing.plaf.basic.BasicCheckBoxMenuItemUI",
244: "CheckBoxUI", "javax.swing.plaf.basic.BasicCheckBoxUI",
245: "ColorChooserUI", "javax.swing.plaf.basic.BasicColorChooserUI",
246: "ComboBoxUI", "javax.swing.plaf.basic.BasicComboBoxUI",
247: "DesktopIconUI", "javax.swing.plaf.basic.BasicDesktopIconUI",
248: "DesktopPaneUI", "javax.swing.plaf.basic.BasicDesktopPaneUI",
249: "EditorPaneUI", "javax.swing.plaf.basic.BasicEditorPaneUI",
250: "FileChooserUI", "javax.swing.plaf.basic.BasicFileChooserUI",
251: "FormattedTextFieldUI", "javax.swing.plaf.basic.BasicFormattedTextFieldUI",
252: "InternalFrameUI", "javax.swing.plaf.basic.BasicInternalFrameUI",
253: "LabelUI", "javax.swing.plaf.basic.BasicLabelUI",
254: "ListUI", "javax.swing.plaf.basic.BasicListUI",
255: "MenuBarUI", "javax.swing.plaf.basic.BasicMenuBarUI",
256: "MenuItemUI", "javax.swing.plaf.basic.BasicMenuItemUI",
257: "MenuUI", "javax.swing.plaf.basic.BasicMenuUI",
258: "OptionPaneUI", "javax.swing.plaf.basic.BasicOptionPaneUI",
259: "PanelUI", "javax.swing.plaf.basic.BasicPanelUI",
260: "PasswordFieldUI", "javax.swing.plaf.basic.BasicPasswordFieldUI",
261: "PopupMenuSeparatorUI", "javax.swing.plaf.basic.BasicPopupMenuSeparatorUI",
262: "PopupMenuUI", "javax.swing.plaf.basic.BasicPopupMenuUI",
263: "ProgressBarUI", "javax.swing.plaf.basic.BasicProgressBarUI",
264: "RadioButtonMenuItemUI", "javax.swing.plaf.basic.BasicRadioButtonMenuItemUI",
265: "RadioButtonUI", "javax.swing.plaf.basic.BasicRadioButtonUI",
266: "RootPaneUI", "javax.swing.plaf.basic.BasicRootPaneUI",
267: "ScrollBarUI", "javax.swing.plaf.basic.BasicScrollBarUI",
268: "ScrollPaneUI", "javax.swing.plaf.basic.BasicScrollPaneUI",
269: "SeparatorUI", "javax.swing.plaf.basic.BasicSeparatorUI",
270: "SliderUI", "javax.swing.plaf.basic.BasicSliderUI",
271: "SplitPaneUI", "javax.swing.plaf.basic.BasicSplitPaneUI",
272: "SpinnerUI", "javax.swing.plaf.basic.BasicSpinnerUI",
273: "StandardDialogUI", "javax.swing.plaf.basic.BasicStandardDialogUI",
274: "TabbedPaneUI", "javax.swing.plaf.basic.BasicTabbedPaneUI",
275: "TableHeaderUI", "javax.swing.plaf.basic.BasicTableHeaderUI",
276: "TableUI", "javax.swing.plaf.basic.BasicTableUI",
277: "TextPaneUI", "javax.swing.plaf.basic.BasicTextPaneUI",
278: "TextAreaUI", "javax.swing.plaf.basic.BasicTextAreaUI",
279: "TextFieldUI", "javax.swing.plaf.basic.BasicTextFieldUI",
280: "ToggleButtonUI", "javax.swing.plaf.basic.BasicToggleButtonUI",
281: "ToolBarSeparatorUI", "javax.swing.plaf.basic.BasicToolBarSeparatorUI",
282: "ToolBarUI", "javax.swing.plaf.basic.BasicToolBarUI",
283: "ToolTipUI", "javax.swing.plaf.basic.BasicToolTipUI",
284: "TreeUI", "javax.swing.plaf.basic.BasicTreeUI",
285: "ViewportUI", "javax.swing.plaf.basic.BasicViewportUI"
286: };
287:
288: defaults.putDefaults(uiDefaults);
289: }
290:
291:
301: protected void initSystemColorDefaults(UIDefaults defaults)
302: {
303: String[] defaultColors = new String[] {
304: "activeCaption", "#000080",
305: "activeCaptionBorder", "#C0C0C0",
306: "activeCaptionText", "#FFFFFF",
307: "control", "#C0C0C0",
308: "controlDkShadow", "#000000",
309: "controlHighlight", "#C0C0C0",
310: "controlLtHighlight", "#FFFFFF",
311: "controlShadow", "#808080",
312: "controlText", "#000000",
313: "desktop", "#005C5C",
314: "inactiveCaption", "#808080",
315: "inactiveCaptionBorder", "#C0C0C0",
316: "inactiveCaptionText", "#C0C0C0",
317: "info", "#FFFFE1",
318: "infoText", "#000000",
319: "menu", "#C0C0C0",
320: "menuText", "#000000",
321: "scrollbar", "#E0E0E0",
322: "text", "#C0C0C0",
323: "textHighlight", "#000080",
324: "textHighlightText", "#FFFFFF",
325: "textInactiveText", "#808080",
326: "textText", "#000000",
327: "window", "#FFFFFF",
328: "windowBorder", "#000000",
329: "windowText", "#000000"
330: };
331: loadSystemColors(defaults, defaultColors, isNativeLookAndFeel());
332: }
333:
334:
351: protected void loadSystemColors(UIDefaults defaults, String[] systemColors,
352: boolean useNative)
353: {
354: if (useNative)
355: {
356: defaults.put("activeCaption",
357: new ColorUIResource(SystemColor.ACTIVE_CAPTION));
358: defaults.put("activeCaptionBorder",
359: new ColorUIResource(SystemColor.ACTIVE_CAPTION_BORDER));
360: defaults.put("activeCaptionText",
361: new ColorUIResource(SystemColor.ACTIVE_CAPTION_TEXT));
362: defaults.put("control",
363: new ColorUIResource(SystemColor.CONTROL));
364: defaults.put("controlDkShadow",
365: new ColorUIResource(SystemColor.CONTROL_DK_SHADOW));
366: defaults.put("controlHighlight",
367: new ColorUIResource(SystemColor.CONTROL_HIGHLIGHT));
368: defaults.put("controlLtHighlight",
369: new ColorUIResource(SystemColor.CONTROL_LT_HIGHLIGHT));
370: defaults.put("controlShadow",
371: new ColorUIResource(SystemColor.CONTROL_SHADOW));
372: defaults.put("controlText",
373: new ColorUIResource(SystemColor.CONTROL_TEXT));
374: defaults.put("desktop",
375: new ColorUIResource(SystemColor.DESKTOP));
376: defaults.put("inactiveCaption",
377: new ColorUIResource(SystemColor.INACTIVE_CAPTION));
378: defaults.put("inactiveCaptionBorder",
379: new ColorUIResource(SystemColor.INACTIVE_CAPTION_BORDER));
380: defaults.put("inactiveCaptionText",
381: new ColorUIResource(SystemColor.INACTIVE_CAPTION_TEXT));
382: defaults.put("info",
383: new ColorUIResource(SystemColor.INFO));
384: defaults.put("infoText",
385: new ColorUIResource(SystemColor.INFO_TEXT));
386: defaults.put("menu",
387: new ColorUIResource(SystemColor.MENU));
388: defaults.put("menuText",
389: new ColorUIResource(SystemColor.MENU_TEXT));
390: defaults.put("scrollbar",
391: new ColorUIResource(SystemColor.SCROLLBAR));
392: defaults.put("text",
393: new ColorUIResource(SystemColor.TEXT));
394: defaults.put("textHighlight",
395: new ColorUIResource(SystemColor.TEXT_HIGHLIGHT));
396: defaults.put("textHighlightText",
397: new ColorUIResource(SystemColor.TEXT_HIGHLIGHT_TEXT));
398: defaults.put("textInactiveText",
399: new ColorUIResource(SystemColor.TEXT_INACTIVE_TEXT));
400: defaults.put("textText",
401: new ColorUIResource(SystemColor.TEXT_TEXT));
402: defaults.put("window",
403: new ColorUIResource(SystemColor.WINDOW));
404: defaults.put("windowBorder",
405: new ColorUIResource(SystemColor.WINDOW_BORDER));
406: defaults.put("windowText",
407: new ColorUIResource(SystemColor.WINDOW_TEXT));
408: }
409: else
410: {
411: for (int i = 0; i < systemColors.length; i += 2)
412: {
413: Color color = Color.BLACK;
414: try
415: {
416: color = Color.decode(systemColors[i + 1]);
417: }
418: catch (NumberFormatException e)
419: {
420: e.printStackTrace();
421: }
422: defaults.put(systemColors[i], new ColorUIResource(color));
423: }
424: }
425: }
426:
427:
431: private void loadResourceBundle(UIDefaults defaults)
432: {
433: ResourceBundle bundle;
434: Enumeration e;
435: String key;
436: String value;
437: bundle = ResourceBundle.getBundle("resources/basic");
438:
439: e = bundle.getKeys();
440: while (e.hasMoreElements())
441: {
442: key = (String) e.nextElement();
443: value = bundle.getString(key);
444: defaults.put(key, value);
445: }
446: }
447:
448:
452: protected void initComponentDefaults(UIDefaults defaults)
453: {
454: Object[] uiDefaults;
455:
456: Color highLight = new Color(249, 247, 246);
457: Color light = new Color(239, 235, 231);
458: Color shadow = new Color(139, 136, 134);
459: Color darkShadow = new Color(16, 16, 16);
460:
461: uiDefaults = new Object[] {
462:
463: "AbstractUndoableEdit.undoText", "Undo",
464: "AbstractUndoableEdit.redoText", "Redo",
465: "Button.background", new ColorUIResource(Color.LIGHT_GRAY),
466: "Button.border",
467: new UIDefaults.LazyValue()
468: {
469: public Object createValue(UIDefaults table)
470: {
471: return BasicBorders.getButtonBorder();
472: }
473: },
474: "Button.darkShadow", new ColorUIResource(Color.BLACK),
475: "Button.font", new FontUIResource("Dialog", Font.PLAIN, 12),
476: "Button.foreground", new ColorUIResource(Color.BLACK),
477: "Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
478: KeyStroke.getKeyStroke("SPACE"), "pressed",
479: KeyStroke.getKeyStroke("released SPACE"), "released"
480: }),
481: "Button.highlight", new ColorUIResource(Color.WHITE),
482: "Button.light", new ColorUIResource(Color.LIGHT_GRAY),
483: "Button.margin", new InsetsUIResource(2, 14, 2, 14),
484: "Button.shadow", new ColorUIResource(Color.GRAY),
485: "Button.textIconGap", new Integer(4),
486: "Button.textShiftOffset", new Integer(0),
487: "CheckBox.background", new ColorUIResource(new Color(204, 204, 204)),
488: "CheckBox.border", new BorderUIResource.CompoundBorderUIResource(null,
489: null),
490: "CheckBox.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
491: KeyStroke.getKeyStroke("SPACE"), "pressed",
492: KeyStroke.getKeyStroke("released SPACE"), "released"
493: }),
494: "CheckBox.font", new FontUIResource("Dialog", Font.PLAIN, 12),
495: "CheckBox.foreground", new ColorUIResource(darkShadow),
496: "CheckBox.icon",
497: new UIDefaults.LazyValue()
498: {
499: public Object createValue(UIDefaults def)
500: {
501: return BasicIconFactory.getCheckBoxIcon();
502: }
503: },
504: "CheckBox.checkIcon",
505: new UIDefaults.LazyValue()
506: {
507: public Object createValue(UIDefaults def)
508: {
509: return BasicIconFactory.getMenuItemCheckIcon();
510: }
511: },
512: "CheckBox.margin",new InsetsUIResource(2, 2, 2, 2),
513: "CheckBox.textIconGap", new Integer(4),
514: "CheckBox.textShiftOffset", new Integer(0),
515: "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog",
516: Font.PLAIN, 12),
517: "CheckBoxMenuItem.acceleratorForeground",
518: new ColorUIResource(new Color(16, 16, 16)),
519: "CheckBoxMenuItem.acceleratorSelectionForeground",
520: new ColorUIResource(Color.white),
521: "CheckBoxMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(),
522: "CheckBoxMenuItem.background", new ColorUIResource(light),
523: "CheckBoxMenuItem.border", new BasicBorders.MarginBorder(),
524: "CheckBoxMenuItem.borderPainted", Boolean.FALSE,
525: "CheckBoxMenuItem.checkIcon",
526: new UIDefaults.LazyValue()
527: {
528: public Object createValue(UIDefaults def)
529: {
530: return BasicIconFactory.getCheckBoxMenuItemIcon();
531: }
532: },
533: "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12),
534: "CheckBoxMenuItem.foreground", new ColorUIResource(darkShadow),
535: "CheckBoxMenuItem.margin", new InsetsUIResource(2, 2, 2, 2),
536: "CheckBoxMenuItem.selectionBackground", new ColorUIResource(Color.black),
537: "CheckBoxMenuItem.selectionForeground", new ColorUIResource(Color.white),
538: "ColorChooser.background", new ColorUIResource(light),
539: "ColorChooser.cancelText", "Cancel",
540: "ColorChooser.font", new FontUIResource("Dialog", Font.PLAIN, 12),
541: "ColorChooser.foreground", new ColorUIResource(darkShadow),
542: "ColorChooser.hsbBlueText", "B",
543: "ColorChooser.hsbBrightnessText", "B",
544: "ColorChooser.hsbGreenText", "G",
545: "ColorChooser.hsbHueText", "H",
546: "ColorChooser.hsbNameText", "HSB",
547: "ColorChooser.hsbRedText", "R",
548: "ColorChooser.hsbSaturationText", "S",
549: "ColorChooser.okText", "OK",
550: "ColorChooser.previewText", "Preview",
551: "ColorChooser.resetText", "Reset",
552: "ColorChooser.rgbBlueMnemonic", "66",
553: "ColorChooser.rgbBlueText", "Blue",
554: "ColorChooser.rgbGreenMnemonic", "78",
555: "ColorChooser.rgbGreenText", "Green",
556: "ColorChooser.rgbNameText", "RGB",
557: "ColorChooser.rgbRedMnemonic", "68",
558: "ColorChooser.rgbRedText", "Red",
559: "ColorChooser.sampleText", "Sample Text Sample Text",
560: "ColorChooser.swatchesDefaultRecentColor", new ColorUIResource(light),
561: "ColorChooser.swatchesNameText", "Swatches",
562: "ColorChooser.swatchesRecentSwatchSize", new Dimension(10, 10),
563: "ColorChooser.swatchesRecentText", "Recent:",
564: "ColorChooser.swatchesSwatchSize", new Dimension(10, 10),
565: "ComboBox.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
566: "ESCAPE", "hidePopup",
567: "PAGE_UP", "pageUpPassThrough",
568: "PAGE_DOWN", "pageDownPassThrough",
569: "HOME", "homePassThrough",
570: "END", "endPassThrough"
571: }),
572: "ComboBox.background", new ColorUIResource(Color.white),
573: "ComboBox.buttonBackground", new ColorUIResource(light),
574: "ComboBox.buttonDarkShadow", new ColorUIResource(darkShadow),
575: "ComboBox.buttonHighlight", new ColorUIResource(highLight),
576: "ComboBox.buttonShadow", new ColorUIResource(shadow),
577: "ComboBox.disabledBackground", new ColorUIResource(light),
578: "ComboBox.disabledForeground", new ColorUIResource(Color.gray),
579: "ComboBox.font", new FontUIResource("SansSerif", Font.PLAIN, 12),
580: "ComboBox.foreground", new ColorUIResource(Color.black),
581: "ComboBox.selectionBackground", new ColorUIResource(0, 0, 128),
582: "ComboBox.selectionForeground", new ColorUIResource(Color.white),
583: "Desktop.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
584: "KP_LEFT", "left",
585: "KP_RIGHT", "right",
586: "ctrl F5", "restore",
587: "LEFT", "left",
588: "ctrl alt F6", "selectNextFrame",
589: "UP", "up",
590: "ctrl F6", "selectNextFrame",
591: "RIGHT", "right",
592: "DOWN", "down",
593: "ctrl F7", "move",
594: "ctrl F8", "resize",
595: "ESCAPE", "escape",
596: "ctrl TAB", "selectNextFrame",
597: "ctrl F9", "minimize",
598: "KP_UP", "up",
599: "ctrl F4", "close",
600: "KP_DOWN", "down",
601: "ctrl F10", "maximize",
602: "ctrl alt shift F6","selectPreviousFrame"
603: }),
604: "DesktopIcon.border", new BorderUIResource.CompoundBorderUIResource(null,
605: null),
606: "EditorPane.background", new ColorUIResource(Color.white),
607: "EditorPane.border", BasicBorders.getMarginBorder(),
608: "EditorPane.caretBlinkRate", new Integer(500),
609: "EditorPane.caretForeground", new ColorUIResource(Color.black),
610: "EditorPane.font", new FontUIResource("Serif", Font.PLAIN, 12),
611: "EditorPane.foreground", new ColorUIResource(Color.black),
612: "EditorPane.inactiveForeground", new ColorUIResource(Color.gray),
613: "EditorPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
614: KeyStroke.getKeyStroke("shift UP"), "selection-up",
615: KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word",
616: KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
617: KeyStroke.getKeyStroke("shift KP_UP"), "selection-up",
618: KeyStroke.getKeyStroke("DOWN"), "caret-down",
619: KeyStroke.getKeyStroke("shift ctrl T"), "previous-link-action",
620: KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word",
621: KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
622: KeyStroke.getKeyStroke("END"), "caret-end-line",
623: KeyStroke.getKeyStroke("shift PAGE_UP"), "selection-page-up",
624: KeyStroke.getKeyStroke("KP_UP"), "caret-up",
625: KeyStroke.getKeyStroke("DELETE"), "delete-next",
626: KeyStroke.getKeyStroke("ctrl HOME"), "caret-begin",
627: KeyStroke.getKeyStroke("shift LEFT"), "selection-backward",
628: KeyStroke.getKeyStroke("ctrl END"), "caret-end",
629: KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
630: KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word",
631: KeyStroke.getKeyStroke("LEFT"), "caret-backward",
632: KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
633: KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
634: KeyStroke.getKeyStroke("ctrl SPACE"), "activate-link-action",
635: KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
636: KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
637: KeyStroke.getKeyStroke("ENTER"), "insert-break",
638: KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
639: KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
640: KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "selection-page-left",
641: KeyStroke.getKeyStroke("shift DOWN"), "selection-down",
642: KeyStroke.getKeyStroke("PAGE_DOWN"), "page-down",
643: KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
644: KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
645: KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
646: KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "selection-page-right",
647: KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
648: KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word",
649: KeyStroke.getKeyStroke("shift END"), "selection-end-line",
650: KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word",
651: KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
652: KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
653: KeyStroke.getKeyStroke("KP_DOWN"), "caret-down",
654: KeyStroke.getKeyStroke("ctrl A"), "select-all",
655: KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
656: KeyStroke.getKeyStroke("shift ctrl END"), "selection-end",
657: KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
658: KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word",
659: KeyStroke.getKeyStroke("ctrl T"), "next-link-action",
660: KeyStroke.getKeyStroke("shift KP_DOWN"), "selection-down",
661: KeyStroke.getKeyStroke("TAB"), "insert-tab",
662: KeyStroke.getKeyStroke("UP"), "caret-up",
663: KeyStroke.getKeyStroke("shift ctrl HOME"), "selection-begin",
664: KeyStroke.getKeyStroke("shift PAGE_DOWN"), "selection-page-down",
665: KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
666: KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word",
667: KeyStroke.getKeyStroke("PAGE_UP"), "page-up",
668: KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard"
669: }),
670: "EditorPane.margin", new InsetsUIResource(3, 3, 3, 3),
671: "EditorPane.selectionBackground", new ColorUIResource(Color.black),
672: "EditorPane.selectionForeground", new ColorUIResource(Color.white),
673: "FileChooser.acceptAllFileFilterText", "All Files (*.*)",
674: "FileChooser.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
675: "ESCAPE", "cancelSelection"
676: }),
677: "FileChooser.cancelButtonMnemonic", "67",
678: "FileChooser.cancelButtonText", "Cancel",
679: "FileChooser.cancelButtonToolTipText", "Abort file chooser dialog",
680: "FileChooser.directoryDescriptionText", "Directory",
681: "FileChooser.fileDescriptionText", "Generic File",
682: "FileChooser.directoryOpenButtonMnemonic", "79",
683: "FileChooser.helpButtonMnemonic", "72",
684: "FileChooser.helpButtonText", "Help",
685: "FileChooser.helpButtonToolTipText", "FileChooser help",
686: "FileChooser.newFolderErrorSeparator", ":",
687: "FileChooser.newFolderErrorText", "Error creating new folder",
688: "FileChooser.openButtonMnemonic", "79",
689: "FileChooser.openButtonText", "Open",
690: "FileChooser.openButtonToolTipText", "Open selected file",
691: "FileChooser.saveButtonMnemonic", "83",
692: "FileChooser.saveButtonText", "Save",
693: "FileChooser.saveButtonToolTipText", "Save selected file",
694: "FileChooser.updateButtonMnemonic", "85",
695: "FileChooser.updateButtonText", "Update",
696: "FileChooser.updateButtonToolTipText", "Update directory listing",
697: "FocusManagerClassName", "TODO",
698: "FormattedTextField.background", new ColorUIResource(light),
699: "FormattedTextField.caretForeground", new ColorUIResource(Color.black),
700: "FormattedTextField.margin", new InsetsUIResource(0, 0, 0, 0),
701: "FormattedTextField.caretBlinkRate", new Integer(500),
702: "FormattedTextField.font",
703: new FontUIResource("SansSerif", Font.PLAIN, 12),
704: "FormattedTextField.foreground", new ColorUIResource(Color.black),
705: "FormattedTextField.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
706: KeyStroke.getKeyStroke("KP_UP"), "increment",
707: KeyStroke.getKeyStroke("END"), "caret-end-line",
708: KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
709: KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
710: KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
711: KeyStroke.getKeyStroke("KP_DOWN"), "decrement",
712: KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
713: KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
714: KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
715: KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
716: KeyStroke.getKeyStroke("LEFT"), "caret-backward",
717: KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
718: KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
719: KeyStroke.getKeyStroke("UP"), "increment",
720: KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word",
721: KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
722: KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
723: KeyStroke.getKeyStroke("ESCAPE"), "reset-field-edit",
724: KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
725: KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
726: KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word",
727: KeyStroke.getKeyStroke("DOWN"), "decrement",
728: KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word",
729: KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard",
730: KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word",
731: KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
732: KeyStroke.getKeyStroke("ctrl A"), "select-all",
733: KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
734: KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
735: KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word",
736: KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
737: KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word",
738: KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
739: KeyStroke.getKeyStroke("shift END"), "selection-end-line",
740: KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word",
741: KeyStroke.getKeyStroke("DELETE"), "delete-next",
742: KeyStroke.getKeyStroke("ENTER"), "notify-field-accept",
743: KeyStroke.getKeyStroke("shift LEFT"), "selection-backward"
744: }),
745: "FormattedTextField.inactiveBackground", new ColorUIResource(light),
746: "FormattedTextField.inactiveForeground", new ColorUIResource(Color.gray),
747: "FormattedTextField.selectionBackground",
748: new ColorUIResource(Color.black),
749: "FormattedTextField.selectionForeground",
750: new ColorUIResource(Color.white),
751: "FormView.resetButtonText", "Reset",
752: "FormView.submitButtonText", "Submit Query",
753: "InternalFrame.activeTitleBackground", new ColorUIResource(0, 0, 128),
754: "InternalFrame.activeTitleForeground", new ColorUIResource(Color.white),
755: "InternalFrame.border",
756: new UIDefaults.LazyValue()
757: {
758: public Object createValue(UIDefaults table)
759: {
760: Color lineColor = new Color(238, 238, 238);
761: Border inner = BorderFactory.createLineBorder(lineColor, 1);
762: Color shadowInner = new Color(184, 207, 229);
763: Color shadowOuter = new Color(122, 138, 153);
764: Border outer = BorderFactory.createBevelBorder(BevelBorder.RAISED,
765: Color.WHITE,
766: Color.WHITE,
767: shadowOuter,
768: shadowInner);
769: Border border = new BorderUIResource.CompoundBorderUIResource(outer,
770: inner);
771: return border;
772: }
773: },
774: "InternalFrame.borderColor", new ColorUIResource(light),
775: "InternalFrame.borderDarkShadow", new ColorUIResource(Color.BLACK),
776: "InternalFrame.borderHighlight", new ColorUIResource(Color.WHITE),
777: "InternalFrame.borderLight", new ColorUIResource(Color.LIGHT_GRAY),
778: "InternalFrame.borderShadow", new ColorUIResource(Color.GRAY),
779: "InternalFrame.closeIcon", BasicIconFactory.createEmptyFrameIcon(),
780: "InternalFrame.icon",
781: new UIDefaults.LazyValue()
782: {
783: public Object createValue(UIDefaults def)
784: {
785: return new IconUIResource(BasicIconFactory.createEmptyFrameIcon());
786: }
787: },
788: "InternalFrame.iconifyIcon", BasicIconFactory.createEmptyFrameIcon(),
789: "InternalFrame.inactiveTitleBackground", new ColorUIResource(Color.gray),
790: "InternalFrame.inactiveTitleForeground",
791: new ColorUIResource(Color.lightGray),
792: "InternalFrame.maximizeIcon", BasicIconFactory.createEmptyFrameIcon(),
793: "InternalFrame.minimizeIcon", BasicIconFactory.createEmptyFrameIcon(),
794: "InternalFrame.titleFont", new FontUIResource("Dialog", Font.BOLD, 12),
795: "InternalFrame.windowBindings", new Object[] {
796: "shift ESCAPE", "showSystemMenu",
797: "ctrl SPACE", "showSystemMenu",
798: "ESCAPE", "showSystemMenu"
799: },
800: "Label.background", new ColorUIResource(light),
801: "Label.disabledForeground", new ColorUIResource(Color.white),
802: "Label.disabledShadow", new ColorUIResource(shadow),
803: "Label.font", new FontUIResource("Dialog", Font.PLAIN, 12),
804: "Label.foreground", new ColorUIResource(darkShadow),
805: "List.background", new ColorUIResource(Color.white),
806: "List.border", new BasicBorders.MarginBorder(),
807: "List.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
808: KeyStroke.getKeyStroke("ctrl DOWN"), "selectNextRowChangeLead",
809: KeyStroke.getKeyStroke("shift UP"), "selectPreviousRowExtendSelection",
810: KeyStroke.getKeyStroke("ctrl RIGHT"), "selectNextColumnChangeLead",
811: KeyStroke.getKeyStroke("shift ctrl LEFT"), "selectPreviousColumnExtendSelection",
812: KeyStroke.getKeyStroke("shift KP_UP"), "selectPreviousRowExtendSelection",
813: KeyStroke.getKeyStroke("DOWN"), "selectNextRow",
814: KeyStroke.getKeyStroke("ctrl UP"), "selectPreviousRowChangeLead",
815: KeyStroke.getKeyStroke("ctrl LEFT"), "selectPreviousColumnChangeLead",
816: KeyStroke.getKeyStroke("CUT"), "cut",
817: KeyStroke.getKeyStroke("END"), "selectLastRow",
818: KeyStroke.getKeyStroke("shift PAGE_UP"), "scrollUpExtendSelection",
819: KeyStroke.getKeyStroke("KP_UP"), "selectPreviousRow",
820: KeyStroke.getKeyStroke("shift ctrl UP"), "selectPreviousRowExtendSelection",
821: KeyStroke.getKeyStroke("ctrl HOME"), "selectFirstRowChangeLead",
822: KeyStroke.getKeyStroke("shift LEFT"), "selectPreviousColumnExtendSelection",
823: KeyStroke.getKeyStroke("ctrl END"), "selectLastRowChangeLead",
824: KeyStroke.getKeyStroke("ctrl PAGE_DOWN"), "scrollDownChangeLead",
825: KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selectNextColumnExtendSelection",
826: KeyStroke.getKeyStroke("LEFT"), "selectPreviousColumn",
827: KeyStroke.getKeyStroke("ctrl PAGE_UP"), "scrollUpChangeLead",
828: KeyStroke.getKeyStroke("KP_LEFT"), "selectPreviousColumn",
829: KeyStroke.getKeyStroke("shift KP_RIGHT"), "selectNextColumnExtendSelection",
830: KeyStroke.getKeyStroke("SPACE"), "addToSelection",
831: KeyStroke.getKeyStroke("ctrl SPACE"), "toggleAndAnchor",
832: KeyStroke.getKeyStroke("shift SPACE"), "extendTo",
833: KeyStroke.getKeyStroke("shift ctrl SPACE"), "moveSelectionTo",
834: KeyStroke.getKeyStroke("shift ctrl DOWN"), "selectNextRowExtendSelection",
835: KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "clearSelection",
836: KeyStroke.getKeyStroke("shift HOME"), "selectFirstRowExtendSelection",
837: KeyStroke.getKeyStroke("RIGHT"), "selectNextColumn",
838: KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "scrollUpExtendSelection",
839: KeyStroke.getKeyStroke("shift DOWN"), "selectNextRowExtendSelection",
840: KeyStroke.getKeyStroke("PAGE_DOWN"), "scrollDown",
841: KeyStroke.getKeyStroke("shift ctrl KP_UP"), "selectPreviousRowExtendSelection",
842: KeyStroke.getKeyStroke("shift KP_LEFT"), "selectPreviousColumnExtendSelection",
843: KeyStroke.getKeyStroke("ctrl X"), "cut",
844: KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "scrollDownExtendSelection",
845: KeyStroke.getKeyStroke("ctrl SLASH"), "selectAll",
846: KeyStroke.getKeyStroke("ctrl C"), "copy",
847: KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "selectNextColumnChangeLead",
848: KeyStroke.getKeyStroke("shift END"), "selectLastRowExtendSelection",
849: KeyStroke.getKeyStroke("shift ctrl KP_DOWN"), "selectNextRowExtendSelection",
850: KeyStroke.getKeyStroke("ctrl KP_LEFT"), "selectPreviousColumnChangeLead",
851: KeyStroke.getKeyStroke("HOME"), "selectFirstRow",
852: KeyStroke.getKeyStroke("ctrl V"), "paste",
853: KeyStroke.getKeyStroke("KP_DOWN"), "selectNextRow",
854: KeyStroke.getKeyStroke("ctrl KP_DOWN"), "selectNextRowChangeLead",
855: KeyStroke.getKeyStroke("shift RIGHT"), "selectNextColumnExtendSelection",
856: KeyStroke.getKeyStroke("ctrl A"), "selectAll",
857: KeyStroke.getKeyStroke("shift ctrl END"), "selectLastRowExtendSelection",
858: KeyStroke.getKeyStroke("COPY"), "copy",
859: KeyStroke.getKeyStroke("ctrl KP_UP"), "selectPreviousRowChangeLead",
860: KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selectPreviousColumnExtendSelection",
861: KeyStroke.getKeyStroke("shift KP_DOWN"), "selectNextRowExtendSelection",
862: KeyStroke.getKeyStroke("UP"), "selectPreviousRow",
863: KeyStroke.getKeyStroke("shift ctrl HOME"), "selectFirstRowExtendSelection",
864: KeyStroke.getKeyStroke("shift PAGE_DOWN"), "scrollDownExtendSelection",
865: KeyStroke.getKeyStroke("KP_RIGHT"), "selectNextColumn",
866: KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selectNextColumnExtendSelection",
867: KeyStroke.getKeyStroke("PAGE_UP"), "scrollUp",
868: KeyStroke.getKeyStroke("PASTE"), "paste"
869: }),
870: "List.font", new FontUIResource("Dialog", Font.PLAIN, 12),
871: "List.foreground", new ColorUIResource(Color.black),
872: "List.selectionBackground", new ColorUIResource(0, 0, 128),
873: "List.selectionForeground", new ColorUIResource(Color.white),
874: "List.focusCellHighlightBorder",
875: new BorderUIResource.
876: LineBorderUIResource(new ColorUIResource(Color.yellow)),
877: "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12),
878: "Menu.crossMenuMnemonic", Boolean.TRUE,
879: "Menu.acceleratorForeground", new ColorUIResource(darkShadow),
880: "Menu.acceleratorSelectionForeground", new ColorUIResource(Color.white),
881: "Menu.arrowIcon", BasicIconFactory.getMenuArrowIcon(),
882: "Menu.background", new ColorUIResource(light),
883: "Menu.border", new BasicBorders.MarginBorder(),
884: "Menu.borderPainted", Boolean.FALSE,
885: "Menu.checkIcon", BasicIconFactory.getMenuItemCheckIcon(),
886: "Menu.consumesTabs", Boolean.TRUE,
887: "Menu.font", new FontUIResource("Dialog", Font.PLAIN, 12),
888: "Menu.foreground", new ColorUIResource(darkShadow),
889: "Menu.margin", new InsetsUIResource(2, 2, 2, 2),
890: "Menu.selectedWindowInputMapBindings", new Object[] {
891: "ESCAPE", "cancel",
892: "DOWN", "selectNext",
893: "KP_DOWN", "selectNext",
894: "UP", "selectPrevious",
895: "KP_UP", "selectPrevious",
896: "LEFT", "selectParent",
897: "KP_LEFT", "selectParent",
898: "RIGHT", "selectChild",
899: "KP_RIGHT", "selectChild",
900: "ENTER", "return",
901: "SPACE", "return"
902: },
903: "Menu.menuPopupOffsetX", new Integer(0),
904: "Menu.menuPopupOffsetY", new Integer(0),
905: "Menu.submenuPopupOffsetX", new Integer(0),
906: "Menu.submenuPopupOffsetY", new Integer(0),
907: "Menu.selectionBackground", new ColorUIResource(Color.black),
908: "Menu.selectionForeground", new ColorUIResource(Color.white),
909: "MenuBar.background", new ColorUIResource(light),
910: "MenuBar.border", new BasicBorders.MenuBarBorder(null, null),
911: "MenuBar.font", new FontUIResource("Dialog", Font.PLAIN, 12),
912: "MenuBar.foreground", new ColorUIResource(darkShadow),
913: "MenuBar.highlight", new ColorUIResource(highLight),
914: "MenuBar.shadow", new ColorUIResource(shadow),
915: "MenuBar.windowBindings", new Object[] {
916: "F10", "takeFocus"
917: },
918: "MenuItem.acceleratorDelimiter", "+",
919: "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12),
920: "MenuItem.acceleratorForeground", new ColorUIResource(darkShadow),
921: "MenuItem.acceleratorSelectionForeground",
922: new ColorUIResource(Color.white),
923: "MenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(),
924: "MenuItem.background", new ColorUIResource(light),
925: "MenuItem.border", new BasicBorders.MarginBorder(),
926: "MenuItem.borderPainted", Boolean.FALSE,
927: "MenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12),
928: "MenuItem.foreground", new ColorUIResource(darkShadow),
929: "MenuItem.margin", new InsetsUIResource(2, 2, 2, 2),
930: "MenuItem.selectionBackground", new ColorUIResource(Color.black),
931: "MenuItem.selectionForeground", new ColorUIResource(Color.white),
932: "OptionPane.background", new ColorUIResource(light),
933: "OptionPane.border",
934: new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0),
935: "OptionPane.buttonAreaBorder",
936: new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0),
937: "OptionPane.buttonClickThreshhold", new Integer(500),
938: "OptionPane.cancelButtonText", "Cancel",
939: "OptionPane.font", new FontUIResource("Dialog", Font.PLAIN, 12),
940: "OptionPane.foreground", new ColorUIResource(darkShadow),
941: "OptionPane.messageAreaBorder",
942: new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0),
943: "OptionPane.messageForeground", new ColorUIResource(darkShadow),
944: "OptionPane.minimumSize",
945: new DimensionUIResource(BasicOptionPaneUI.MinimumWidth,
946: BasicOptionPaneUI.MinimumHeight),
947: "OptionPane.noButtonText", "No",
948: "OptionPane.okButtonText", "OK",
949: "OptionPane.windowBindings", new Object[] {
950: "ESCAPE", "close"
951: },
952: "OptionPane.yesButtonText", "Yes",
953: "Panel.background", new ColorUIResource(light),
954: "Panel.font", new FontUIResource("Dialog", Font.PLAIN, 12),
955: "Panel.foreground", new ColorUIResource(Color.black),
956: "PasswordField.background", new ColorUIResource(light),
957: "PasswordField.border", new BasicBorders.FieldBorder(null, null,
958: null, null),
959: "PasswordField.caretBlinkRate", new Integer(500),
960: "PasswordField.caretForeground", new ColorUIResource(Color.black),
961: "PasswordField.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12),
962: "PasswordField.foreground", new ColorUIResource(Color.black),
963: "PasswordField.inactiveBackground", new ColorUIResource(light),
964: "PasswordField.inactiveForeground", new ColorUIResource(Color.gray),
965: "PasswordField.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
966: KeyStroke.getKeyStroke("END"), "caret-end-line",
967: KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
968: KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
969: KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
970: KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
971: KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
972: KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
973: KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
974: KeyStroke.getKeyStroke("LEFT"), "caret-backward",
975: KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
976: KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
977: KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-end-line",
978: KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
979: KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
980: KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
981: KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-begin-line",
982: KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-begin-line",
983: KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-end-line",
984: KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard",
985: KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-end-line",
986: KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
987: KeyStroke.getKeyStroke("ctrl A"), "select-all",
988: KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
989: KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
990: KeyStroke.getKeyStroke("ctrl LEFT"), "caret-begin-line",
991: KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
992: KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-begin-line",
993: KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
994: KeyStroke.getKeyStroke("shift END"), "selection-end-line",
995: KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-end-line",
996: KeyStroke.getKeyStroke("DELETE"), "delete-next",
997: KeyStroke.getKeyStroke("ENTER"), "notify-field-accept",
998: KeyStroke.getKeyStroke("shift LEFT"), "selection-backward"
999: }),
1000: "PasswordField.margin", new InsetsUIResource(0, 0, 0, 0),
1001: "PasswordField.selectionBackground", new ColorUIResource(Color.black),
1002: "PasswordField.selectionForeground", new ColorUIResource(Color.white),
1003: "PopupMenu.background", new ColorUIResource(light),
1004: "PopupMenu.border", new BorderUIResource.BevelBorderUIResource(0),
1005: "PopupMenu.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1006: "PopupMenu.foreground", new ColorUIResource(darkShadow),
1007: "ProgressBar.background", new ColorUIResource(Color.LIGHT_GRAY),
1008: "ProgressBar.border",
1009: new BorderUIResource.LineBorderUIResource(Color.GREEN, 2),
1010: "ProgressBar.cellLength", new Integer(1),
1011: "ProgressBar.cellSpacing", new Integer(0),
1012: "ProgressBar.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1013: "ProgressBar.foreground", new ColorUIResource(0, 0, 128),
1014: "ProgressBar.selectionBackground", new ColorUIResource(0, 0, 128),
1015: "ProgressBar.selectionForeground", new ColorUIResource(Color.LIGHT_GRAY),
1016: "ProgressBar.repaintInterval", new Integer(50),
1017: "ProgressBar.cycleTime", new Integer(3000),
1018: "RadioButton.background", new ColorUIResource(light),
1019: "RadioButton.border", new BorderUIResource.CompoundBorderUIResource(null,
1020: null),
1021: "RadioButton.darkShadow", new ColorUIResource(shadow),
1022: "RadioButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
1023: KeyStroke.getKeyStroke("SPACE"), "pressed",
1024: KeyStroke.getKeyStroke("released SPACE"), "released"
1025: }),
1026: "RadioButton.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1027: "RadioButton.foreground", new ColorUIResource(darkShadow),
1028: "RadioButton.highlight", new ColorUIResource(highLight),
1029: "RadioButton.icon",
1030: new UIDefaults.LazyValue()
1031: {
1032: public Object createValue(UIDefaults def)
1033: {
1034: return BasicIconFactory.getRadioButtonIcon();
1035: }
1036: },
1037: "RadioButton.light", new ColorUIResource(highLight),
1038: "RadioButton.margin", new InsetsUIResource(2, 2, 2, 2),
1039: "RadioButton.shadow", new ColorUIResource(shadow),
1040: "RadioButton.textIconGap", new Integer(4),
1041: "RadioButton.textShiftOffset", new Integer(0),
1042: "RadioButtonMenuItem.acceleratorFont",
1043: new FontUIResource("Dialog", Font.PLAIN, 12),
1044: "RadioButtonMenuItem.acceleratorForeground",
1045: new ColorUIResource(darkShadow),
1046: "RadioButtonMenuItem.acceleratorSelectionForeground",
1047: new ColorUIResource(Color.white),
1048: "RadioButtonMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(),
1049: "RadioButtonMenuItem.background", new ColorUIResource(light),
1050: "RadioButtonMenuItem.border", new BasicBorders.MarginBorder(),
1051: "RadioButtonMenuItem.borderPainted", Boolean.FALSE,
1052: "RadioButtonMenuItem.checkIcon", BasicIconFactory.getRadioButtonMenuItemIcon(),
1053: "RadioButtonMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1054: "RadioButtonMenuItem.foreground", new ColorUIResource(darkShadow),
1055: "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2),
1056: "RadioButtonMenuItem.selectionBackground",
1057: new ColorUIResource(Color.black),
1058: "RadioButtonMenuItem.selectionForeground",
1059: new ColorUIResource(Color.white),
1060: "RootPane.defaultButtonWindowKeyBindings", new Object[] {
1061: "ENTER", "press",
1062: "released ENTER", "release",
1063: "ctrl ENTER", "press",
1064: "ctrl released ENTER", "release"
1065: },
1066: "ScrollBar.background", new ColorUIResource(224, 224, 224),
1067: "ScrollBar.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
1068: "PAGE_UP", "negativeBlockIncrement",
1069: "PAGE_DOWN", "positiveBlockIncrement",
1070: "END", "maxScroll",
1071: "HOME", "minScroll",
1072: "LEFT", "positiveUnitIncrement",
1073: "KP_UP", "negativeUnitIncrement",
1074: "KP_DOWN", "positiveUnitIncrement",
1075: "UP", "negativeUnitIncrement",
1076: "RIGHT", "negativeUnitIncrement",
1077: "KP_LEFT", "positiveUnitIncrement",
1078: "DOWN", "positiveUnitIncrement",
1079: "KP_RIGHT", "negativeUnitIncrement"
1080: }),
1081: "ScrollBar.foreground", new ColorUIResource(light),
1082: "ScrollBar.maximumThumbSize", new DimensionUIResource(4096, 4096),
1083: "ScrollBar.minimumThumbSize", new DimensionUIResource(8, 8),
1084: "ScrollBar.thumb", new ColorUIResource(light),
1085: "ScrollBar.thumbDarkShadow", new ColorUIResource(shadow),
1086: "ScrollBar.thumbHighlight", new ColorUIResource(highLight),
1087: "ScrollBar.thumbShadow", new ColorUIResource(shadow),
1088: "ScrollBar.track", new ColorUIResource(light),
1089: "ScrollBar.trackHighlight", new ColorUIResource(shadow),
1090: "ScrollBar.width", new Integer(16),
1091: "ScrollPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
1092: "PAGE_UP", "scrollUp",
1093: "KP_LEFT", "unitScrollLeft",
1094: "ctrl PAGE_DOWN","scrollRight",
1095: "PAGE_DOWN", "scrollDown",
1096: "KP_RIGHT", "unitScrollRight",
1097: "LEFT", "unitScrollLeft",
1098: "ctrl END", "scrollEnd",
1099: "UP", "unitScrollUp",
1100: "RIGHT", "unitScrollRight",
1101: "DOWN", "unitScrollDown",
1102: "ctrl HOME", "scrollHome",
1103: "ctrl PAGE_UP", "scrollLeft",
1104: "KP_UP", "unitScrollUp",
1105: "KP_DOWN", "unitScrollDown"
1106: }),
1107: "ScrollPane.background", new ColorUIResource(light),
1108: "ScrollPane.border", new BorderUIResource.EtchedBorderUIResource(),
1109: "ScrollPane.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1110: "ScrollPane.foreground", new ColorUIResource(darkShadow),
1111: "Separator.background", new ColorUIResource(highLight),
1112: "Separator.foreground", new ColorUIResource(shadow),
1113: "Separator.highlight", new ColorUIResource(highLight),
1114: "Separator.shadow", new ColorUIResource(shadow),
1115: "Slider.background", new ColorUIResource(light),
1116: "Slider.focus", new ColorUIResource(shadow),
1117: "Slider.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
1118: "ctrl PAGE_DOWN", "negativeBlockIncrement",
1119: "PAGE_DOWN", "negativeBlockIncrement",
1120: "PAGE_UP", "positiveBlockIncrement",
1121: "ctrl PAGE_UP", "positiveBlockIncrement",
1122: "KP_RIGHT", "positiveUnitIncrement",
1123: "DOWN", "negativeUnitIncrement",
1124: "KP_LEFT", "negativeUnitIncrement",
1125: "RIGHT", "positiveUnitIncrement",
1126: "KP_DOWN", "negativeUnitIncrement",
1127: "UP", "positiveUnitIncrement",
1128: "KP_UP", "positiveUnitIncrement",
1129: "LEFT", "negativeUnitIncrement",
1130: "HOME", "minScroll",
1131: "END", "maxScroll"
1132: }),
1133: "Slider.focusInsets", new InsetsUIResource(2, 2, 2, 2),
1134: "Slider.foreground", new ColorUIResource(light),
1135: "Slider.highlight", new ColorUIResource(highLight),
1136: "Slider.shadow", new ColorUIResource(shadow),
1137: "Slider.thumbHeight", new Integer(20),
1138: "Slider.thumbWidth", new Integer(11),
1139: "Slider.tickHeight", new Integer(12),
1140: "Spinner.background", new ColorUIResource(light),
1141: "Spinner.foreground", new ColorUIResource(light),
1142: "Spinner.arrowButtonSize", new DimensionUIResource(16, 5),
1143: "Spinner.editorBorderPainted", Boolean.FALSE,
1144: "Spinner.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12),
1145: "SplitPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
1146: "F6", "toggleFocus",
1147: "F8", "startResize",
1148: "END", "selectMax",
1149: "HOME", "selectMin",
1150: "LEFT", "negativeIncremnent",
1151: "KP_UP", "negativeIncrement",
1152: "KP_DOWN", "positiveIncrement",
1153: "UP", "negativeIncrement",
1154: "RIGHT", "positiveIncrement",
1155: "KP_LEFT", "negativeIncrement",
1156: "DOWN", "positiveIncrement",
1157: "KP_RIGHT", "positiveIncrement"
1158: }),
1159: "SplitPane.background", new ColorUIResource(light),
1160: "SplitPane.border", new BasicBorders.SplitPaneBorder(null, null),
1161: "SplitPane.darkShadow", new ColorUIResource(shadow),
1162: "SplitPane.dividerSize", new Integer(7),
1163: "SplitPane.highlight", new ColorUIResource(highLight),
1164: "SplitPane.shadow", new ColorUIResource(shadow),
1165: "SplitPaneDivider.border", BasicBorders.getSplitPaneDividerBorder(),
1166: "SplitPaneDivider.draggingColor", new ColorUIResource(Color.DARK_GRAY),
1167: "TabbedPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
1168: "ctrl PAGE_DOWN","navigatePageDown",
1169: "ctrl PAGE_UP", "navigatePageUp",
1170: "ctrl UP", "requestFocus",
1171: "ctrl KP_UP", "requestFocus"
1172: }),
1173: "TabbedPane.background", new ColorUIResource(light),
1174: "TabbedPane.contentBorderInsets", new InsetsUIResource(2, 2, 3, 3),
1175: "TabbedPane.darkShadow", new ColorUIResource(shadow),
1176: "TabbedPane.focus", new ColorUIResource(darkShadow),
1177: "TabbedPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
1178: KeyStroke.getKeyStroke("ctrl DOWN"), "requestFocusForVisibleComponent",
1179: KeyStroke.getKeyStroke("KP_UP"), "navigateUp",
1180: KeyStroke.getKeyStroke("LEFT"), "navigateLeft",
1181: KeyStroke.getKeyStroke("ctrl KP_DOWN"), "requestFocusForVisibleComponent",
1182: KeyStroke.getKeyStroke("UP"), "navigateUp",
1183: KeyStroke.getKeyStroke("KP_DOWN"), "navigateDown",
1184: KeyStroke.getKeyStroke("KP_LEFT"), "navigateLeft",
1185: KeyStroke.getKeyStroke("RIGHT"), "navigateRight",
1186: KeyStroke.getKeyStroke("KP_RIGHT"), "navigateRight",
1187: KeyStroke.getKeyStroke("DOWN"), "navigateDown"
1188: }),
1189: "TabbedPane.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1190: "TabbedPane.foreground", new ColorUIResource(darkShadow),
1191: "TabbedPane.highlight", new ColorUIResource(highLight),
1192: "TabbedPane.light", new ColorUIResource(highLight),
1193: "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1),
1194: "TabbedPane.shadow", new ColorUIResource(shadow),
1195: "TabbedPane.tabbedPaneContentBorderInsets", new InsetsUIResource(3, 2, 1, 2),
1196: "TabbedPane.tabbedPaneTabPadInsets", new InsetsUIResource(1, 1, 1, 1),
1197: "TabbedPane.tabsOpaque", Boolean.TRUE,
1198: "TabbedPane.tabAreaInsets", new InsetsUIResource(3, 2, 0, 2),
1199: "TabbedPane.tabInsets", new InsetsUIResource(0, 4, 1, 4),
1200: "TabbedPane.tabRunOverlay", new Integer(2),
1201: "TabbedPane.textIconGap", new Integer(4),
1202: "Table.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
1203: "ctrl DOWN", "selectNextRowChangeLead",
1204: "ctrl RIGHT", "selectNextColumnChangeLead",
1205: "ctrl UP", "selectPreviousRowChangeLead",
1206: "ctrl LEFT", "selectPreviousColumnChangeLead",
1207: "CUT", "cut",
1208: "SPACE", "addToSelection",
1209: "ctrl SPACE", "toggleAndAnchor",
1210: "shift SPACE", "extendTo",
1211: "shift ctrl SPACE", "moveSelectionTo",
1212: "ctrl X", "cut",
1213: "ctrl C", "copy",
1214: "ctrl KP_RIGHT", "selectNextColumnChangeLead",
1215: "ctrl KP_LEFT", "selectPreviousColumnChangeLead",
1216: "ctrl V", "paste",
1217: "ctrl KP_DOWN", "selectNextRowChangeLead",
1218: "COPY", "copy",
1219: "ctrl KP_UP", "selectPreviousRowChangeLead",
1220: "PASTE", "paste",
1221: "shift PAGE_DOWN","scrollDownExtendSelection",
1222: "PAGE_DOWN", "scrollDownChangeSelection",
1223: "END", "selectLastColumn",
1224: "shift END", "selectLastColumnExtendSelection",
1225: "HOME", "selectFirstColumn",
1226: "ctrl END", "selectLastRow",
1227: "ctrl shift END","selectLastRowExtendSelection",
1228: "LEFT", "selectPreviousColumn",
1229: "shift HOME", "selectFirstColumnExtendSelection",
1230: "UP", "selectPreviousRow",
1231: "RIGHT", "selectNextColumn",
1232: "ctrl HOME", "selectFirstRow",
1233: "shift LEFT", "selectPreviousColumnExtendSelection",
1234: "DOWN", "selectNextRow",
1235: "ctrl shift HOME","selectFirstRowExtendSelection",
1236: "shift UP", "selectPreviousRowExtendSelection",
1237: "F2", "startEditing",
1238: "shift RIGHT", "selectNextColumnExtendSelection",
1239: "TAB", "selectNextColumnCell",
1240: "shift DOWN", "selectNextRowExtendSelection",
1241: "ENTER", "selectNextRowCell",
1242: "KP_UP", "selectPreviousRow",
1243: "KP_DOWN", "selectNextRow",
1244: "KP_LEFT", "selectPreviousColumn",
1245: "KP_RIGHT", "selectNextColumn",
1246: "shift TAB", "selectPreviousColumnCell",
1247: "ctrl A", "selectAll",
1248: "shift ENTER", "selectPreviousRowCell",
1249: "shift KP_DOWN", "selectNextRowExtendSelection",
1250: "shift KP_LEFT", "selectPreviousColumnExtendSelection",
1251: "ESCAPE", "cancel",
1252: "ctrl shift PAGE_UP", "scrollLeftExtendSelection",
1253: "shift KP_RIGHT", "selectNextColumnExtendSelection",
1254: "ctrl PAGE_UP", "scrollLeftChangeSelection",
1255: "shift PAGE_UP", "scrollUpExtendSelection",
1256: "ctrl shift PAGE_DOWN", "scrollRightExtendSelection",
1257: "ctrl PAGE_DOWN", "scrollRightChangeSelection",
1258: "PAGE_UP", "scrollUpChangeSelection",
1259: "ctrl shift LEFT", "selectPreviousColumnExtendSelection",
1260: "shift KP_UP", "selectPreviousRowExtendSelection",
1261: "ctrl shift UP", "selectPreviousRowExtendSelection",
1262: "ctrl shift RIGHT", "selectNextColumnExtendSelection",
1263: "ctrl shift KP_RIGHT", "selectNextColumnExtendSelection",
1264: "ctrl shift DOWN", "selectNextRowExtendSelection",
1265: "ctrl BACK_SLASH", "clearSelection",
1266: "ctrl shift KP_UP", "selectPreviousRowExtendSelection",
1267: "ctrl shift KP_LEFT", "selectPreviousColumnExtendSelection",
1268: "ctrl SLASH", "selectAll",
1269: "ctrl shift KP_DOWN", "selectNextRowExtendSelection",
1270: }),
1271: "Table.background", new ColorUIResource(new ColorUIResource(255, 255, 255)),
1272: "Table.focusCellBackground", new ColorUIResource(new ColorUIResource(255, 255, 255)),
1273: "Table.focusCellForeground", new ColorUIResource(new ColorUIResource(0, 0, 0)),
1274: "Table.focusCellHighlightBorder",
1275: new BorderUIResource.LineBorderUIResource(
1276: new ColorUIResource(255, 255, 0)),
1277: "Table.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1278: "Table.foreground", new ColorUIResource(new ColorUIResource(0, 0, 0)),
1279: "Table.gridColor", new ColorUIResource(new ColorUIResource(128, 128, 128)),
1280: "Table.scrollPaneBorder", new BorderUIResource.BevelBorderUIResource(0),
1281: "Table.selectionBackground", new ColorUIResource(new ColorUIResource(0, 0, 128)),
1282: "Table.selectionForeground", new ColorUIResource(new ColorUIResource(255, 255, 255)),
1283: "TableHeader.background", new ColorUIResource(new ColorUIResource(192, 192, 192)),
1284: "TableHeader.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1285: "TableHeader.foreground", new ColorUIResource(new ColorUIResource(0, 0, 0)),
1286:
1287: "TextArea.background", new ColorUIResource(light),
1288: "TextArea.border", new BorderUIResource(BasicBorders.getMarginBorder()),
1289: "TextArea.caretBlinkRate", new Integer(500),
1290: "TextArea.caretForeground", new ColorUIResource(Color.black),
1291: "TextArea.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12),
1292: "TextArea.foreground", new ColorUIResource(Color.black),
1293: "TextArea.inactiveForeground", new ColorUIResource(Color.gray),
1294: "TextArea.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
1295: KeyStroke.getKeyStroke("shift UP"), "selection-up",
1296: KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word",
1297: KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
1298: KeyStroke.getKeyStroke("shift KP_UP"), "selection-up",
1299: KeyStroke.getKeyStroke("DOWN"), "caret-down",
1300: KeyStroke.getKeyStroke("shift ctrl T"), "previous-link-action",
1301: KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word",
1302: KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
1303: KeyStroke.getKeyStroke("END"), "caret-end-line",
1304: KeyStroke.getKeyStroke("shift PAGE_UP"), "selection-page-up",
1305: KeyStroke.getKeyStroke("KP_UP"), "caret-up",
1306: KeyStroke.getKeyStroke("DELETE"), "delete-next",
1307: KeyStroke.getKeyStroke("ctrl HOME"), "caret-begin",
1308: KeyStroke.getKeyStroke("shift LEFT"), "selection-backward",
1309: KeyStroke.getKeyStroke("ctrl END"), "caret-end",
1310: KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
1311: KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word",
1312: KeyStroke.getKeyStroke("LEFT"), "caret-backward",
1313: KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
1314: KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
1315: KeyStroke.getKeyStroke("ctrl SPACE"), "activate-link-action",
1316: KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
1317: KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
1318: KeyStroke.getKeyStroke("ENTER"), "insert-break",
1319: KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
1320: KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
1321: KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "selection-page-left",
1322: KeyStroke.getKeyStroke("shift DOWN"), "selection-down",
1323: KeyStroke.getKeyStroke("PAGE_DOWN"), "page-down",
1324: KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
1325: KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
1326: KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
1327: KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "selection-page-right",
1328: KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
1329: KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word",
1330: KeyStroke.getKeyStroke("shift END"), "selection-end-line",
1331: KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word",
1332: KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
1333: KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
1334: KeyStroke.getKeyStroke("KP_DOWN"), "caret-down",
1335: KeyStroke.getKeyStroke("ctrl A"), "select-all",
1336: KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
1337: KeyStroke.getKeyStroke("shift ctrl END"), "selection-end",
1338: KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
1339: KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word",
1340: KeyStroke.getKeyStroke("ctrl T"), "next-link-action",
1341: KeyStroke.getKeyStroke("shift KP_DOWN"), "selection-down",
1342: KeyStroke.getKeyStroke("TAB"), "insert-tab",
1343: KeyStroke.getKeyStroke("UP"), "caret-up",
1344: KeyStroke.getKeyStroke("shift ctrl HOME"), "selection-begin",
1345: KeyStroke.getKeyStroke("shift PAGE_DOWN"), "selection-page-down",
1346: KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
1347: KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word",
1348: KeyStroke.getKeyStroke("PAGE_UP"), "page-up",
1349: KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard"
1350: }),
1351: "TextArea.margin", new InsetsUIResource(0, 0, 0, 0),
1352: "TextArea.selectionBackground", new ColorUIResource(Color.black),
1353: "TextArea.selectionForeground", new ColorUIResource(Color.white),
1354: "TextField.background", new ColorUIResource(light),
1355: "TextField.border", new BasicBorders.FieldBorder(null, null, null, null),
1356: "TextField.caretBlinkRate", new Integer(500),
1357: "TextField.caretForeground", new ColorUIResource(Color.black),
1358: "TextField.darkShadow", new ColorUIResource(shadow),
1359: "TextField.font", new FontUIResource("SansSerif", Font.PLAIN, 12),
1360: "TextField.foreground", new ColorUIResource(Color.black),
1361: "TextField.highlight", new ColorUIResource(highLight),
1362: "TextField.inactiveBackground", new ColorUIResource(Color.LIGHT_GRAY),
1363: "TextField.inactiveForeground", new ColorUIResource(Color.GRAY),
1364: "TextField.light", new ColorUIResource(highLight),
1365: "TextField.highlight", new ColorUIResource(light),
1366: "TextField.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
1367: KeyStroke.getKeyStroke("ENTER"), "notify-field-accept",
1368: KeyStroke.getKeyStroke("LEFT"), "caret-backward",
1369: KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
1370: KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
1371: KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
1372: KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
1373: KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
1374: KeyStroke.getKeyStroke("shift LEFT"), "selection-backward",
1375: KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
1376: KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
1377: KeyStroke.getKeyStroke("END"), "caret-end-line",
1378: KeyStroke.getKeyStroke("DELETE"), "delete-next",
1379: KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
1380: KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
1381: KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
1382: KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
1383: KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
1384: KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word",
1385: KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
1386: KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
1387: KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
1388: KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word",
1389: KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word",
1390: KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard",
1391: KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word",
1392: KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
1393: KeyStroke.getKeyStroke("ctrl A"), "select-all",
1394: KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
1395: KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
1396: KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word",
1397: KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word",
1398: KeyStroke.getKeyStroke("shift END"), "selection-end-line",
1399: KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word"
1400: }),
1401: "TextField.margin", new InsetsUIResource(0, 0, 0, 0),
1402: "TextField.selectionBackground", new ColorUIResource(Color.black),
1403: "TextField.selectionForeground", new ColorUIResource(Color.white),
1404: "TextPane.background", new ColorUIResource(Color.white),
1405: "TextPane.border", BasicBorders.getMarginBorder(),
1406: "TextPane.caretBlinkRate", new Integer(500),
1407: "TextPane.caretForeground", new ColorUIResource(Color.black),
1408: "TextPane.font", new FontUIResource("Serif", Font.PLAIN, 12),
1409: "TextPane.foreground", new ColorUIResource(Color.black),
1410: "TextPane.inactiveForeground", new ColorUIResource(Color.gray),
1411: "TextPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
1412: KeyStroke.getKeyStroke("shift UP"), "selection-up",
1413: KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word",
1414: KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
1415: KeyStroke.getKeyStroke("shift KP_UP"), "selection-up",
1416: KeyStroke.getKeyStroke("DOWN"), "caret-down",
1417: KeyStroke.getKeyStroke("shift ctrl T"), "previous-link-action",
1418: KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word",
1419: KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
1420: KeyStroke.getKeyStroke("END"), "caret-end-line",
1421: KeyStroke.getKeyStroke("shift PAGE_UP"), "selection-page-up",
1422: KeyStroke.getKeyStroke("KP_UP"), "caret-up",
1423: KeyStroke.getKeyStroke("DELETE"), "delete-next",
1424: KeyStroke.getKeyStroke("ctrl HOME"), "caret-begin",
1425: KeyStroke.getKeyStroke("shift LEFT"), "selection-backward",
1426: KeyStroke.getKeyStroke("ctrl END"), "caret-end",
1427: KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
1428: KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word",
1429: KeyStroke.getKeyStroke("LEFT"), "caret-backward",
1430: KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
1431: KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
1432: KeyStroke.getKeyStroke("ctrl SPACE"), "activate-link-action",
1433: KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
1434: KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
1435: KeyStroke.getKeyStroke("ENTER"), "insert-break",
1436: KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
1437: KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
1438: KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "selection-page-left",
1439: KeyStroke.getKeyStroke("shift DOWN"), "selection-down",
1440: KeyStroke.getKeyStroke("PAGE_DOWN"), "page-down",
1441: KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
1442: KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
1443: KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
1444: KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "selection-page-right",
1445: KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
1446: KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word",
1447: KeyStroke.getKeyStroke("shift END"), "selection-end-line",
1448: KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word",
1449: KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
1450: KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
1451: KeyStroke.getKeyStroke("KP_DOWN"), "caret-down",
1452: KeyStroke.getKeyStroke("ctrl A"), "select-all",
1453: KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
1454: KeyStroke.getKeyStroke("shift ctrl END"), "selection-end",
1455: KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
1456: KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word",
1457: KeyStroke.getKeyStroke("ctrl T"), "next-link-action",
1458: KeyStroke.getKeyStroke("shift KP_DOWN"), "selection-down",
1459: KeyStroke.getKeyStroke("TAB"), "insert-tab",
1460: KeyStroke.getKeyStroke("UP"), "caret-up",
1461: KeyStroke.getKeyStroke("shift ctrl HOME"), "selection-begin",
1462: KeyStroke.getKeyStroke("shift PAGE_DOWN"), "selection-page-down",
1463: KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
1464: KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word",
1465: KeyStroke.getKeyStroke("PAGE_UP"), "page-up",
1466: KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard"
1467: }),
1468: "TextPane.margin", new InsetsUIResource(3, 3, 3, 3),
1469: "TextPane.selectionBackground", new ColorUIResource(Color.black),
1470: "TextPane.selectionForeground", new ColorUIResource(Color.white),
1471: "TitledBorder.border", new BorderUIResource.EtchedBorderUIResource(),
1472: "TitledBorder.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1473: "TitledBorder.titleColor", new ColorUIResource(darkShadow),
1474: "ToggleButton.background", new ColorUIResource(light),
1475: "ToggleButton.border",
1476: new BorderUIResource.CompoundBorderUIResource(null, null),
1477: "ToggleButton.darkShadow", new ColorUIResource(shadow),
1478: "ToggleButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
1479: KeyStroke.getKeyStroke("SPACE"), "pressed",
1480: KeyStroke.getKeyStroke("released SPACE"), "released"
1481: }),
1482: "ToggleButton.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1483: "ToggleButton.foreground", new ColorUIResource(darkShadow),
1484: "ToggleButton.highlight", new ColorUIResource(highLight),
1485: "ToggleButton.light", new ColorUIResource(light),
1486: "ToggleButton.margin", new InsetsUIResource(2, 14, 2, 14),
1487: "ToggleButton.shadow", new ColorUIResource(shadow),
1488: "ToggleButton.textIconGap", new Integer(4),
1489: "ToggleButton.textShiftOffset", new Integer(0),
1490: "ToolBar.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
1491: "UP", "navigateUp",
1492: "KP_UP", "navigateUp",
1493: "DOWN", "navigateDown",
1494: "KP_DOWN", "navigateDown",
1495: "LEFT", "navigateLeft",
1496: "KP_LEFT", "navigateLeft",
1497: "RIGHT", "navigateRight",
1498: "KP_RIGHT", "navigateRight"
1499: }),
1500: "ToolBar.background", new ColorUIResource(light),
1501: "ToolBar.border", new BorderUIResource.EtchedBorderUIResource(),
1502: "ToolBar.darkShadow", new ColorUIResource(shadow),
1503: "ToolBar.dockingBackground", new ColorUIResource(light),
1504: "ToolBar.dockingForeground", new ColorUIResource(Color.red),
1505: "ToolBar.floatingBackground", new ColorUIResource(light),
1506: "ToolBar.floatingForeground", new ColorUIResource(Color.darkGray),
1507: "ToolBar.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1508: "ToolBar.foreground", new ColorUIResource(darkShadow),
1509: "ToolBar.highlight", new ColorUIResource(highLight),
1510: "ToolBar.light", new ColorUIResource(highLight),
1511: "ToolBar.separatorSize", new DimensionUIResource(10, 10),
1512: "ToolBar.shadow", new ColorUIResource(shadow),
1513: "ToolTip.background", new ColorUIResource(light),
1514: "ToolTip.border", new BorderUIResource.LineBorderUIResource(Color.lightGray),
1515: "ToolTip.font", new FontUIResource("SansSerif", Font.PLAIN, 12),
1516: "ToolTip.foreground", new ColorUIResource(darkShadow),
1517: "Tree.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
1518: "ESCAPE", "cancel"
1519: }),
1520: "Tree.background", new ColorUIResource(new Color(255, 255, 255)),
1521: "Tree.changeSelectionWithFocus", Boolean.TRUE,
1522: "Tree.drawsFocusBorderAroundIcon", Boolean.FALSE,
1523: "Tree.editorBorder", new BorderUIResource.LineBorderUIResource(Color.lightGray),
1524: "Tree.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
1525: KeyStroke.getKeyStroke("ctrl DOWN"), "selectNextChangeLead",
1526: KeyStroke.getKeyStroke("shift UP"), "selectPreviousExtendSelection",
1527: KeyStroke.getKeyStroke("ctrl RIGHT"), "scrollRight",
1528: KeyStroke.getKeyStroke("shift KP_UP"), "selectPreviousExtendSelection",
1529: KeyStroke.getKeyStroke("DOWN"), "selectNext",
1530: KeyStroke.getKeyStroke("ctrl UP"), "selectPreviousChangeLead",
1531: KeyStroke.getKeyStroke("ctrl LEFT"), "scrollLeft",
1532: KeyStroke.getKeyStroke("CUT"), "cut",
1533: KeyStroke.getKeyStroke("END"), "selectLast",
1534: KeyStroke.getKeyStroke("shift PAGE_UP"), "scrollUpExtendSelection",
1535: KeyStroke.getKeyStroke("KP_UP"), "selectPrevious",
1536: KeyStroke.getKeyStroke("shift ctrl UP"), "selectPreviousExtendSelection",
1537: KeyStroke.getKeyStroke("ctrl HOME"), "selectFirstChangeLead",
1538: KeyStroke.getKeyStroke("ctrl END"), "selectLastChangeLead",
1539: KeyStroke.getKeyStroke("ctrl PAGE_DOWN"), "scrollDownChangeLead",
1540: KeyStroke.getKeyStroke("LEFT"), "selectParent",
1541: KeyStroke.getKeyStroke("ctrl PAGE_UP"), "scrollUpChangeLead",
1542: KeyStroke.getKeyStroke("KP_LEFT"), "selectParent",
1543: KeyStroke.getKeyStroke("SPACE"), "addToSelection",
1544: KeyStroke.getKeyStroke("ctrl SPACE"), "toggleAndAnchor",
1545: KeyStroke.getKeyStroke("shift SPACE"), "extendTo",
1546: KeyStroke.getKeyStroke("shift ctrl SPACE"), "moveSelectionTo",
1547: KeyStroke.getKeyStroke("ADD"), "expand",
1548: KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "clearSelection",
1549: KeyStroke.getKeyStroke("shift ctrl DOWN"), "selectNextExtendSelection",
1550: KeyStroke.getKeyStroke("shift HOME"), "selectFirstExtendSelection",
1551: KeyStroke.getKeyStroke("RIGHT"), "selectChild",
1552: KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "scrollUpExtendSelection",
1553: KeyStroke.getKeyStroke("shift DOWN"), "selectNextExtendSelection",
1554: KeyStroke.getKeyStroke("PAGE_DOWN"), "scrollDownChangeSelection",
1555: KeyStroke.getKeyStroke("shift ctrl KP_UP"), "selectPreviousExtendSelection",
1556: KeyStroke.getKeyStroke("SUBTRACT"), "collapse",
1557: KeyStroke.getKeyStroke("ctrl X"), "cut",
1558: KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "scrollDownExtendSelection",
1559: KeyStroke.getKeyStroke("ctrl SLASH"), "selectAll",
1560: KeyStroke.getKeyStroke("ctrl C"), "copy",
1561: KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "scrollRight",
1562: KeyStroke.getKeyStroke("shift END"), "selectLastExtendSelection",
1563: KeyStroke.getKeyStroke("shift ctrl KP_DOWN"), "selectNextExtendSelection",
1564: KeyStroke.getKeyStroke("ctrl KP_LEFT"), "scrollLeft",
1565: KeyStroke.getKeyStroke("HOME"), "selectFirst",
1566: KeyStroke.getKeyStroke("ctrl V"), "paste",
1567: KeyStroke.getKeyStroke("KP_DOWN"), "selectNext",
1568: KeyStroke.getKeyStroke("ctrl A"), "selectAll",
1569: KeyStroke.getKeyStroke("ctrl KP_DOWN"), "selectNextChangeLead",
1570: KeyStroke.getKeyStroke("shift ctrl END"), "selectLastExtendSelection",
1571: KeyStroke.getKeyStroke("COPY"), "copy",
1572: KeyStroke.getKeyStroke("ctrl KP_UP"), "selectPreviousChangeLead",
1573: KeyStroke.getKeyStroke("shift KP_DOWN"), "selectNextExtendSelection",
1574: KeyStroke.getKeyStroke("UP"), "selectPrevious",
1575: KeyStroke.getKeyStroke("shift ctrl HOME"), "selectFirstExtendSelection",
1576: KeyStroke.getKeyStroke("shift PAGE_DOWN"), "scrollDownExtendSelection",
1577: KeyStroke.getKeyStroke("KP_RIGHT"), "selectChild",
1578: KeyStroke.getKeyStroke("F2"), "startEditing",
1579: KeyStroke.getKeyStroke("PAGE_UP"), "scrollUpChangeSelection",
1580: KeyStroke.getKeyStroke("PASTE"), "paste"
1581: }),
1582: "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12),
1583: "Tree.foreground", new ColorUIResource(Color.black),
1584: "Tree.hash", new ColorUIResource(new Color(128, 128, 128)),
1585: "Tree.leftChildIndent", new Integer(7),
1586: "Tree.rightChildIndent", new Integer(13),
1587: "Tree.rowHeight", new Integer(16),
1588: "Tree.scrollsOnExpand", Boolean.TRUE,
1589: "Tree.selectionBackground", new ColorUIResource(Color.black),
1590: "Tree.nonSelectionBackground", new ColorUIResource(new Color(255, 255, 255)),
1591: "Tree.selectionBorderColor", new ColorUIResource(Color.black),
1592: "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(Color.black),
1593: "Tree.selectionForeground", new ColorUIResource(new Color(255, 255, 255)),
1594: "Viewport.background", new ColorUIResource(light),
1595: "Viewport.foreground", new ColorUIResource(Color.black),
1596: "Viewport.font", new FontUIResource("Dialog", Font.PLAIN, 12)
1597: };
1598: defaults.putDefaults(uiDefaults);
1599: }
1600:
1601:
1613: protected ActionMap getAudioActionMap()
1614: {
1615: if (audioActionMap != null)
1616: audioActionMap = new ActionMap();
1617: return audioActionMap;
1618: }
1619:
1620:
1633: protected Action createAudioAction(Object key)
1634: {
1635: return new AudioAction(key);
1636: }
1637:
1638:
1646: protected void playSound(Action audioAction)
1647: {
1648: if (audioAction instanceof AudioAction)
1649: {
1650: Object[] playList = (Object[]) UIManager.get("AuditoryCues.playList");
1651: for (int i = 0; i < playList.length; ++i)
1652: {
1653: if (playList[i].equals(((AudioAction) audioAction).key))
1654: {
1655: ActionEvent ev = new ActionEvent(this,
1656: ActionEvent.ACTION_PERFORMED,
1657: (String) playList[i]);
1658: audioAction.actionPerformed(ev);
1659: break;
1660: }
1661: }
1662: }
1663: }
1664:
1665:
1668: public void initialize()
1669: {
1670: Toolkit toolkit = Toolkit.getDefaultToolkit();
1671: popupHelper = new PopupHelper();
1672: toolkit.addAWTEventListener(popupHelper, AWTEvent.MOUSE_EVENT_MASK);
1673: }
1674:
1675:
1678: public void uninitialize()
1679: {
1680: Toolkit toolkit = Toolkit.getDefaultToolkit();
1681: toolkit.removeAWTEventListener(popupHelper);
1682: popupHelper = null;
1683: }
1684: }