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