Source Code Cross Referenced for MetalLookAndFeel.java in  » Apache-Harmony-Java-SE » javax-package » javax » swing » plaf » metal » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » javax package » javax.swing.plaf.metal 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         *  Licensed to the Apache Software Foundation (ASF) under one or more
0003:         *  contributor license agreements.  See the NOTICE file distributed with
0004:         *  this work for additional information regarding copyright ownership.
0005:         *  The ASF licenses this file to You under the Apache License, Version 2.0
0006:         *  (the "License"); you may not use this file except in compliance with
0007:         *  the License.  You may obtain a copy of the License at
0008:         *
0009:         *     http://www.apache.org/licenses/LICENSE-2.0
0010:         *
0011:         *  Unless required by applicable law or agreed to in writing, software
0012:         *  distributed under the License is distributed on an "AS IS" BASIS,
0013:         *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0014:         *  See the License for the specific language governing permissions and
0015:         *  limitations under the License.
0016:         */
0017:
0018:        /**
0019:         * @author Sergey Burlak
0020:         * @version $Revision$
0021:         */package javax.swing.plaf.metal;
0022:
0023:        import java.awt.Component;
0024:
0025:        import javax.swing.JTextField;
0026:        import javax.swing.UIDefaults;
0027:        import javax.swing.UIDefaults.ActiveValue;
0028:        import javax.swing.plaf.ColorUIResource;
0029:        import javax.swing.plaf.FontUIResource;
0030:        import javax.swing.plaf.InsetsUIResource;
0031:        import javax.swing.plaf.basic.BasicLookAndFeel;
0032:        import javax.swing.text.DefaultEditorKit;
0033:
0034:        /*
0035:         * In order not to break client application UI appearence the values for insets,
0036:         * borders and other size-related keys as well as 'feel'-related values are preserved as in 1.5 release.
0037:         * Color-related values are chosen to provide consistent look of UI components.
0038:         */
0039:        public class MetalLookAndFeel extends BasicLookAndFeel {
0040:            private static final String METAL_RESOURCE_BUNDLE = "org.apache.harmony.x.swing.plaf.resources.metal.MetalResourceBundle";
0041:
0042:            private static MetalTheme metalTheme;
0043:
0044:            static {
0045:                metalTheme = new DefaultMetalTheme();
0046:            }
0047:
0048:            /**
0049:             * Initialize system color default values
0050:             * @param uiDefs defaults table
0051:             */
0052:            protected void initSystemColorDefaults(final UIDefaults uiDefs) {
0053:                super .initSystemColorDefaults(uiDefs);
0054:
0055:                Object[] systemColors = new Object[] { "activeCaption",
0056:                        getWindowTitleBackground(), "activeCaptionBorder",
0057:                        getPrimaryControlShadow(), "control", getControl(),
0058:                        "controlDkShadow", getControlDarkShadow(),
0059:                        "controlHighlight", getControlHighlight(),
0060:                        "controlLtHighlight", getControlHighlight(),
0061:                        "controlShadow", getControlShadow(), "controlText",
0062:                        getControlTextColor(), "desktop", getDesktopColor(),
0063:                        "inactiveCaption", getWindowTitleInactiveBackground(),
0064:                        "inactiveCaptionBorder", getControlShadow(),
0065:                        "inactiveCaptionText",
0066:                        getWindowTitleInactiveForeground(), "info",
0067:                        getPrimaryControl(), "infoText",
0068:                        getPrimaryControlInfo(), "menu", getMenuBackground(),
0069:                        "menuText", getMenuForeground(), "scrollbar",
0070:                        getControl(), "text", getWindowBackground(),
0071:                        "textHighlight", getTextHighlightColor(),
0072:                        "textHighlightText", getHighlightedTextColor(),
0073:                        "textInactiveText", getInactiveSystemTextColor(),
0074:                        "textText", getUserTextColor(), "window",
0075:                        getWindowBackground(), "windowBorder", getControl(),
0076:                        "windowText", getUserTextColor() };
0077:
0078:                uiDefs.putDefaults(systemColors);
0079:            }
0080:
0081:            /**
0082:             * Initialize component default values in the defaults table
0083:             * @param uiDefs defaults table
0084:             */
0085:            protected void initComponentDefaults(final UIDefaults uiDefs) {
0086:                UIDefaults.ActiveValue controlTextFont = controlTextFontActiveValue();
0087:                UIDefaults.ActiveValue menuTextFont = menuTextFontActiveValue();
0088:                UIDefaults.ActiveValue userTextFont = userTextFontActiveValue();
0089:                UIDefaults.ActiveValue subTextFont = subTextFontActiveValue();
0090:                UIDefaults.ActiveValue windowTitleFont = windowTitleFontActiveValue();
0091:                UIDefaults.ActiveValue systemTextFont = systemTextFontActiveValue();
0092:
0093:                Object[] componentColorDefaults = new Object[] {
0094:                        "Button.disabledText", getInactiveControlTextColor(),
0095:                        "Button.focus", getFocusColor(), "Button.select",
0096:                        getControlShadow(), "CheckBox.disabledText",
0097:                        getInactiveControlTextColor(), "CheckBox.focus",
0098:                        getFocusColor(), "Checkbox.select", getControlShadow(),
0099:                        "CheckBoxMenuItem.acceleratorForeground",
0100:                        getAcceleratorForeground(),
0101:                        "CheckBoxMenuItem.acceleratorSelectionForeground",
0102:                        getAcceleratorSelectedForeground(),
0103:                        "CheckBoxMenuItem.disabledForeground",
0104:                        getMenuDisabledForeground(),
0105:                        "CheckBoxMenuItem.selectionBackground",
0106:                        getMenuSelectedBackground(),
0107:                        "CheckBoxMenuItem.selectionForeground",
0108:                        getMenuSelectedForeground(),
0109:                        "ComboBox.selectionBackground",
0110:                        getPrimaryControlShadow(),
0111:                        "ComboBox.selectionForeground", getControlTextColor(),
0112:                        "DesktopIcon.background", getControl(),
0113:                        "DesktopIcon.foreground", getControlTextColor(),
0114:                        "Label.disabledForeground",
0115:                        getInactiveSystemTextColor(), "Label.foreground",
0116:                        getSystemTextColor(), "Menu.acceleratorForeground",
0117:                        getAcceleratorForeground(),
0118:                        "Menu.acceleratorSelectionForeground",
0119:                        getAcceleratorSelectedForeground(),
0120:                        "Menu.disabledForeground", getMenuDisabledForeground(),
0121:                        "Menu.selectionBackground",
0122:                        getMenuSelectedBackground(),
0123:                        "Menu.selectionForeground",
0124:                        getMenuSelectedForeground(),
0125:                        "MenuItem.acceleratorForeground",
0126:                        getAcceleratorForeground(),
0127:                        "MenuItem.acceleratorSelectionForeground",
0128:                        getAcceleratorSelectedForeground(),
0129:                        "MenuItem.disabledForeground",
0130:                        getMenuDisabledForeground(),
0131:                        "MenuItem.selectionBackground",
0132:                        getMenuSelectedBackground(),
0133:                        "MenuItem.selectionForeground",
0134:                        getMenuSelectedForeground(),
0135:                        "OptionPane.errorDialog.border.background",
0136:                        new ColorUIResource(0x80, 0x40, 0x40),
0137:                        "OptionPane.errorDialog.titlePane.background",
0138:                        new ColorUIResource(0xE0, 0xB0, 0xB0),
0139:                        "OptionPane.errorDialog.titlePane.foreground",
0140:                        new ColorUIResource(0, 0x20, 0),
0141:                        "OptionPane.errorDialog.titlePane.shadow",
0142:                        new ColorUIResource(0xB0, 0x70, 0x70),
0143:                        "OptionPane.questionDialog.border.background",
0144:                        new ColorUIResource(0x40, 0x70, 0x40),
0145:                        "OptionPane.questionDialog.titlePane.background",
0146:                        new ColorUIResource(0xB0, 0xE0, 0xB0),
0147:                        "OptionPane.questionDialog.titlePane.foreground",
0148:                        new ColorUIResource(0, 0x20, 0),
0149:                        "OptionPane.questionDialog.titlePane.shadow",
0150:                        new ColorUIResource(0x70, 0xB0, 0x70),
0151:                        "OptionPane.warningDialog.border.background",
0152:                        new ColorUIResource(0x70, 0x70, 0x30),
0153:                        "OptionPane.warningDialog.titlePane.background",
0154:                        new ColorUIResource(0xE0, 0xE0, 0xA0),
0155:                        "OptionPane.warningDialog.titlePane.foreground",
0156:                        new ColorUIResource(0x30, 0x30, 0),
0157:                        "OptionPane.warningDialog.titlePane.shadow",
0158:                        new ColorUIResource(0xB0, 0xB0, 0x60),
0159:                        "ProgressBar.foreground", getPrimaryControlShadow(),
0160:                        "ProgressBar.selectionBackground",
0161:                        getPrimaryControlDarkShadow(),
0162:                        "RadioButton.disabledText",
0163:                        getInactiveControlTextColor(), "RadioButton.focus",
0164:                        getFocusColor(), "RadioButton.select",
0165:                        getControlShadow(),
0166:                        "RadioButtonMenuItem.acceleratorForeground",
0167:                        getAcceleratorForeground(),
0168:                        "RadioButtonMenuItem.acceleratorSelectionForeground",
0169:                        getAcceleratorSelectedForeground(),
0170:                        "RadioButtonMenuItem.disabledForeground",
0171:                        getMenuDisabledForeground(),
0172:                        "RadioButtonMenuItem.selectionBackground",
0173:                        getMenuSelectedBackground(),
0174:                        "RadioButtonMenuItem.selectionForeground",
0175:                        getMenuSelectedForeground(), "ScrollBar.background",
0176:                        getControl(), "ScrollBar.darkShadow",
0177:                        getControlDarkShadow(), "ScrollBar.highlight",
0178:                        getControlHighlight(), "ScrollBar.shadow",
0179:                        getControlShadow(), "ScrollBar.thumb",
0180:                        getPrimaryControlShadow(), "ScrollBar.thumbHighlight",
0181:                        getPrimaryControl(), "ScrollBar.thumbShadow",
0182:                        getPrimaryControlDarkShadow(), "Separator.background",
0183:                        getSeparatorBackground(), "Separator.foreground",
0184:                        getSeparatorForeground(), "Slider.focus",
0185:                        getFocusColor(), "Slider.foreground",
0186:                        getPrimaryControlShadow(), "TabbedPane.background",
0187:                        getControlShadow(), "TabbedPane.focus",
0188:                        getPrimaryControlDarkShadow(), "TabbedPane.light",
0189:                        getControl(), "TabbedPane.selected", getControl(),
0190:                        "TabbedPane.selectHighlight", getControlHighlight(),
0191:                        "TabbedPane.tabAreaBackground", getControl(),
0192:                        "Table.gridColor", getControlShadow(),
0193:                        "TitledBorder.titleColor", getSystemTextColor(),
0194:                        "ToggleButton.disabledText",
0195:                        getInactiveControlTextColor(), "ToggleButton.focus",
0196:                        getFocusColor(), "ToggleButton.select",
0197:                        getControlShadow(), "ToolBar.background",
0198:                        getMenuBackground(), "ToolBar.dockingBackground",
0199:                        getMenuBackground(), "ToolBar.dockingForeground",
0200:                        getPrimaryControlDarkShadow(),
0201:                        "ToolBar.floatingBackground", getMenuBackground(),
0202:                        "ToolBar.floatingForeground", getPrimaryControl(),
0203:                        "ToolBar.foreground", getMenuForeground(),
0204:                        "ToolTip.backgroundInactive", getControl(),
0205:                        "ToolTip.foregroundInactive", getControlDarkShadow(),
0206:                        "Tree.hash", getPrimaryControl(), "Tree.line",
0207:                        getPrimaryControl(), "Tree.selectionBorderColor",
0208:                        getFocusColor(), "Tree.textBackground",
0209:                        getWindowBackground(), };
0210:
0211:                Object[] tableAncestorInputMap = new Object[] { "ctrl C",
0212:                        "copy", "ctrl V", "paste", "ctrl X", "cut", "COPY",
0213:                        "copy", "PASTE", "paste", "CUT", "cut", "RIGHT",
0214:                        "selectNextColumn", "ctrl RIGHT",
0215:                        "selectNextColumnChangeLead", "KP_RIGHT",
0216:                        "selectNextColumn", "ctrl KP_RIGHT",
0217:                        "selectNextColumnChangeLead", "LEFT",
0218:                        "selectPreviousColumn", "ctrl LEFT",
0219:                        "selectPreviousColumnChangeLead", "KP_LEFT",
0220:                        "selectPreviousColumn", "ctrl KP_LEFT",
0221:                        "selectPreviousColumnChangeLead", "DOWN",
0222:                        "selectNextRow", "ctrl DOWN",
0223:                        "selectNextRowChangeLead", "KP_DOWN", "selectNextRow",
0224:                        "ctrl KP_DOWN", "selectNextRowChangeLead", "UP",
0225:                        "selectPreviousRow", "ctrl UP",
0226:                        "selectPreviousRowChangeLead", "KP_UP",
0227:                        "selectPreviousRow", "ctrl KP_UP",
0228:                        "selectPreviousRowChangeLead", "shift RIGHT",
0229:                        "selectNextColumnExtendSelection", "shift ctrl RIGHT",
0230:                        "selectNextColumnExtendSelection", "shift KP_RIGHT",
0231:                        "selectNextColumnExtendSelection",
0232:                        "shift ctrl KP_RIGHT",
0233:                        "selectNextColumnExtendSelection", "shift LEFT",
0234:                        "selectPreviousColumnExtendSelection",
0235:                        "shift ctrl LEFT",
0236:                        "selectPreviousColumnExtendSelection", "shift KP_LEFT",
0237:                        "selectPreviousColumnExtendSelection",
0238:                        "shift ctrl KP_LEFT",
0239:                        "selectPreviousColumnExtendSelection", "shift DOWN",
0240:                        "selectNextRowExtendSelection", "shift ctrl DOWN",
0241:                        "selectNextRowExtendSelection", "shift KP_DOWN",
0242:                        "selectNextRowExtendSelection", "shift ctrl KP_DOWN",
0243:                        "selectNextRowExtendSelection", "shift UP",
0244:                        "selectPreviousRowExtendSelection", "shift ctrl UP",
0245:                        "selectPreviousRowExtendSelection", "shift KP_UP",
0246:                        "selectPreviousRowExtendSelection", "shift ctrl KP_UP",
0247:                        "selectPreviousRowExtendSelection", "PAGE_UP",
0248:                        "scrollUpChangeSelection", "PAGE_DOWN",
0249:                        "scrollDownChangeSelection", "HOME",
0250:                        "selectFirstColumn", "END", "selectLastColumn",
0251:                        "shift PAGE_UP", "scrollUpExtendSelection",
0252:                        "shift PAGE_DOWN", "scrollDownExtendSelection",
0253:                        "shift HOME", "selectFirstColumnExtendSelection",
0254:                        "shift END", "selectLastColumnExtendSelection",
0255:                        "ctrl PAGE_UP", "scrollLeftChangeSelection",
0256:                        "ctrl PAGE_DOWN", "scrollRightChangeSelection",
0257:                        "ctrl HOME", "selectFirstRow", "ctrl END",
0258:                        "selectLastRow", "ctrl shift PAGE_UP",
0259:                        "scrollRightExtendSelection", "ctrl shift PAGE_DOWN",
0260:                        "scrollLeftExtendSelection", "ctrl shift HOME",
0261:                        "selectFirstRowExtendSelection", "ctrl shift END",
0262:                        "selectLastRowExtendSelection", "TAB",
0263:                        "selectNextColumnCell", "shift TAB",
0264:                        "selectPreviousColumnCell", "ENTER",
0265:                        "selectNextRowCell", "shift ENTER",
0266:                        "selectPreviousRowCell", "ctrl A", "selectAll",
0267:                        "ctrl SLASH", "selectAll", "ctrl BACK_SLASH",
0268:                        "clearSelection", "F2", "startEditing", "ESCAPE",
0269:                        "cancel", "SPACE", "addToSelection", "ctrl SPACE",
0270:                        "toggleAndAnchor", "shift ctrl SPACE",
0271:                        "moveSelectionTo", "shift SPACE", "extendTo" };
0272:                Object[] editorPaneFocusInputMap = new Object[] { "ctrl C",
0273:                        DefaultEditorKit.copyAction, "ctrl V",
0274:                        DefaultEditorKit.pasteAction, "ctrl X",
0275:                        DefaultEditorKit.cutAction, "COPY",
0276:                        DefaultEditorKit.copyAction, "PASTE",
0277:                        DefaultEditorKit.pasteAction, "CUT",
0278:                        DefaultEditorKit.cutAction, "shift LEFT",
0279:                        DefaultEditorKit.selectionBackwardAction,
0280:                        "shift KP_LEFT",
0281:                        DefaultEditorKit.selectionBackwardAction,
0282:                        "shift RIGHT", DefaultEditorKit.selectionForwardAction,
0283:                        "shift KP_RIGHT",
0284:                        DefaultEditorKit.selectionForwardAction, "ctrl LEFT",
0285:                        DefaultEditorKit.previousWordAction, "ctrl KP_LEFT",
0286:                        DefaultEditorKit.previousWordAction, "ctrl RIGHT",
0287:                        DefaultEditorKit.nextWordAction, "ctrl KP_RIGHT",
0288:                        DefaultEditorKit.nextWordAction, "ctrl shift LEFT",
0289:                        DefaultEditorKit.selectionPreviousWordAction,
0290:                        "ctrl shift KP_LEFT",
0291:                        DefaultEditorKit.selectionPreviousWordAction,
0292:                        "ctrl shift RIGHT",
0293:                        DefaultEditorKit.selectionNextWordAction,
0294:                        "ctrl shift KP_RIGHT",
0295:                        DefaultEditorKit.selectionNextWordAction, "ctrl A",
0296:                        DefaultEditorKit.selectAllAction, "HOME",
0297:                        DefaultEditorKit.beginLineAction, "END",
0298:                        DefaultEditorKit.endLineAction, "shift HOME",
0299:                        DefaultEditorKit.selectionBeginLineAction, "shift END",
0300:                        DefaultEditorKit.selectionEndLineAction, "UP",
0301:                        DefaultEditorKit.upAction, "KP_UP",
0302:                        DefaultEditorKit.upAction, "DOWN",
0303:                        DefaultEditorKit.downAction, "KP_DOWN",
0304:                        DefaultEditorKit.downAction, "PAGE_UP",
0305:                        DefaultEditorKit.pageUpAction, "PAGE_DOWN",
0306:                        DefaultEditorKit.pageDownAction, "shift PAGE_UP",
0307:                        "selection-page-up", "shift PAGE_DOWN",
0308:                        "selection-page-down", "ctrl shift PAGE_UP",
0309:                        "selection-page-left", "ctrl shift PAGE_DOWN",
0310:                        "selection-page-right", "shift UP",
0311:                        DefaultEditorKit.selectionUpAction, "shift KP_UP",
0312:                        DefaultEditorKit.selectionUpAction, "shift DOWN",
0313:                        DefaultEditorKit.selectionDownAction, "shift KP_DOWN",
0314:                        DefaultEditorKit.selectionDownAction, "ENTER",
0315:                        DefaultEditorKit.insertBreakAction, "BACK_SPACE",
0316:                        DefaultEditorKit.deletePrevCharAction, "ctrl H",
0317:                        DefaultEditorKit.deletePrevCharAction, "DELETE",
0318:                        DefaultEditorKit.deleteNextCharAction, "RIGHT",
0319:                        DefaultEditorKit.forwardAction, "LEFT",
0320:                        DefaultEditorKit.backwardAction, "KP_RIGHT",
0321:                        DefaultEditorKit.forwardAction, "KP_LEFT",
0322:                        DefaultEditorKit.backwardAction, "TAB",
0323:                        DefaultEditorKit.insertTabAction, "ctrl BACK_SLASH",
0324:                        "unselect", "ctrl HOME", DefaultEditorKit.beginAction,
0325:                        "ctrl END", DefaultEditorKit.endAction,
0326:                        "ctrl shift HOME",
0327:                        DefaultEditorKit.selectionBeginAction,
0328:                        "ctrl shift END", DefaultEditorKit.selectionEndAction,
0329:                        "ctrl T", "next-link-action", "ctrl shift T",
0330:                        "previous-link-action", "ctrl SPACE",
0331:                        "activate-link-action", "control shift O",
0332:                        "toggle-componentOrientation" };
0333:                Object[] comboBoxAncestorInputMap = new Object[] { "ESCAPE",
0334:                        "hidePopup", "PAGE_UP", "pageUpPassThrough",
0335:                        "PAGE_DOWN", "pageDownPassThrough", "HOME",
0336:                        "homePassThrough", "END", "endPassThrough", "DOWN",
0337:                        "selectNext", "KP_DOWN", "selectNext", "alt DOWN",
0338:                        "togglePopup", "alt KP_DOWN", "togglePopup", "alt UP",
0339:                        "togglePopup", "alt KP_UP", "togglePopup", "SPACE",
0340:                        "spacePopup", "ENTER", "enterPressed", "UP",
0341:                        "selectPrevious", "KP_UP", "selectPrevious" };
0342:                Object[] desktopAncestorInputMap = new Object[] { "ctrl F5",
0343:                        "restore", "ctrl F4", "close", "ctrl F7", "move",
0344:                        "ctrl F8", "resize", "RIGHT", "right", "KP_RIGHT",
0345:                        "right", "shift RIGHT", "shrinkRight",
0346:                        "shift KP_RIGHT", "shrinkRight", "LEFT", "left",
0347:                        "KP_LEFT", "left", "shift LEFT", "shrinkLeft",
0348:                        "shift KP_LEFT", "shrinkLeft", "UP", "up", "KP_UP",
0349:                        "up", "shift UP", "shrinkUp", "shift KP_UP",
0350:                        "shrinkUp", "DOWN", "down", "KP_DOWN", "down",
0351:                        "shift DOWN", "shrinkDown", "shift KP_DOWN",
0352:                        "shrinkDown", "ESCAPE", "escape", "ctrl F9",
0353:                        "minimize", "ctrl F10", "maximize", "ctrl F6",
0354:                        "selectNextFrame", "ctrl TAB", "selectNextFrame",
0355:                        "ctrl alt F6", "selectNextFrame", "shift ctrl alt F6",
0356:                        "selectPreviousFrame", "ctrl F12", "navigateNext",
0357:                        "shift ctrl F12", "navigatePrevious" };
0358:                Object[] auditoryCuesDefaultCueList = new Object[] {
0359:                        "OptionPane.errorSound", "OptionPane.informationSound",
0360:                        "OptionPane.questionSound", "OptionPane.warningSound" };
0361:                Object[] formattedTextFieldFocusInputMap = new Object[] {
0362:                        "ctrl C", DefaultEditorKit.copyAction, "ctrl V",
0363:                        DefaultEditorKit.pasteAction, "ctrl X",
0364:                        DefaultEditorKit.cutAction, "COPY",
0365:                        DefaultEditorKit.copyAction, "PASTE",
0366:                        DefaultEditorKit.pasteAction, "CUT",
0367:                        DefaultEditorKit.cutAction, "shift LEFT",
0368:                        DefaultEditorKit.selectionBackwardAction,
0369:                        "shift KP_LEFT",
0370:                        DefaultEditorKit.selectionBackwardAction,
0371:                        "shift RIGHT", DefaultEditorKit.selectionForwardAction,
0372:                        "shift KP_RIGHT",
0373:                        DefaultEditorKit.selectionForwardAction, "ctrl LEFT",
0374:                        DefaultEditorKit.previousWordAction, "ctrl KP_LEFT",
0375:                        DefaultEditorKit.previousWordAction, "ctrl RIGHT",
0376:                        DefaultEditorKit.nextWordAction, "ctrl KP_RIGHT",
0377:                        DefaultEditorKit.nextWordAction, "ctrl shift LEFT",
0378:                        DefaultEditorKit.selectionPreviousWordAction,
0379:                        "ctrl shift KP_LEFT",
0380:                        DefaultEditorKit.selectionPreviousWordAction,
0381:                        "ctrl shift RIGHT",
0382:                        DefaultEditorKit.selectionNextWordAction,
0383:                        "ctrl shift KP_RIGHT",
0384:                        DefaultEditorKit.selectionNextWordAction, "ctrl A",
0385:                        DefaultEditorKit.selectAllAction, "HOME",
0386:                        DefaultEditorKit.beginLineAction, "END",
0387:                        DefaultEditorKit.endLineAction, "shift HOME",
0388:                        DefaultEditorKit.selectionBeginLineAction, "shift END",
0389:                        DefaultEditorKit.selectionEndLineAction, "BACK_SPACE",
0390:                        DefaultEditorKit.deletePrevCharAction, "ctrl H",
0391:                        DefaultEditorKit.deletePrevCharAction, "DELETE",
0392:                        DefaultEditorKit.deleteNextCharAction, "RIGHT",
0393:                        DefaultEditorKit.forwardAction, "LEFT",
0394:                        DefaultEditorKit.backwardAction, "KP_RIGHT",
0395:                        DefaultEditorKit.forwardAction, "KP_LEFT",
0396:                        DefaultEditorKit.backwardAction, "ENTER",
0397:                        JTextField.notifyAction, "ctrl BACK_SLASH", "unselect",
0398:                        "control shift O", "toggle-componentOrientation",
0399:                        "ESCAPE", "reset-field-edit", "UP", "increment",
0400:                        "KP_UP", "increment", "DOWN", "decrement", "KP_DOWN",
0401:                        "decrement" };
0402:                Object[] treeFocusInputMap = new Object[] { "ctrl C", "copy",
0403:                        "ctrl V", "paste", "ctrl X", "cut", "COPY", "copy",
0404:                        "PASTE", "paste", "CUT", "cut", "UP", "selectPrevious",
0405:                        "KP_UP", "selectPrevious", "shift UP",
0406:                        "selectPreviousExtendSelection", "shift ctrl UP",
0407:                        "selectPreviousExtendSelection", "shift KP_UP",
0408:                        "selectPreviousExtendSelection", "shift ctrl KP_UP",
0409:                        "selectPreviousExtendSelection", "DOWN", "selectNext",
0410:                        "KP_DOWN", "selectNext", "shift DOWN",
0411:                        "selectNextExtendSelection", "shift ctrl DOWN",
0412:                        "selectNextExtendSelection", "shift KP_DOWN",
0413:                        "selectNextExtendSelection", "shift ctrl KP_DOWN",
0414:                        "selectNextExtendSelection", "RIGHT", "selectChild",
0415:                        "KP_RIGHT", "selectChild", "LEFT", "selectParent",
0416:                        "KP_LEFT", "selectParent", "PAGE_UP",
0417:                        "scrollUpChangeSelection", "shift PAGE_UP",
0418:                        "scrollUpExtendSelection", "PAGE_DOWN",
0419:                        "scrollDownChangeSelection", "shift PAGE_DOWN",
0420:                        "scrollDownExtendSelection", "HOME", "selectFirst",
0421:                        "shift HOME", "selectFirstExtendSelection",
0422:                        "shift ctrl HOME", "selectFirstExtendSelection", "END",
0423:                        "selectLast", "shift END", "selectLastExtendSelection",
0424:                        "shift ctrl END", "selectLastExtendSelection", "F2",
0425:                        "startEditing", "ctrl A", "selectAll", "ctrl SLASH",
0426:                        "selectAll", "ctrl BACK_SLASH", "clearSelection",
0427:                        "ctrl SPACE", "toggleSelectionPreserveAnchor",
0428:                        "shift SPACE", "extendSelection", "ctrl HOME",
0429:                        "selectFirstChangeLead", "ctrl END",
0430:                        "selectLastChangeLead", "ctrl UP",
0431:                        "selectPreviousChangeLead", "ctrl KP_UP",
0432:                        "selectPreviousChangeLead", "ctrl DOWN",
0433:                        "selectNextChangeLead", "ctrl KP_DOWN",
0434:                        "selectNextChangeLead", "ctrl PAGE_DOWN",
0435:                        "scrollDownChangeLead", "ctrl shift PAGE_DOWN",
0436:                        "scrollDownExtendSelection", "ctrl PAGE_UP",
0437:                        "scrollUpChangeLead", "ctrl shift PAGE_UP",
0438:                        "scrollUpExtendSelection", "ctrl LEFT", "scrollLeft",
0439:                        "ctrl KP_LEFT", "scrollLeft", "ctrl RIGHT",
0440:                        "scrollRight", "ctrl KP_RIGHT", "scrollRight", "ADD",
0441:                        "expand", "SUBTRACT", "collapse", "SPACE",
0442:                        "toggleSelectionPreserveAnchor", "shift ctrl SPACE",
0443:                        "moveSelectionTo" };
0444:                Object[] listFocusInputMap = new Object[] { "ctrl C", "copy",
0445:                        "ctrl V", "paste", "ctrl X", "cut", "COPY", "copy",
0446:                        "PASTE", "paste", "CUT", "cut", "UP",
0447:                        "selectPreviousRow", "KP_UP", "selectPreviousRow",
0448:                        "shift UP", "selectPreviousRowExtendSelection",
0449:                        "shift ctrl UP", "selectPreviousRowExtendSelection",
0450:                        "shift KP_UP", "selectPreviousRowExtendSelection",
0451:                        "shift ctrl KP_UP", "selectPreviousRowExtendSelection",
0452:                        "DOWN", "selectNextRow", "KP_DOWN", "selectNextRow",
0453:                        "ctrl DOWN", "selectNextRowChangeLead", "ctrl KP_DOWN",
0454:                        "selectNextRowChangeLead", "shift DOWN",
0455:                        "selectNextRowExtendSelection", "shift ctrl DOWN",
0456:                        "selectNextRowExtendSelection", "shift KP_DOWN",
0457:                        "selectNextRowExtendSelection", "shift ctrl KP_DOWN",
0458:                        "selectNextRowExtendSelection", "LEFT",
0459:                        "selectPreviousColumn", "KP_LEFT",
0460:                        "selectPreviousColumn", "ctrl LEFT",
0461:                        "selectPreviousColumnChangeLead", "ctrl KP_LEFT",
0462:                        "selectPreviousColumnChangeLead", "shift LEFT",
0463:                        "selectPreviousColumnExtendSelection",
0464:                        "shift ctrl LEFT",
0465:                        "selectPreviousColumnExtendSelection", "shift KP_LEFT",
0466:                        "selectPreviousColumnExtendSelection",
0467:                        "shift ctrl KP_LEFT",
0468:                        "selectPreviousColumnExtendSelection", "RIGHT",
0469:                        "selectNextColumn", "KP_RIGHT", "selectNextColumn",
0470:                        "ctrl RIGHT", "selectNextColumnChangeLead",
0471:                        "ctrl KP_RIGHT", "selectNextColumnChangeLead",
0472:                        "shift RIGHT", "selectNextColumnExtendSelection",
0473:                        "shift ctrl RIGHT", "selectNextColumnExtendSelection",
0474:                        "shift KP_RIGHT", "selectNextColumnExtendSelection",
0475:                        "shift ctrl KP_RIGHT",
0476:                        "selectNextColumnExtendSelection", "HOME",
0477:                        "selectFirstRow", "ctrl HOME",
0478:                        "selectFirstRowChangeLead", "shift HOME",
0479:                        "selectFirstRowExtendSelection", "shift ctrl HOME",
0480:                        "selectFirstRowExtendSelection", "END",
0481:                        "selectLastRow", "ctrl END", "selectLastRowChangeLead",
0482:                        "shift END", "selectLastRowExtendSelection",
0483:                        "shift ctrl END", "selectLastRowExtendSelection",
0484:                        "PAGE_UP", "scrollUp", "ctrl PAGE_UP",
0485:                        "scrollUpChangeLead", "shift PAGE_UP",
0486:                        "scrollUpExtendSelection", "shift ctrl PAGE_UP",
0487:                        "scrollUpExtendSelection", "PAGE_DOWN", "scrollDown",
0488:                        "ctrl PAGE_DOWN", "scrollDownChangeLead",
0489:                        "shift PAGE_DOWN", "scrollDownExtendSelection",
0490:                        "shift ctrl PAGE_DOWN", "scrollDownExtendSelection",
0491:                        "ctrl A", "selectAll", "ctrl SLASH", "selectAll",
0492:                        "ctrl BACK_SLASH", "clearSelection", "ctrl UP",
0493:                        "selectPreviousRowChangeLead", "ctrl KP_UP",
0494:                        "selectPreviousRowChangeLead", "SPACE",
0495:                        "addToSelection", "ctrl SPACE", "toggleAndAnchor",
0496:                        "shift ctrl SPACE", "moveSelectionTo", "shift SPACE",
0497:                        "extendTo" };
0498:                Object[] scrollBarAncestorInputMap = new Object[] { "RIGHT",
0499:                        "positiveUnitIncrement", "KP_RIGHT",
0500:                        "positiveUnitIncrement", "DOWN",
0501:                        "positiveUnitIncrement", "KP_DOWN",
0502:                        "positiveUnitIncrement", "PAGE_DOWN",
0503:                        "positiveBlockIncrement", "LEFT",
0504:                        "negativeUnitIncrement", "KP_LEFT",
0505:                        "negativeUnitIncrement", "UP", "negativeUnitIncrement",
0506:                        "KP_UP", "negativeUnitIncrement", "PAGE_UP",
0507:                        "negativeBlockIncrement", "HOME", "minScroll", "END",
0508:                        "maxScroll" };
0509:                Object[] scrollPaneAncestorInputMap = new Object[] { "RIGHT",
0510:                        "unitScrollRight", "KP_RIGHT", "unitScrollRight",
0511:                        "DOWN", "unitScrollDown", "KP_DOWN", "unitScrollDown",
0512:                        "LEFT", "unitScrollLeft", "KP_LEFT", "unitScrollLeft",
0513:                        "UP", "unitScrollUp", "KP_UP", "unitScrollUp",
0514:                        "PAGE_UP", "scrollUp", "PAGE_DOWN", "scrollDown",
0515:                        "ctrl PAGE_UP", "scrollLeft", "ctrl PAGE_DOWN",
0516:                        "scrollRight", "ctrl HOME", "scrollHome", "ctrl END",
0517:                        "scrollEnd" };
0518:                Object[] sliderFocusInputMap = new Object[] { "RIGHT",
0519:                        "positiveUnitIncrement", "KP_RIGHT",
0520:                        "positiveUnitIncrement", "DOWN",
0521:                        "negativeUnitIncrement", "KP_DOWN",
0522:                        "negativeUnitIncrement", "PAGE_DOWN",
0523:                        "negativeBlockIncrement", "ctrl PAGE_DOWN",
0524:                        "negativeBlockIncrement", "LEFT",
0525:                        "negativeUnitIncrement", "KP_LEFT",
0526:                        "negativeUnitIncrement", "UP", "positiveUnitIncrement",
0527:                        "KP_UP", "positiveUnitIncrement", "PAGE_UP",
0528:                        "positiveBlockIncrement", "ctrl PAGE_UP",
0529:                        "positiveBlockIncrement", "HOME", "minScroll", "END",
0530:                        "maxScroll" };
0531:                Object[] splitPaneAncestorInputMap = new Object[] { "UP",
0532:                        "negativeIncrement", "DOWN", "positiveIncrement",
0533:                        "LEFT", "negativeIncrement", "RIGHT",
0534:                        "positiveIncrement", "KP_UP", "negativeIncrement",
0535:                        "KP_DOWN", "positiveIncrement", "KP_LEFT",
0536:                        "negativeIncrement", "KP_RIGHT", "positiveIncrement",
0537:                        "HOME", "selectMin", "END", "selectMax", "F8",
0538:                        "startResize", "F6", "toggleFocus", "ctrl TAB",
0539:                        "focusOutForward", "ctrl shift TAB", "focusOutBackward" };
0540:                Object[] tabbedPaneAncestorInputMap = new Object[] {
0541:                        "ctrl PAGE_DOWN", "navigatePageDown", "ctrl PAGE_UP",
0542:                        "navigatePageUp", "ctrl UP", "requestFocus",
0543:                        "ctrl KP_UP", "requestFocus" };
0544:                Object[] tabbedPaneFocusInputMap = new Object[] { "RIGHT",
0545:                        "navigateRight", "KP_RIGHT", "navigateRight", "LEFT",
0546:                        "navigateLeft", "KP_LEFT", "navigateLeft", "UP",
0547:                        "navigateUp", "KP_UP", "navigateUp", "DOWN",
0548:                        "navigateDown", "KP_DOWN", "navigateDown", "ctrl DOWN",
0549:                        "requestFocusForVisibleComponent", "ctrl KP_DOWN",
0550:                        "requestFocusForVisibleComponent" };
0551:                Object[] textFieldFocusInputMap = new Object[] { "ctrl C",
0552:                        DefaultEditorKit.copyAction, "ctrl V",
0553:                        DefaultEditorKit.pasteAction, "ctrl X",
0554:                        DefaultEditorKit.cutAction, "COPY",
0555:                        DefaultEditorKit.copyAction, "PASTE",
0556:                        DefaultEditorKit.pasteAction, "CUT",
0557:                        DefaultEditorKit.cutAction, "shift LEFT",
0558:                        DefaultEditorKit.selectionBackwardAction,
0559:                        "shift KP_LEFT",
0560:                        DefaultEditorKit.selectionBackwardAction,
0561:                        "shift RIGHT", DefaultEditorKit.selectionForwardAction,
0562:                        "shift KP_RIGHT",
0563:                        DefaultEditorKit.selectionForwardAction, "ctrl LEFT",
0564:                        DefaultEditorKit.previousWordAction, "ctrl KP_LEFT",
0565:                        DefaultEditorKit.previousWordAction, "ctrl RIGHT",
0566:                        DefaultEditorKit.nextWordAction, "ctrl KP_RIGHT",
0567:                        DefaultEditorKit.nextWordAction, "ctrl shift LEFT",
0568:                        DefaultEditorKit.selectionPreviousWordAction,
0569:                        "ctrl shift KP_LEFT",
0570:                        DefaultEditorKit.selectionPreviousWordAction,
0571:                        "ctrl shift RIGHT",
0572:                        DefaultEditorKit.selectionNextWordAction,
0573:                        "ctrl shift KP_RIGHT",
0574:                        DefaultEditorKit.selectionNextWordAction, "ctrl A",
0575:                        DefaultEditorKit.selectAllAction, "HOME",
0576:                        DefaultEditorKit.beginLineAction, "END",
0577:                        DefaultEditorKit.endLineAction, "shift HOME",
0578:                        DefaultEditorKit.selectionBeginLineAction, "shift END",
0579:                        DefaultEditorKit.selectionEndLineAction, "BACK_SPACE",
0580:                        DefaultEditorKit.deletePrevCharAction, "ctrl H",
0581:                        DefaultEditorKit.deletePrevCharAction, "DELETE",
0582:                        DefaultEditorKit.deleteNextCharAction, "RIGHT",
0583:                        DefaultEditorKit.forwardAction, "LEFT",
0584:                        DefaultEditorKit.backwardAction, "KP_RIGHT",
0585:                        DefaultEditorKit.forwardAction, "KP_LEFT",
0586:                        DefaultEditorKit.backwardAction, "ENTER",
0587:                        JTextField.notifyAction, "ctrl BACK_SLASH", "unselect",
0588:                        "control shift O", "toggle-componentOrientation" };
0589:                Object[] toolBarAncestorInputMap = new Object[] { "UP",
0590:                        "navigateUp", "KP_UP", "navigateUp", "DOWN",
0591:                        "navigateDown", "KP_DOWN", "navigateDown", "LEFT",
0592:                        "navigateLeft", "KP_LEFT", "navigateLeft", "RIGHT",
0593:                        "navigateRight", "KP_RIGHT", "navigateRight" };
0594:                Object[] componentDefaults = new Object[] {
0595:                        "AuditoryCues.defaultCueList",
0596:                        auditoryCuesDefaultCueList,
0597:                        "Button.border",
0598:                        new UIDefaults.ProxyLazyValue(
0599:                                "javax.swing.plaf.metal.MetalBorders",
0600:                                "getButtonBorder"),
0601:                        "Button.focusInputMap",
0602:                        new UIDefaults.LazyInputMap(new Object[] { "SPACE",
0603:                                "pressed", "released SPACE", "released" }),
0604:                        "Button.font",
0605:                        controlTextFont,
0606:                        "CheckBox.focusInputMap",
0607:                        new UIDefaults.LazyInputMap(new Object[] { "SPACE",
0608:                                "pressed", "released SPACE", "released" }),
0609:                        "CheckBox.font",
0610:                        controlTextFont,
0611:                        "CheckBox.icon",
0612:                        new UIDefaults.ProxyLazyValue(
0613:                                "javax.swing.plaf.metal.MetalIconFactory",
0614:                                "getCheckBoxIcon"),
0615:                        "CheckBoxMenuItem.acceleratorFont",
0616:                        subTextFont,
0617:                        "CheckBoxMenuItem.arrowIcon",
0618:                        new UIDefaults.ProxyLazyValue(
0619:                                "javax.swing.plaf.metal.MetalIconFactory",
0620:                                "getMenuItemArrowIcon"),
0621:                        "CheckBoxMenuItem.border",
0622:                        new UIDefaults.ProxyLazyValue(
0623:                                "javax.swing.plaf.metal.MetalBorders$MenuItemBorder"),
0624:                        "CheckBoxMenuItem.borderPainted",
0625:                        Boolean.TRUE,
0626:                        "CheckBoxMenuItem.checkIcon",
0627:                        new UIDefaults.ProxyLazyValue(
0628:                                "javax.swing.plaf.metal.MetalIconFactory",
0629:                                "getCheckBoxMenuItemIcon"),
0630:                        "CheckBoxMenuItem.commandSound",
0631:                        "sounds/MenuItemCommand.wav",
0632:                        "CheckBoxMenuItem.font",
0633:                        menuTextFont,
0634:                        "ComboBox.ancestorInputMap",
0635:                        new UIDefaults.LazyInputMap(comboBoxAncestorInputMap),
0636:                        "ComboBox.font",
0637:                        controlTextFont,
0638:                        "Desktop.ancestorInputMap",
0639:                        new UIDefaults.LazyInputMap(desktopAncestorInputMap),
0640:                        "DesktopIcon.border",
0641:                        new UIDefaults.ProxyLazyValue(
0642:                                "javax.swing.plaf.metal.MetalBorders",
0643:                                "getDesktopIconBorder"),
0644:                        "DesktopIcon.font",
0645:                        controlTextFont,
0646:                        "DesktopIcon.width",
0647:                        new Integer(160),
0648:                        "EditorPane.focusInputMap",
0649:                        new UIDefaults.LazyInputMap(editorPaneFocusInputMap),
0650:                        "EditorPane.font",
0651:                        userTextFont,
0652:                        "FileChooser.ancestorInputMap",
0653:                        new UIDefaults.LazyInputMap(new Object[] { "ESCAPE",
0654:                                "cancelSelection", "BACK_SPACE", "Go Up",
0655:                                "ENTER", "approveSelection" }),
0656:                        "FileChooser.detailsViewIcon",
0657:                        new UIDefaults.ProxyLazyValue(
0658:                                "javax.swing.plaf.metal.MetalIconFactory",
0659:                                "getFileChooserDetailViewIcon"),
0660:                        "FileChooser.homeFolderIcon",
0661:                        new UIDefaults.ProxyLazyValue(
0662:                                "javax.swing.plaf.metal.MetalIconFactory",
0663:                                "getFileChooserHomeFolderIcon"),
0664:                        "FileChooser.listViewIcon",
0665:                        new UIDefaults.ProxyLazyValue(
0666:                                "javax.swing.plaf.metal.MetalIconFactory",
0667:                                "getFileChooserListViewIcon"),
0668:                        "FileChooser.newFolderIcon",
0669:                        new UIDefaults.ProxyLazyValue(
0670:                                "javax.swing.plaf.metal.MetalIconFactory",
0671:                                "getFileChooserNewFolderIcon"),
0672:                        "FileChooser.upFolderIcon",
0673:                        new UIDefaults.ProxyLazyValue(
0674:                                "javax.swing.plaf.metal.MetalIconFactory",
0675:                                "getFileChooserUpFolderIcon"),
0676:                        "FileView.computerIcon",
0677:                        new UIDefaults.ProxyLazyValue(
0678:                                "javax.swing.plaf.metal.MetalIconFactory",
0679:                                "getTreeComputerIcon"),
0680:                        "FileView.directoryIcon",
0681:                        new UIDefaults.ProxyLazyValue(
0682:                                "javax.swing.plaf.metal.MetalIconFactory",
0683:                                "getTreeFolderIcon"),
0684:                        "FileView.fileIcon",
0685:                        new UIDefaults.ProxyLazyValue(
0686:                                "javax.swing.plaf.metal.MetalIconFactory",
0687:                                "getTreeLeafIcon"),
0688:                        "FileView.floppyDriveIcon",
0689:                        new UIDefaults.ProxyLazyValue(
0690:                                "javax.swing.plaf.metal.MetalIconFactory",
0691:                                "getTreeFloppyDriveIcon"),
0692:                        "FileView.hardDriveIcon",
0693:                        new UIDefaults.ProxyLazyValue(
0694:                                "javax.swing.plaf.metal.MetalIconFactory",
0695:                                "getTreeHardDriveIcon"),
0696:                        "FormattedTextField.border",
0697:                        new UIDefaults.ProxyLazyValue(
0698:                                "javax.swing.plaf.metal.MetalBorders",
0699:                                "getTextFieldBorder"),
0700:                        "FormattedTextField.focusInputMap",
0701:                        new UIDefaults.LazyInputMap(
0702:                                formattedTextFieldFocusInputMap),
0703:                        "FormattedTextField.font",
0704:                        userTextFont,
0705:                        "InternalFrame.border",
0706:                        new UIDefaults.ProxyLazyValue(
0707:                                "javax.swing.plaf.metal.MetalBorders$InternalFrameBorder"),
0708:                        "InternalFrame.closeIcon",
0709:                        new UIDefaults.ProxyLazyValue(
0710:                                "javax.swing.plaf.metal.MetalIconFactory",
0711:                                "getInternalFrameCloseIcon",
0712:                                new Object[] { new Integer(16) }),
0713:                        "InternalFrame.closeSound",
0714:                        "sounds/FrameClose.wav",
0715:                        "InternalFrame.icon",
0716:                        new UIDefaults.ProxyLazyValue(
0717:                                "javax.swing.plaf.metal.MetalIconFactory",
0718:                                "getInternalFrameDefaultMenuIcon"),
0719:                        "InternalFrame.iconifyIcon",
0720:                        new UIDefaults.ProxyLazyValue(
0721:                                "javax.swing.plaf.metal.MetalIconFactory",
0722:                                "getInternalFrameMinimizeIcon",
0723:                                new Object[] { new Integer(16) }),
0724:                        "InternalFrame.maximizeIcon",
0725:                        new UIDefaults.ProxyLazyValue(
0726:                                "javax.swing.plaf.metal.MetalIconFactory",
0727:                                "getInternalFrameMaximizeIcon",
0728:                                new Object[] { new Integer(16) }),
0729:                        "InternalFrame.maximizeSound",
0730:                        "sounds/FrameMaximize.wav",
0731:                        "InternalFrame.minimizeIcon",
0732:                        new UIDefaults.ProxyLazyValue(
0733:                                "javax.swing.plaf.metal.MetalIconFactory",
0734:                                "getInternalFrameAltMaximizeIcon",
0735:                                new Object[] { new Integer(16) }),
0736:                        "InternalFrame.minimizeSound",
0737:                        "sounds/FrameMinimize.wav",
0738:                        "InternalFrame.optionDialogBorder",
0739:                        new UIDefaults.ProxyLazyValue(
0740:                                "javax.swing.plaf.metal.MetalBorders$OptionDialogBorder"),
0741:                        "InternalFrame.paletteBorder",
0742:                        new UIDefaults.ProxyLazyValue(
0743:                                "javax.swing.plaf.metal.MetalBorders$PaletteBorder"),
0744:                        "InternalFrame.paletteCloseIcon",
0745:                        new UIDefaults.ProxyLazyValue(
0746:                                "javax.swing.plaf.metal.MetalIconFactory$PaletteCloseIcon"),
0747:                        "InternalFrame.paletteTitleHeight",
0748:                        new Integer(12),
0749:                        "InternalFrame.restoreDownSound",
0750:                        "sounds/FrameRestoreDown.wav",
0751:                        "InternalFrame.restoreUpSound",
0752:                        "sounds/FrameRestoreUp.wav",
0753:                        "InternalFrame.titleFont",
0754:                        windowTitleFont,
0755:                        "Label.font",
0756:                        controlTextFont,
0757:                        "List.focusCellHighlightBorder",
0758:                        new UIDefaults.ProxyLazyValue(
0759:                                "javax.swing.plaf.BorderUIResource$LineBorderUIResource",
0760:                                new Object[] { getPrimaryControlShadow() }),
0761:                        "List.focusInputMap",
0762:                        new UIDefaults.LazyInputMap(listFocusInputMap),
0763:                        "List.font",
0764:                        controlTextFont,
0765:                        "Menu.acceleratorFont",
0766:                        subTextFont,
0767:                        "Menu.arrowIcon",
0768:                        new UIDefaults.ProxyLazyValue(
0769:                                "javax.swing.plaf.metal.MetalIconFactory",
0770:                                "getMenuArrowIcon"),
0771:                        "Menu.border",
0772:                        new UIDefaults.ProxyLazyValue(
0773:                                "javax.swing.plaf.metal.MetalBorders$MenuItemBorder"),
0774:                        "Menu.borderPainted",
0775:                        Boolean.TRUE,
0776:                        "Menu.checkIcon",
0777:                        new UIDefaults.ProxyLazyValue(
0778:                                "javax.swing.plaf.metal.MetalIconFactory",
0779:                                "getMenuItemCheckIcon"),
0780:                        "Menu.font",
0781:                        menuTextFont,
0782:                        "Menu.menuPopupOffsetX",
0783:                        new Integer(0),
0784:                        "Menu.menuPopupOffsetY",
0785:                        new Integer(0),
0786:                        "Menu.submenuPopupOffsetX",
0787:                        new Integer(-5),
0788:                        "Menu.submenuPopupOffsetY",
0789:                        new Integer(-2),
0790:                        "MenuBar.border",
0791:                        new UIDefaults.ProxyLazyValue(
0792:                                "javax.swing.plaf.metal.MetalBorders$MenuBarBorder"),
0793:                        "MenuBar.font",
0794:                        menuTextFont,
0795:                        "MenuBar.windowBindings",
0796:                        new Object[] { "F10", "takeFocus" },
0797:                        "MenuItem.acceleratorDelimiter",
0798:                        "-",
0799:                        "MenuItem.acceleratorFont",
0800:                        subTextFont,
0801:                        "MenuItem.arrowIcon",
0802:                        new UIDefaults.ProxyLazyValue(
0803:                                "javax.swing.plaf.metal.MetalIconFactory",
0804:                                "getMenuItemArrowIcon"),
0805:                        "MenuItem.border",
0806:                        new UIDefaults.ProxyLazyValue(
0807:                                "javax.swing.plaf.metal.MetalBorders$MenuItemBorder"),
0808:                        "MenuItem.borderPainted",
0809:                        Boolean.TRUE,
0810:                        "MenuItem.checkIcon",
0811:                        new UIDefaults.ProxyLazyValue(
0812:                                "javax.swing.plaf.metal.MetalIconFactory",
0813:                                "getMenuItemCheckIcon"),
0814:                        "MenuItem.commandSound",
0815:                        "sounds/MenuItemCommand.wav",
0816:                        "MenuItem.font",
0817:                        menuTextFont,
0818:                        "OptionPane.errorSound",
0819:                        "sounds/OptionPaneError.wav",
0820:                        "OptionPane.informationSound",
0821:                        "sounds/OptionPaneInformation.wav",
0822:                        "OptionPane.questionSound",
0823:                        "sounds/OptionPaneQuestion.wav",
0824:                        "OptionPane.warningSound",
0825:                        "sounds/OptionPaneWarning.wav",
0826:                        "OptionPane.windowBindings",
0827:                        new Object[] { "ESCAPE", "close" },
0828:                        "OptionPane.errorIcon",
0829:                        makeIcon(MetalLookAndFeel.class, "icons/Error.gif"),
0830:                        "OptionPane.informationIcon",
0831:                        makeIcon(MetalLookAndFeel.class, "icons/Inform.gif"),
0832:                        "OptionPane.questionIcon",
0833:                        makeIcon(MetalLookAndFeel.class, "icons/Question.gif"),
0834:                        "OptionPane.warningIcon",
0835:                        makeIcon(MetalLookAndFeel.class, "icons/Warn.gif"),
0836:                        "PasswordField.border",
0837:                        new UIDefaults.ProxyLazyValue(
0838:                                "javax.swing.plaf.metal.MetalBorders",
0839:                                "getTextBorder"),
0840:                        "PasswordField.focusInputMap",
0841:                        new UIDefaults.LazyInputMap(textFieldFocusInputMap),
0842:                        "PasswordField.font",
0843:                        userTextFont,
0844:                        "PopupMenu.border",
0845:                        new UIDefaults.ProxyLazyValue(
0846:                                "javax.swing.plaf.metal.MetalBorders$PopupMenuBorder"),
0847:                        "PopupMenu.font",
0848:                        menuTextFont,
0849:                        "PopupMenu.popupSound",
0850:                        "sounds/PopupMenuPopup.wav",
0851:                        "ProgressBar.border",
0852:                        new UIDefaults.ProxyLazyValue(
0853:                                "javax.swing.plaf.BorderUIResource$LineBorderUIResource",
0854:                                new Object[] { getControlDarkShadow(),
0855:                                        new Integer(1) }),
0856:                        "ProgressBar.cellLength",
0857:                        new Integer(3),
0858:                        "ProgressBar.cellSpacing",
0859:                        new Integer(2),
0860:                        "ProgressBar.font",
0861:                        controlTextFont,
0862:                        "RadioButton.focusInputMap",
0863:                        new UIDefaults.LazyInputMap(new Object[] { "SPACE",
0864:                                "pressed", "released SPACE", "released" }),
0865:                        "RadioButton.font",
0866:                        controlTextFont,
0867:                        "RadioButton.icon",
0868:                        new UIDefaults.ProxyLazyValue(
0869:                                "javax.swing.plaf.metal.MetalIconFactory",
0870:                                "getRadioButtonIcon"),
0871:                        "RadioButtonMenuItem.acceleratorFont",
0872:                        subTextFont,
0873:                        "RadioButtonMenuItem.arrowIcon",
0874:                        new UIDefaults.ProxyLazyValue(
0875:                                "javax.swing.plaf.metal.MetalIconFactory",
0876:                                "getMenuItemArrowIcon"),
0877:                        "RadioButtonMenuItem.border",
0878:                        new UIDefaults.ProxyLazyValue(
0879:                                "javax.swing.plaf.metal.MetalBorders$MenuItemBorder"),
0880:                        "RadioButtonMenuItem.borderPainted",
0881:                        Boolean.TRUE,
0882:                        "RadioButtonMenuItem.checkIcon",
0883:                        new UIDefaults.ProxyLazyValue(
0884:                                "javax.swing.plaf.metal.MetalIconFactory",
0885:                                "getRadioButtonMenuItemIcon"),
0886:                        "RadioButtonMenuItem.commandSound",
0887:                        "sounds/MenuItemCommand.wav",
0888:                        "RadioButtonMenuItem.font",
0889:                        menuTextFont,
0890:                        "RootPane.colorChooserDialogBorder",
0891:                        new MetalLazyValue(
0892:                                "javax.swing.plaf.metal.MetalBorders$QuestionDialogBorder"),
0893:                        "RootPane.defaultButtonWindowKeyBindings",
0894:                        new Object[] { "ENTER", "press", "released ENTER",
0895:                                "release", "ctrl ENTER", "press",
0896:                                "ctrl released ENTER", "release" },
0897:                        "RootPane.errorDialogBorder",
0898:                        new MetalLazyValue(
0899:                                "javax.swing.plaf.metal.MetalBorders$ErrorDialogBorder"),
0900:                        "RootPane.fileChooserDialogBorder",
0901:                        new MetalLazyValue(
0902:                                "javax.swing.plaf.metal.MetalBorders$QuestionDialogBorder"),
0903:                        "RootPane.frameBorder",
0904:                        new MetalLazyValue(
0905:                                "javax.swing.plaf.metal.MetalBorders$FrameBorder"),
0906:                        "RootPane.informationDialogBorder",
0907:                        new MetalLazyValue(
0908:                                "javax.swing.plaf.metal.MetalBorders$DialogBorder"),
0909:                        "RootPane.plainDialogBorder",
0910:                        new MetalLazyValue(
0911:                                "javax.swing.plaf.metal.MetalBorders$DialogBorder"),
0912:                        "RootPane.questionDialogBorder",
0913:                        new MetalLazyValue(
0914:                                "javax.swing.plaf.metal.MetalBorders$QuestionDialogBorder"),
0915:                        "RootPane.warningDialogBorder",
0916:                        new MetalLazyValue(
0917:                                "javax.swing.plaf.metal.MetalBorders$WarningDialogBorder"),
0918:                        "ScrollBar.allowsAbsolutePositioning",
0919:                        Boolean.TRUE,
0920:                        "ScrollBar.ancestorInputMap",
0921:                        new UIDefaults.LazyInputMap(scrollBarAncestorInputMap),
0922:                        "ScrollBar.width",
0923:                        new Integer(17),
0924:                        "ScrollPane.ancestorInputMap",
0925:                        new UIDefaults.LazyInputMap(scrollPaneAncestorInputMap),
0926:                        "ScrollPane.border",
0927:                        new UIDefaults.ProxyLazyValue(
0928:                                "javax.swing.plaf.metal.MetalBorders$ScrollPaneBorder"),
0929:                        "Slider.focusInputMap",
0930:                        new UIDefaults.LazyInputMap(sliderFocusInputMap),
0931:                        "Slider.focusInsets",
0932:                        new InsetsUIResource(0, 0, 0, 0),
0933:                        "Slider.horizontalThumbIcon",
0934:                        new UIDefaults.ProxyLazyValue(
0935:                                "javax.swing.plaf.metal.MetalIconFactory",
0936:                                "getHorizontalSliderThumbIcon"),
0937:                        "Slider.majorTickLength",
0938:                        new Integer(6),
0939:                        "Slider.trackWidth",
0940:                        new Integer(5),
0941:                        "Slider.verticalThumbIcon",
0942:                        new UIDefaults.ProxyLazyValue(
0943:                                "javax.swing.plaf.metal.MetalIconFactory",
0944:                                "getVerticalSliderThumbIcon"),
0945:                        "Spinner.ancestorInputMap",
0946:                        new UIDefaults.LazyInputMap(new Object[] { "UP",
0947:                                "increment", "KP_UP", "increment", "DOWN",
0948:                                "decrement", "KP_DOWN", "decrement" }),
0949:                        "Spinner.arrowButtonBorder",
0950:                        new UIDefaults.ProxyLazyValue(
0951:                                "javax.swing.plaf.metal.MetalBorders",
0952:                                "getButtonBorder"),
0953:                        "Spinner.arrowButtonInsets",
0954:                        new InsetsUIResource(0, 0, 0, 0),
0955:                        "Spinner.border",
0956:                        new UIDefaults.ProxyLazyValue(
0957:                                "javax.swing.plaf.metal.MetalBorders",
0958:                                "getTextFieldBorder"),
0959:                        "Spinner.font",
0960:                        controlTextFont,
0961:                        "SplitPane.ancestorInputMap",
0962:                        new UIDefaults.LazyInputMap(splitPaneAncestorInputMap),
0963:                        "SplitPane.dividerSize",
0964:                        new Integer(10),
0965:                        "TabbedPane.ancestorInputMap",
0966:                        new UIDefaults.LazyInputMap(tabbedPaneAncestorInputMap),
0967:                        "TabbedPane.focusInputMap",
0968:                        new UIDefaults.LazyInputMap(tabbedPaneFocusInputMap),
0969:                        "TabbedPane.font",
0970:                        controlTextFont,
0971:                        "TabbedPane.tabAreaInsets",
0972:                        new InsetsUIResource(4, 2, 0, 6),
0973:                        "TabbedPane.tabInsets",
0974:                        new InsetsUIResource(0, 9, 1, 9),
0975:                        "Table.ancestorInputMap",
0976:                        new UIDefaults.LazyInputMap(tableAncestorInputMap),
0977:                        "Table.focusCellHighlightBorder",
0978:                        new UIDefaults.ProxyLazyValue(
0979:                                "javax.swing.plaf.BorderUIResource$LineBorderUIResource",
0980:                                new Object[] { getPrimaryControlShadow() }),
0981:                        "Table.font",
0982:                        userTextFont,
0983:                        "Table.scrollPaneBorder",
0984:                        new UIDefaults.ProxyLazyValue(
0985:                                "javax.swing.plaf.metal.MetalBorders$ScrollPaneBorder"),
0986:                        "TableHeader.cellBorder",
0987:                        new UIDefaults.ProxyLazyValue(
0988:                                "javax.swing.plaf.metal.MetalBorders$TableHeaderBorder"),
0989:                        "TableHeader.font",
0990:                        userTextFont,
0991:                        "TextArea.focusInputMap",
0992:                        new UIDefaults.LazyInputMap(editorPaneFocusInputMap),
0993:                        "TextArea.font",
0994:                        userTextFont,
0995:                        "TextField.border",
0996:                        new UIDefaults.ProxyLazyValue(
0997:                                "javax.swing.plaf.metal.MetalBorders",
0998:                                "getTextFieldBorder"),
0999:                        "TextField.focusInputMap",
1000:                        new UIDefaults.LazyInputMap(textFieldFocusInputMap),
1001:                        "TextField.font",
1002:                        userTextFont,
1003:                        "TextPane.focusInputMap",
1004:                        new UIDefaults.LazyInputMap(editorPaneFocusInputMap),
1005:                        "TextPane.font",
1006:                        userTextFont,
1007:                        "TitledBorder.border",
1008:                        new UIDefaults.ProxyLazyValue(
1009:                                "javax.swing.plaf.BorderUIResource$LineBorderUIResource",
1010:                                new Object[] { getControlShadow() }),
1011:                        "TitledBorder.font",
1012:                        controlTextFont,
1013:                        "ToggleButton.border",
1014:                        new UIDefaults.ProxyLazyValue(
1015:                                "javax.swing.plaf.metal.MetalBorders",
1016:                                "getToggleButtonBorder"),
1017:                        "ToggleButton.focusInputMap",
1018:                        new UIDefaults.LazyInputMap(new Object[] { "SPACE",
1019:                                "pressed", "released SPACE", "released" }),
1020:                        "ToggleButton.font",
1021:                        controlTextFont,
1022:                        "ToolBar.ancestorInputMap",
1023:                        new UIDefaults.LazyInputMap(toolBarAncestorInputMap),
1024:                        "ToolBar.border",
1025:                        new UIDefaults.ProxyLazyValue(
1026:                                "javax.swing.plaf.metal.MetalBorders$ToolBarBorder"),
1027:                        "ToolBar.font",
1028:                        menuTextFont,
1029:                        "ToolTip.border",
1030:                        new UIDefaults.ProxyLazyValue(
1031:                                "javax.swing.plaf.BorderUIResource$LineBorderUIResource",
1032:                                new Object[] { getPrimaryControlDarkShadow() }),
1033:                        "ToolTip.borderInactive",
1034:                        new UIDefaults.ProxyLazyValue(
1035:                                "javax.swing.plaf.BorderUIResource$LineBorderUIResource",
1036:                                new Object[] { getControlDarkShadow() }),
1037:                        "ToolTip.font",
1038:                        systemTextFont,
1039:                        "ToolTip.hideAccelerator",
1040:                        Boolean.FALSE,
1041:                        "Tree.ancestorInputMap",
1042:                        new UIDefaults.LazyInputMap(new Object[] { "ESCAPE",
1043:                                "cancel" }),
1044:                        "Tree.closedIcon",
1045:                        new UIDefaults.ProxyLazyValue(
1046:                                "javax.swing.plaf.metal.MetalIconFactory",
1047:                                "getTreeFolderIcon"),
1048:                        "Tree.collapsedIcon",
1049:                        new UIDefaults.ProxyLazyValue(
1050:                                "javax.swing.plaf.metal.MetalIconFactory",
1051:                                "getTreeControlIcon",
1052:                                new Object[] { Boolean.TRUE }),
1053:                        "Tree.expandedIcon",
1054:                        new UIDefaults.ProxyLazyValue(
1055:                                "javax.swing.plaf.metal.MetalIconFactory",
1056:                                "getTreeControlIcon",
1057:                                new Object[] { Boolean.FALSE }),
1058:                        "Tree.focusInputMap",
1059:                        new UIDefaults.LazyInputMap(treeFocusInputMap),
1060:                        "Tree.font",
1061:                        userTextFont,
1062:                        "Tree.leafIcon",
1063:                        new UIDefaults.ProxyLazyValue(
1064:                                "javax.swing.plaf.metal.MetalIconFactory",
1065:                                "getTreeLeafIcon"),
1066:                        "Tree.openIcon",
1067:                        new UIDefaults.ProxyLazyValue(
1068:                                "javax.swing.plaf.metal.MetalIconFactory",
1069:                                "getTreeFolderIcon"), "Tree.rowHeight",
1070:                        new Integer(0),
1071:
1072:                };
1073:
1074:                super .initComponentDefaults(uiDefs);
1075:
1076:                uiDefs.putDefaults(componentColorDefaults);
1077:                uiDefs.putDefaults(componentDefaults);
1078:            }
1079:
1080:            /**
1081:             * Initialize class default values
1082:             * @param uiDefs defaults table
1083:             */
1084:            protected void initClassDefaults(final UIDefaults uiDefs) {
1085:                super .initClassDefaults(uiDefs);
1086:
1087:                Object[] classDefaults = new Object[] { "SliderUI",
1088:                        "javax.swing.plaf.metal.MetalSliderUI", "ComboBoxUI",
1089:                        "javax.swing.plaf.metal.MetalComboBoxUI",
1090:                        "SplitPaneUI",
1091:                        "javax.swing.plaf.metal.MetalSplitPaneUI", "LabelUI",
1092:                        "javax.swing.plaf.metal.MetalLabelUI", "FileChooserUI",
1093:                        "javax.swing.plaf.metal.MetalFileChooserUI",
1094:                        "ScrollPaneUI",
1095:                        "javax.swing.plaf.metal.MetalScrollPaneUI",
1096:                        "SeparatorUI",
1097:                        "javax.swing.plaf.metal.MetalSeparatorUI",
1098:                        "RootPaneUI", "javax.swing.plaf.metal.MetalRootPaneUI",
1099:                        "ToolBarUI", "javax.swing.plaf.metal.MetalToolBarUI",
1100:                        "CheckBoxUI", "javax.swing.plaf.metal.MetalCheckBoxUI",
1101:                        "ToggleButtonUI",
1102:                        "javax.swing.plaf.metal.MetalToggleButtonUI",
1103:                        "TabbedPaneUI",
1104:                        "javax.swing.plaf.metal.MetalTabbedPaneUI",
1105:                        "InternalFrameUI",
1106:                        "javax.swing.plaf.metal.MetalInternalFrameUI",
1107:                        "PopupMenuSeparatorUI",
1108:                        "javax.swing.plaf.metal.MetalPopupMenuSeparatorUI",
1109:                        "ToolTipUI", "javax.swing.plaf.metal.MetalToolTipUI",
1110:                        "ProgressBarUI",
1111:                        "javax.swing.plaf.metal.MetalProgressBarUI",
1112:                        "TextFieldUI",
1113:                        "javax.swing.plaf.metal.MetalTextFieldUI", "TreeUI",
1114:                        "javax.swing.plaf.metal.MetalTreeUI", "ScrollBarUI",
1115:                        "javax.swing.plaf.metal.MetalScrollBarUI",
1116:                        "RadioButtonUI",
1117:                        "javax.swing.plaf.metal.MetalRadioButtonUI",
1118:                        "DesktopIconUI",
1119:                        "javax.swing.plaf.metal.MetalDesktopIconUI",
1120:                        "ButtonUI", "javax.swing.plaf.metal.MetalButtonUI" };
1121:
1122:                uiDefs.putDefaults(classDefaults);
1123:            }
1124:
1125:            /**
1126:             * Returns the table with defaults values
1127:             * @return UIDefaults result
1128:             */
1129:            public UIDefaults getDefaults() {
1130:                createDefaultTheme();
1131:                UIDefaults result = super .getDefaults();
1132:                metalTheme.addCustomEntriesToTable(result);
1133:                result.addResourceBundle(METAL_RESOURCE_BUNDLE);
1134:
1135:                return result;
1136:            }
1137:
1138:            /**
1139:             * Return name of this Look and Feel
1140:             * @return String name
1141:             */
1142:            public String getName() {
1143:                return "Metal L&F";
1144:            }
1145:
1146:            /**
1147:             * Return Look and Feel id
1148:             * @return String id
1149:             */
1150:            public String getID() {
1151:                return "Metal";
1152:            }
1153:
1154:            /**
1155:             * Return description of this Look and Feel
1156:             * @return String description
1157:             */
1158:            public String getDescription() {
1159:                return "Metal L&F";
1160:            }
1161:
1162:            /**
1163:             * Invoked on invalid operation
1164:             */
1165:            public void provideErrorFeedback(final Component c) {
1166:                super .provideErrorFeedback(c);
1167:            }
1168:
1169:            /**
1170:             * Return true because this Look and Feel is supported for all platforms
1171:             * @return boolean true
1172:             */
1173:            public boolean isSupportedLookAndFeel() {
1174:                return true;
1175:            }
1176:
1177:            /**
1178:             * Return false because this is not native look and feel
1179:             * @return boolean false
1180:             */
1181:            public boolean isNativeLookAndFeel() {
1182:                return false;
1183:            }
1184:
1185:            /**
1186:             * Return true due RootPaneUI instances support Window decorations in JRootPane
1187:             * @return boolean true
1188:             */
1189:            public boolean getSupportsWindowDecorations() {
1190:                return true;
1191:            }
1192:
1193:            /**
1194:             * Initialize default metal theme
1195:             */
1196:            protected void createDefaultTheme() {
1197:                if (metalTheme == null) {
1198:                    metalTheme = new DefaultMetalTheme();
1199:                }
1200:            }
1201:
1202:            /**
1203:             * Set the theme
1204:             */
1205:            public static void setCurrentTheme(final MetalTheme theme) {
1206:                metalTheme = theme;
1207:            }
1208:
1209:            /**
1210:             * Return window title font
1211:             * @return FontUIResource font
1212:             */
1213:            public static FontUIResource getWindowTitleFont() {
1214:                return metalTheme.getWindowTitleFont();
1215:            }
1216:
1217:            /**
1218:             * Return user text font
1219:             * @return FontUIResource font
1220:             */
1221:            public static FontUIResource getUserTextFont() {
1222:                return metalTheme.getUserTextFont();
1223:            }
1224:
1225:            /**
1226:             * Return system text font
1227:             * @return FontUIResource font
1228:             */
1229:            public static FontUIResource getSystemTextFont() {
1230:                return metalTheme.getSystemTextFont();
1231:            }
1232:
1233:            /**
1234:             * Return sub text font
1235:             * @return FontUIResource font
1236:             */
1237:            public static FontUIResource getSubTextFont() {
1238:                return metalTheme.getSubTextFont();
1239:            }
1240:
1241:            /**
1242:             * Return menu text font
1243:             * @return FontUIResource font
1244:             */
1245:            public static FontUIResource getMenuTextFont() {
1246:                return metalTheme.getMenuTextFont();
1247:            }
1248:
1249:            /**
1250:             * Return control text font
1251:             * @return FontUIResource font
1252:             */
1253:            public static FontUIResource getControlTextFont() {
1254:                return metalTheme.getControlTextFont();
1255:            }
1256:
1257:            /**
1258:             * Return window title font
1259:             * @return FontUIResource font
1260:             */
1261:            public static ColorUIResource getWindowTitleInactiveForeground() {
1262:                return metalTheme.getWindowTitleInactiveForeground();
1263:            }
1264:
1265:            /**
1266:             * Return window title inactive background color
1267:             * @return ColorUIResource color
1268:             */
1269:            public static ColorUIResource getWindowTitleInactiveBackground() {
1270:                return metalTheme.getWindowTitleInactiveBackground();
1271:            }
1272:
1273:            /**
1274:             * Return window title foreround color
1275:             * @return ColorUIResource color
1276:             */
1277:            public static ColorUIResource getWindowTitleForeground() {
1278:                return metalTheme.getWindowTitleForeground();
1279:            }
1280:
1281:            /**
1282:             * Return window title background color
1283:             * @return ColorUIResource color
1284:             */
1285:            public static ColorUIResource getWindowTitleBackground() {
1286:                return metalTheme.getWindowTitleBackground();
1287:            }
1288:
1289:            /**
1290:             * Return window background color
1291:             * @return ColorUIResource color
1292:             */
1293:            public static ColorUIResource getWindowBackground() {
1294:                return metalTheme.getWindowBackground();
1295:            }
1296:
1297:            /**
1298:             * Return white color
1299:             * @return ColorUIResource color
1300:             */
1301:            public static ColorUIResource getWhite() {
1302:                return metalTheme.getWhite();
1303:            }
1304:
1305:            /**
1306:             * Return user text color
1307:             * @return ColorUIResource color
1308:             */
1309:            public static ColorUIResource getUserTextColor() {
1310:                return metalTheme.getUserTextColor();
1311:            }
1312:
1313:            /**
1314:             * Return text highlight color
1315:             * @return ColorUIResource color
1316:             */
1317:            public static ColorUIResource getTextHighlightColor() {
1318:                return metalTheme.getTextHighlightColor();
1319:            }
1320:
1321:            /**
1322:             * Return system text color
1323:             * @return ColorUIResource color
1324:             */
1325:            public static ColorUIResource getSystemTextColor() {
1326:                return metalTheme.getSystemTextColor();
1327:            }
1328:
1329:            /**
1330:             * Return separator foreground color
1331:             * @return ColorUIResource color
1332:             */
1333:            public static ColorUIResource getSeparatorForeground() {
1334:                return metalTheme.getSeparatorForeground();
1335:            }
1336:
1337:            /**
1338:             * Return separator background color
1339:             * @return ColorUIResource color
1340:             */
1341:            public static ColorUIResource getSeparatorBackground() {
1342:                return metalTheme.getSeparatorBackground();
1343:            }
1344:
1345:            /**
1346:             * Return primary control shadow color
1347:             * @return ColorUIResource color
1348:             */
1349:            public static ColorUIResource getPrimaryControlShadow() {
1350:                return metalTheme.getPrimaryControlShadow();
1351:            }
1352:
1353:            /**
1354:             * Return primary control info color
1355:             * @return ColorUIResource color
1356:             */
1357:            public static ColorUIResource getPrimaryControlInfo() {
1358:                return metalTheme.getPrimaryControlInfo();
1359:            }
1360:
1361:            /**
1362:             * Return primary control highlight color
1363:             * @return ColorUIResource color
1364:             */
1365:            public static ColorUIResource getPrimaryControlHighlight() {
1366:                return metalTheme.getPrimaryControlHighlight();
1367:            }
1368:
1369:            /**
1370:             * Return primary control dark shadow color
1371:             * @return ColorUIResource color
1372:             */
1373:            public static ColorUIResource getPrimaryControlDarkShadow() {
1374:                return metalTheme.getPrimaryControlDarkShadow();
1375:            }
1376:
1377:            /**
1378:             * Return primary control color
1379:             * @return ColorUIResource color
1380:             */
1381:            public static ColorUIResource getPrimaryControl() {
1382:                return metalTheme.getPrimaryControl();
1383:            }
1384:
1385:            /**
1386:             * Return menu selected foreground color
1387:             * @return ColorUIResource color
1388:             */
1389:            public static ColorUIResource getMenuSelectedForeground() {
1390:                return metalTheme.getMenuSelectedForeground();
1391:            }
1392:
1393:            /**
1394:             * Return menu selected background color
1395:             * @return ColorUIResource color
1396:             */
1397:            public static ColorUIResource getMenuSelectedBackground() {
1398:                return metalTheme.getMenuSelectedBackground();
1399:            }
1400:
1401:            /**
1402:             * Return menu foreground color
1403:             * @return ColorUIResource color
1404:             */
1405:            public static ColorUIResource getMenuForeground() {
1406:                return metalTheme.getMenuForeground();
1407:            }
1408:
1409:            /**
1410:             * Return menu disabled foreground color
1411:             * @return ColorUIResource color
1412:             */
1413:            public static ColorUIResource getMenuDisabledForeground() {
1414:                return metalTheme.getMenuDisabledForeground();
1415:            }
1416:
1417:            /**
1418:             * Return menu background color
1419:             * @return ColorUIResource color
1420:             */
1421:            public static ColorUIResource getMenuBackground() {
1422:                return metalTheme.getMenuBackground();
1423:            }
1424:
1425:            /**
1426:             * Return inactive system text color
1427:             * @return ColorUIResource color
1428:             */
1429:            public static ColorUIResource getInactiveSystemTextColor() {
1430:                return metalTheme.getInactiveSystemTextColor();
1431:            }
1432:
1433:            /**
1434:             * Return inactive control text color
1435:             * @return ColorUIResource color
1436:             */
1437:            public static ColorUIResource getInactiveControlTextColor() {
1438:                return metalTheme.getInactiveControlTextColor();
1439:            }
1440:
1441:            /**
1442:             * Return highlighted text color
1443:             * @return ColorUIResource color
1444:             */
1445:            public static ColorUIResource getHighlightedTextColor() {
1446:                return metalTheme.getHighlightedTextColor();
1447:            }
1448:
1449:            /**
1450:             * Return focus color
1451:             * @return ColorUIResource color
1452:             */
1453:            public static ColorUIResource getFocusColor() {
1454:                return metalTheme.getFocusColor();
1455:            }
1456:
1457:            /**
1458:             * Return desktop color
1459:             * @return ColorUIResource color
1460:             */
1461:            public static ColorUIResource getDesktopColor() {
1462:                return metalTheme.getDesktopColor();
1463:            }
1464:
1465:            /**
1466:             * Return control text color
1467:             * @return ColorUIResource color
1468:             */
1469:            public static ColorUIResource getControlTextColor() {
1470:                return metalTheme.getControlTextColor();
1471:            }
1472:
1473:            /**
1474:             * Return control shadow color
1475:             * @return ColorUIResource color
1476:             */
1477:            public static ColorUIResource getControlShadow() {
1478:                return metalTheme.getControlShadow();
1479:            }
1480:
1481:            /**
1482:             * Return control info color
1483:             * @return ColorUIResource color
1484:             */
1485:            public static ColorUIResource getControlInfo() {
1486:                return metalTheme.getControlInfo();
1487:            }
1488:
1489:            /**
1490:             * Return control highlight color
1491:             * @return ColorUIResource color
1492:             */
1493:            public static ColorUIResource getControlHighlight() {
1494:                return metalTheme.getControlHighlight();
1495:            }
1496:
1497:            /**
1498:             * Return control disabled color
1499:             * @return ColorUIResource color
1500:             */
1501:            public static ColorUIResource getControlDisabled() {
1502:                return metalTheme.getControlDisabled();
1503:            }
1504:
1505:            /**
1506:             * Return control dark shadow color
1507:             * @return ColorUIResource color
1508:             */
1509:            public static ColorUIResource getControlDarkShadow() {
1510:                return metalTheme.getControlDarkShadow();
1511:            }
1512:
1513:            /**
1514:             * Return control color
1515:             * @return ColorUIResource color
1516:             */
1517:            public static ColorUIResource getControl() {
1518:                return metalTheme.getControl();
1519:            }
1520:
1521:            /**
1522:             * Return black color
1523:             * @return ColorUIResource color
1524:             */
1525:            public static ColorUIResource getBlack() {
1526:                return metalTheme.getBlack();
1527:            }
1528:
1529:            /**
1530:             * Return accelerator selected foreground color
1531:             * @return ColorUIResource color
1532:             */
1533:            public static ColorUIResource getAcceleratorSelectedForeground() {
1534:                return metalTheme.getAcceleratorSelectedForeground();
1535:            }
1536:
1537:            /**
1538:             * Return accelerator foreground color
1539:             * @return ColorUIResource color
1540:             */
1541:            public static ColorUIResource getAcceleratorForeground() {
1542:                return metalTheme.getAcceleratorForeground();
1543:            }
1544:
1545:            public static MetalTheme getCurrentTheme() {
1546:                return metalTheme;
1547:            }
1548:
1549:            /**
1550:             * Return system text font active value
1551:             * @return ActiveValue font
1552:             */
1553:            private static ActiveValue systemTextFontActiveValue() {
1554:                return new UIDefaults.ActiveValue() {
1555:                    public Object createValue(final UIDefaults uiDefaults) {
1556:                        return getSystemTextFont();
1557:                    }
1558:                };
1559:            }
1560:
1561:            /**
1562:             * Return window title font active value
1563:             * @return ActiveValue font
1564:             */
1565:            private static ActiveValue windowTitleFontActiveValue() {
1566:                return new UIDefaults.ActiveValue() {
1567:                    public Object createValue(final UIDefaults uiDefaults) {
1568:                        return getWindowTitleFont();
1569:                    }
1570:                };
1571:            }
1572:
1573:            /**
1574:             * Return sub text font active value
1575:             * @return ActiveValue font
1576:             */
1577:            private static ActiveValue subTextFontActiveValue() {
1578:                return new UIDefaults.ActiveValue() {
1579:                    public Object createValue(final UIDefaults uiDefaults) {
1580:                        return getSubTextFont();
1581:                    }
1582:                };
1583:            }
1584:
1585:            /**
1586:             * Return user text font active value
1587:             * @return ActiveValue font
1588:             */
1589:            private static ActiveValue userTextFontActiveValue() {
1590:                return new UIDefaults.ActiveValue() {
1591:                    public Object createValue(final UIDefaults uiDefaults) {
1592:                        return getUserTextFont();
1593:                    }
1594:                };
1595:            }
1596:
1597:            /**
1598:             * Return menu text font active value
1599:             * @return ActiveValue font
1600:             */
1601:            private static ActiveValue menuTextFontActiveValue() {
1602:                return new UIDefaults.ActiveValue() {
1603:                    public Object createValue(final UIDefaults uiDefaults) {
1604:                        return getMenuTextFont();
1605:                    }
1606:                };
1607:            }
1608:
1609:            /**
1610:             * Return control text font active value
1611:             * @return ActiveValue font
1612:             */
1613:            private static ActiveValue controlTextFontActiveValue() {
1614:                return new UIDefaults.ActiveValue() {
1615:                    public Object createValue(final UIDefaults uiDefaults) {
1616:                        return getControlTextFont();
1617:                    }
1618:                };
1619:            }
1620:
1621:            final class MetalLazyValue implements  UIDefaults.LazyValue {
1622:                private String className;
1623:                private String methodName;
1624:
1625:                public MetalLazyValue(final String className,
1626:                        final String methodName) {
1627:                    this .className = className;
1628:                    this .methodName = methodName;
1629:                }
1630:
1631:                public MetalLazyValue(final String className) {
1632:                    this (className, null);
1633:                }
1634:
1635:                public Object createValue(final UIDefaults uiDefaults) {
1636:                    Object result = null;
1637:
1638:                    try {
1639:                        Class classObj = Class.forName(className);
1640:                        result = (methodName == null) ? classObj.newInstance()
1641:                                : classObj.getMethod(methodName).invoke(null);
1642:                    } catch (final Exception e) {
1643:                        e.printStackTrace();
1644:                    }
1645:
1646:                    return result;
1647:                }
1648:            }
1649:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.