Source Code Cross Referenced for BasicLookAndFeel.java in  » Apache-Harmony-Java-SE » javax-package » javax » swing » plaf » basic » 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.basic 
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.basic;
0022:
0023:        import java.awt.Color;
0024:        import java.awt.Font;
0025:        import java.awt.SystemColor;
0026:        import java.awt.event.ActionEvent;
0027:        import java.awt.event.KeyEvent;
0028:        import java.io.Serializable;
0029:        import java.net.URL;
0030:
0031:        import javax.swing.AbstractAction;
0032:        import javax.swing.Action;
0033:        import javax.swing.ActionMap;
0034:        import javax.swing.DefaultListCellRenderer;
0035:        import javax.swing.JComponent;
0036:        import javax.swing.JTextField;
0037:        import javax.swing.LookAndFeel;
0038:        import javax.swing.SwingUtilities;
0039:        import javax.swing.UIDefaults;
0040:        import javax.swing.UIManager;
0041:        import javax.swing.UIDefaults.ProxyLazyValue;
0042:        import javax.swing.plaf.ActionMapUIResource;
0043:        import javax.swing.plaf.ColorUIResource;
0044:        import javax.swing.plaf.DimensionUIResource;
0045:        import javax.swing.plaf.InsetsUIResource;
0046:        import javax.swing.text.DefaultEditorKit;
0047:
0048:        /*
0049:         * In order not to break client application UI appearence the values for insets,
0050:         * borders and other size-related keys as well as 'feel'-related values are preserved as in 1.5 release.
0051:         * Color-related values are chosen to provide consistent look of UI components.
0052:         */
0053:        public abstract class BasicLookAndFeel extends LookAndFeel implements 
0054:                Serializable {
0055:            private static final String RESOURCE_BUNDLE = "org.apache.harmony.x.swing.plaf.resources.basic.BasicResourceBundle";
0056:            private static final Integer BLINK_RATE = new Integer(600);
0057:            private UIDefaults uiDefaults;
0058:
0059:            protected void loadSystemColors(final UIDefaults uiDefs,
0060:                    final String[] customColors, final boolean isNative) {
0061:                if (isNative) {
0062:                    loadSystemColors(uiDefs, getBasicSystemColors());
0063:                } else {
0064:                    loadColors(uiDefs, customColors);
0065:                }
0066:            }
0067:
0068:            protected void initSystemColorDefaults(final UIDefaults uiDefs) {
0069:                Object[] basicSystemColors = getBasicSystemColors();
0070:
0071:                for (int i = 0; i < basicSystemColors.length; i += 2) {
0072:                    uiDefs.put(basicSystemColors[i], new ColorUIResource(
0073:                            (SystemColor) basicSystemColors[i + 1]));
0074:                }
0075:            }
0076:
0077:            protected void initComponentDefaults(final UIDefaults uiDefs) {
0078:                Object[] treeFocusInputMap = new Object[] { "ctrl C", "copy",
0079:                        "ctrl V", "paste", "ctrl X", "cut", "COPY", "copy",
0080:                        "PASTE", "paste", "CUT", "cut", "UP", "selectPrevious",
0081:                        "KP_UP", "selectPrevious", "shift UP",
0082:                        "selectPreviousExtendSelection", "shift ctrl UP",
0083:                        "selectPreviousExtendSelection", "shift KP_UP",
0084:                        "selectPreviousExtendSelection", "shift ctrl KP_UP",
0085:                        "selectPreviousExtendSelection", "DOWN", "selectNext",
0086:                        "KP_DOWN", "selectNext", "shift DOWN",
0087:                        "selectNextExtendSelection", "shift ctrl DOWN",
0088:                        "selectNextExtendSelection", "shift KP_DOWN",
0089:                        "selectNextExtendSelection", "shift ctrl KP_DOWN",
0090:                        "selectNextExtendSelection", "RIGHT", "selectChild",
0091:                        "KP_RIGHT", "selectChild", "LEFT", "selectParent",
0092:                        "KP_LEFT", "selectParent", "PAGE_UP",
0093:                        "scrollUpChangeSelection", "shift PAGE_UP",
0094:                        "scrollUpExtendSelection", "PAGE_DOWN",
0095:                        "scrollDownChangeSelection", "shift PAGE_DOWN",
0096:                        "scrollDownExtendSelection", "HOME", "selectFirst",
0097:                        "shift HOME", "selectFirstExtendSelection",
0098:                        "shift ctrl HOME", "selectFirstExtendSelection", "END",
0099:                        "selectLast", "shift END", "selectLastExtendSelection",
0100:                        "shift ctrl END", "selectLastExtendSelection", "F2",
0101:                        "startEditing", "ctrl A", "selectAll", "ctrl SLASH",
0102:                        "selectAll", "ctrl BACK_SLASH", "clearSelection",
0103:                        "ctrl SPACE", "toggleSelectionPreserveAnchor",
0104:                        "shift SPACE", "extendSelection", "ctrl HOME",
0105:                        "selectFirstChangeLead", "ctrl END",
0106:                        "selectLastChangeLead", "ctrl UP",
0107:                        "selectPreviousChangeLead", "ctrl KP_UP",
0108:                        "selectPreviousChangeLead", "ctrl DOWN",
0109:                        "selectNextChangeLead", "ctrl KP_DOWN",
0110:                        "selectNextChangeLead", "ctrl PAGE_DOWN",
0111:                        "scrollDownChangeLead", "ctrl shift PAGE_DOWN",
0112:                        "scrollDownExtendSelection", "ctrl PAGE_UP",
0113:                        "scrollUpChangeLead", "ctrl shift PAGE_UP",
0114:                        "scrollUpExtendSelection", "ctrl LEFT", "scrollLeft",
0115:                        "ctrl KP_LEFT", "scrollLeft", "ctrl RIGHT",
0116:                        "scrollRight", "ctrl KP_RIGHT", "scrollRight", "ADD",
0117:                        "expand", "SUBTRACT", "collapse", "SPACE",
0118:                        "toggleSelectionPreserveAnchor", "shift ctrl SPACE",
0119:                        "moveSelectionTo" };
0120:                Object[] scrollBarAncestorInputMapRightToLeft = new Object[] {
0121:                        "RIGHT", "negativeUnitIncrement", "KP_RIGHT",
0122:                        "negativeUnitIncrement", "LEFT",
0123:                        "positiveUnitIncrement", "KP_LEFT",
0124:                        "positiveUnitIncrement" };
0125:                Object[] tabbedPaneAncestorInputMap = new Object[] {
0126:                        "ctrl TAB", "navigateNext", "ctrl shift TAB",
0127:                        "navigatePrevious", "ctrl PAGE_DOWN",
0128:                        "navigatePageDown", "ctrl PAGE_UP", "navigatePageUp",
0129:                        "ctrl UP", "requestFocus", "ctrl KP_UP", "requestFocus" };
0130:                Object[] splitPaneAncestorInputMap = new Object[] { "UP",
0131:                        "negativeIncrement", "DOWN", "positiveIncrement",
0132:                        "LEFT", "negativeIncrement", "RIGHT",
0133:                        "positiveIncrement", "KP_UP", "negativeIncrement",
0134:                        "KP_DOWN", "positiveIncrement", "KP_LEFT",
0135:                        "negativeIncrement", "KP_RIGHT", "positiveIncrement",
0136:                        "HOME", "selectMin", "END", "selectMax", "F8",
0137:                        "startResize", "F6", "toggleFocus", "ctrl TAB",
0138:                        "focusOutForward", "ctrl shift TAB", "focusOutBackward" };
0139:                Object[] auditoryCuesAllAuditoryCues = new Object[] {
0140:                        "CheckBoxMenuItem.commandSound",
0141:                        "InternalFrame.closeSound",
0142:                        "InternalFrame.maximizeSound",
0143:                        "InternalFrame.minimizeSound",
0144:                        "InternalFrame.restoreDownSound",
0145:                        "InternalFrame.restoreUpSound",
0146:                        "MenuItem.commandSound", "OptionPane.errorSound",
0147:                        "OptionPane.informationSound",
0148:                        "OptionPane.questionSound", "OptionPane.warningSound",
0149:                        "PopupMenu.popupSound",
0150:                        "RadioButtonMenuItem.commandSound" };
0151:                Object[] auditoryCuesCueList = new Object[] {
0152:                        "CheckBoxMenuItem.commandSound",
0153:                        "InternalFrame.closeSound",
0154:                        "InternalFrame.maximizeSound",
0155:                        "InternalFrame.minimizeSound",
0156:                        "InternalFrame.restoreDownSound",
0157:                        "InternalFrame.restoreUpSound",
0158:                        "MenuItem.commandSound", "OptionPane.errorSound",
0159:                        "OptionPane.informationSound",
0160:                        "OptionPane.questionSound", "OptionPane.warningSound",
0161:                        "PopupMenu.popupSound",
0162:                        "RadioButtonMenuItem.commandSound" };
0163:                Object[] tableAncestorInputMapRightToLeft = new Object[] {
0164:                        "RIGHT", "selectPreviousColumn", "KP_RIGHT",
0165:                        "selectPreviousColumn", "ctrl RIGHT",
0166:                        "selectPreviousColumnChangeLead", "ctrl KP_RIGHT",
0167:                        "selectPreviousColumnChangeLead", "LEFT",
0168:                        "selectNextColumn", "KP_LEFT", "selectNextColumn",
0169:                        "ctrl LEFT", "selectNextColumnChangeLead",
0170:                        "ctrl KP_LEFT", "selectNextColumnChangeLead",
0171:                        "shift RIGHT", "selectPreviousColumnExtendSelection",
0172:                        "shift ctrl RIGHT",
0173:                        "selectPreviousColumnExtendSelection",
0174:                        "shift KP_RIGHT",
0175:                        "selectPreviousColumnExtendSelection",
0176:                        "shift ctrl KP_RIGHT",
0177:                        "selectPreviousColumnExtendSelection", "shift LEFT",
0178:                        "selectNextColumnExtendSelection", "shift ctrl LEFT",
0179:                        "selectNextColumnExtendSelection", "shift KP_LEFT",
0180:                        "selectNextColumnExtendSelection",
0181:                        "shift ctrl KP_LEFT",
0182:                        "selectNextColumnExtendSelection", "ctrl PAGE_UP",
0183:                        "scrollRightChangeSelection", "ctrl PAGE_DOWN",
0184:                        "scrollLeftChangeSelection", "ctrl shift PAGE_UP",
0185:                        "scrollRightExtendSelection", "ctrl shift PAGE_DOWN",
0186:                        "scrollLeftExtendSelection" };
0187:                Object[] formattedTextFieldFocusInputMap = new Object[] {
0188:                        "ctrl C", DefaultEditorKit.copyAction, "ctrl V",
0189:                        DefaultEditorKit.pasteAction, "ctrl X",
0190:                        DefaultEditorKit.cutAction, "COPY",
0191:                        DefaultEditorKit.copyAction, "PASTE",
0192:                        DefaultEditorKit.pasteAction, "CUT",
0193:                        DefaultEditorKit.cutAction, "shift LEFT",
0194:                        DefaultEditorKit.selectionBackwardAction,
0195:                        "shift KP_LEFT",
0196:                        DefaultEditorKit.selectionBackwardAction,
0197:                        "shift RIGHT", DefaultEditorKit.selectionForwardAction,
0198:                        "shift KP_RIGHT",
0199:                        DefaultEditorKit.selectionForwardAction, "ctrl LEFT",
0200:                        DefaultEditorKit.previousWordAction, "ctrl KP_LEFT",
0201:                        DefaultEditorKit.previousWordAction, "ctrl RIGHT",
0202:                        DefaultEditorKit.nextWordAction, "ctrl KP_RIGHT",
0203:                        DefaultEditorKit.nextWordAction, "ctrl shift LEFT",
0204:                        DefaultEditorKit.selectionPreviousWordAction,
0205:                        "ctrl shift KP_LEFT",
0206:                        DefaultEditorKit.selectionPreviousWordAction,
0207:                        "ctrl shift RIGHT",
0208:                        DefaultEditorKit.selectionNextWordAction,
0209:                        "ctrl shift KP_RIGHT",
0210:                        DefaultEditorKit.selectionNextWordAction, "ctrl A",
0211:                        DefaultEditorKit.selectAllAction, "HOME",
0212:                        DefaultEditorKit.beginLineAction, "END",
0213:                        DefaultEditorKit.endLineAction, "shift HOME",
0214:                        DefaultEditorKit.selectionBeginLineAction, "shift END",
0215:                        DefaultEditorKit.selectionEndLineAction, "BACK_SPACE",
0216:                        DefaultEditorKit.deletePrevCharAction, "DELETE",
0217:                        DefaultEditorKit.deleteNextCharAction, "RIGHT",
0218:                        DefaultEditorKit.forwardAction, "LEFT",
0219:                        DefaultEditorKit.backwardAction, "KP_RIGHT",
0220:                        DefaultEditorKit.forwardAction, "KP_LEFT",
0221:                        DefaultEditorKit.backwardAction, "ENTER",
0222:                        JTextField.notifyAction, "ctrl BACK_SLASH", "unselect",
0223:                        "control shift O", "toggle-componentOrientation",
0224:                        "ESCAPE", "reset-field-edit", "UP", "increment",
0225:                        "KP_UP", "increment", "DOWN", "decrement", "KP_DOWN",
0226:                        "decrement" };
0227:                Object[] radioButtonFocusInputMap = new Object[] { "SPACE",
0228:                        "pressed", "released SPACE", "released", "RETURN",
0229:                        "pressed" };
0230:                Object[] scrollPaneAncestorInputMapRightToLeft = new Object[] {
0231:                        "ctrl PAGE_UP", "scrollRight", "ctrl PAGE_DOWN",
0232:                        "scrollLeft" };
0233:                Object[] toggleButtonFocusInputMap = new Object[] { "SPACE",
0234:                        "pressed", "released SPACE", "released" };
0235:                Object[] treeFocusInputMapRightToLeft = new Object[] { "RIGHT",
0236:                        "selectParent", "KP_RIGHT", "selectParent", "LEFT",
0237:                        "selectChild", "KP_LEFT", "selectChild" };
0238:                Object[] popupMenuSelectedWindowInputMapBindings = new Object[] {
0239:                        "ESCAPE", "cancel", "DOWN", "selectNext", "KP_DOWN",
0240:                        "selectNext", "UP", "selectPrevious", "KP_UP",
0241:                        "selectPrevious", "LEFT", "selectParent", "KP_LEFT",
0242:                        "selectParent", "RIGHT", "selectChild", "KP_RIGHT",
0243:                        "selectChild", "ENTER", "return", "SPACE", "return" };
0244:                Object[] spinnerAncestorInputMap = new Object[] { "UP",
0245:                        "increment", "KP_UP", "increment", "DOWN", "decrement",
0246:                        "KP_DOWN", "decrement" };
0247:                Object[] scrollBarAncestorInputMap = new Object[] { "RIGHT",
0248:                        "positiveUnitIncrement", "KP_RIGHT",
0249:                        "positiveUnitIncrement", "DOWN",
0250:                        "positiveUnitIncrement", "KP_DOWN",
0251:                        "positiveUnitIncrement", "PAGE_DOWN",
0252:                        "positiveBlockIncrement", "LEFT",
0253:                        "negativeUnitIncrement", "KP_LEFT",
0254:                        "negativeUnitIncrement", "UP", "negativeUnitIncrement",
0255:                        "KP_UP", "negativeUnitIncrement", "PAGE_UP",
0256:                        "negativeBlockIncrement", "HOME", "minScroll", "END",
0257:                        "maxScroll" };
0258:                Object[] rootPaneAncestorInputMap = new Object[] { "shift F10",
0259:                        "postPopup" };
0260:                Object[] tableAncestorInputMap = new Object[] { "ctrl C",
0261:                        "copy", "ctrl V", "paste", "ctrl X", "cut", "COPY",
0262:                        "copy", "PASTE", "paste", "CUT", "cut", "RIGHT",
0263:                        "selectNextColumn", "ctrl RIGHT",
0264:                        "selectNextColumnChangeLead", "KP_RIGHT",
0265:                        "selectNextColumn", "ctrl KP_RIGHT",
0266:                        "selectNextColumnChangeLead", "LEFT",
0267:                        "selectPreviousColumn", "ctrl LEFT",
0268:                        "selectPreviousColumnChangeLead", "KP_LEFT",
0269:                        "selectPreviousColumn", "ctrl KP_LEFT",
0270:                        "selectPreviousColumnChangeLead", "DOWN",
0271:                        "selectNextRow", "ctrl DOWN",
0272:                        "selectNextRowChangeLead", "KP_DOWN", "selectNextRow",
0273:                        "ctrl KP_DOWN", "selectNextRowChangeLead", "UP",
0274:                        "selectPreviousRow", "ctrl UP",
0275:                        "selectPreviousRowChangeLead", "KP_UP",
0276:                        "selectPreviousRow", "ctrl KP_UP",
0277:                        "selectPreviousRowChangeLead", "shift RIGHT",
0278:                        "selectNextColumnExtendSelection", "shift RIGHT",
0279:                        "selectNextColumnExtendSelection", "shift ctrl RIGHT",
0280:                        "selectNextColumnExtendSelection", "shift KP_RIGHT",
0281:                        "selectNextColumnExtendSelection",
0282:                        "shift ctrl KP_RIGHT",
0283:                        "selectNextColumnExtendSelection", "shift LEFT",
0284:                        "selectPreviousColumnExtendSelection",
0285:                        "shift ctrl LEFT",
0286:                        "selectPreviousColumnExtendSelection", "shift KP_LEFT",
0287:                        "selectPreviousColumnExtendSelection",
0288:                        "shift ctrl KP_LEFT",
0289:                        "selectPreviousColumnExtendSelection", "shift DOWN",
0290:                        "selectNextRowExtendSelection", "shift ctrl DOWN",
0291:                        "selectNextRowExtendSelection", "shift KP_DOWN",
0292:                        "selectNextRowExtendSelection", "shift ctrl KP_DOWN",
0293:                        "selectNextRowExtendSelection", "shift UP",
0294:                        "selectPreviousRowExtendSelection", "shift ctrl UP",
0295:                        "selectPreviousRowExtendSelection", "shift KP_UP",
0296:                        "selectPreviousRowExtendSelection", "shift ctrl KP_UP",
0297:                        "selectPreviousRowExtendSelection", "PAGE_UP",
0298:                        "scrollUpChangeSelection", "PAGE_DOWN",
0299:                        "scrollDownChangeSelection", "HOME",
0300:                        "selectFirstColumn", "END", "selectLastColumn",
0301:                        "shift PAGE_UP", "scrollUpExtendSelection",
0302:                        "shift PAGE_DOWN", "scrollDownExtendSelection",
0303:                        "shift HOME", "selectFirstColumnExtendSelection",
0304:                        "shift END", "selectLastColumnExtendSelection",
0305:                        "ctrl PAGE_UP", "scrollLeftChangeSelection",
0306:                        "ctrl PAGE_DOWN", "scrollRightChangeSelection",
0307:                        "ctrl HOME", "selectFirstRow", "ctrl END",
0308:                        "selectLastRow", "ctrl shift PAGE_UP",
0309:                        "scrollRightExtendSelection", "ctrl shift PAGE_DOWN",
0310:                        "scrollLeftExtendSelection", "ctrl shift HOME",
0311:                        "selectFirstRowExtendSelection", "ctrl shift END",
0312:                        "selectLastRowExtendSelection", "TAB",
0313:                        "selectNextColumnCell", "shift TAB",
0314:                        "selectPreviousColumnCell", "ENTER",
0315:                        "selectNextRowCell", "shift ENTER",
0316:                        "selectPreviousRowCell", "ctrl A", "selectAll",
0317:                        "ctrl SLASH", "selectAll", "ctrl BACK_SLASH",
0318:                        "clearSelection", "ESCAPE", "cancel", "F2",
0319:                        "startEditing", "SPACE", "addToSelection",
0320:                        "ctrl SPACE", "toggleAndAnchor", "shift ctrl SPACE",
0321:                        "moveSelectionTo", "shift SPACE", "extendTo" };
0322:                Object[] listFocusInputMapRightToLeft = new Object[] { "LEFT",
0323:                        "selectNextColumn", "KP_LEFT", "selectNextColumn",
0324:                        "ctrl LEFT", "selectNextColumnChangeLead",
0325:                        "ctrl KP_LEFT", "selectNextColumnChangeLead",
0326:                        "shift LEFT", "selectNextColumnExtendSelection",
0327:                        "shift ctrl LEFT", "selectNextColumnExtendSelection",
0328:                        "shift KP_LEFT", "selectNextColumnExtendSelection",
0329:                        "shift ctrl KP_LEFT",
0330:                        "selectNextColumnExtendSelection", "RIGHT",
0331:                        "selectPreviousColumn", "KP_RIGHT",
0332:                        "selectPreviousColumn", "ctrl RIGHT",
0333:                        "selectPreviousColumnChangeLead", "ctrl KP_RIGHT",
0334:                        "selectPreviousColumnChangeLead", "shift RIGHT",
0335:                        "selectPreviousColumnExtendSelection",
0336:                        "shift ctrl RIGHT",
0337:                        "selectPreviousColumnExtendSelection",
0338:                        "shift KP_RIGHT",
0339:                        "selectPreviousColumnExtendSelection",
0340:                        "shift ctrl KP_RIGHT",
0341:                        "selectPreviousColumnExtendSelection" };
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[] scrollPaneAncestorInputMap = new Object[] { "RIGHT",
0359:                        "unitScrollRight", "KP_RIGHT", "unitScrollRight",
0360:                        "DOWN", "unitScrollDown", "KP_DOWN", "unitScrollDown",
0361:                        "LEFT", "unitScrollLeft", "KP_LEFT", "unitScrollLeft",
0362:                        "UP", "unitScrollUp", "KP_UP", "unitScrollUp",
0363:                        "PAGE_UP", "scrollUp", "PAGE_DOWN", "scrollDown",
0364:                        "ctrl PAGE_UP", "scrollLeft", "ctrl PAGE_DOWN",
0365:                        "scrollRight", "ctrl HOME", "scrollHome", "ctrl END",
0366:                        "scrollEnd" };
0367:                Object[] tabbedPaneFocusInputMap = new Object[] { "RIGHT",
0368:                        "navigateRight", "KP_RIGHT", "navigateRight", "LEFT",
0369:                        "navigateLeft", "KP_LEFT", "navigateLeft", "UP",
0370:                        "navigateUp", "KP_UP", "navigateUp", "DOWN",
0371:                        "navigateDown", "KP_DOWN", "navigateDown", "ctrl DOWN",
0372:                        "requestFocusForVisibleComponent", "ctrl KP_DOWN",
0373:                        "requestFocusForVisibleComponent" };
0374:                Object[] listFocusInputMap = new Object[] { "ctrl C", "copy",
0375:                        "ctrl V", "paste", "ctrl X", "cut", "COPY", "copy",
0376:                        "PASTE", "paste", "CUT", "cut", "UP",
0377:                        "selectPreviousRow", "KP_UP", "selectPreviousRow",
0378:                        "shift UP", "selectPreviousRowExtendSelection",
0379:                        "shift ctrl UP", "selectPreviousRowExtendSelection",
0380:                        "shift KP_UP", "selectPreviousRowExtendSelection",
0381:                        "shift ctrl KP_UP", "selectPreviousRowExtendSelection",
0382:                        "DOWN", "selectNextRow", "ctrl DOWN",
0383:                        "selectNextRowChangeLead", "KP_DOWN", "selectNextRow",
0384:                        "ctrl KP_DOWN", "selectNextRowChangeLead",
0385:                        "shift DOWN", "selectNextRowExtendSelection",
0386:                        "shift ctrl DOWN", "selectNextRowExtendSelection",
0387:                        "shift KP_DOWN", "selectNextRowExtendSelection",
0388:                        "shift ctrl KP_DOWN", "selectNextRowExtendSelection",
0389:                        "LEFT", "selectPreviousColumn", "ctrl LEFT",
0390:                        "selectPreviousColumnChangeLead", "KP_LEFT",
0391:                        "selectPreviousColumn", "ctrl KP_LEFT",
0392:                        "selectPreviousColumnChangeLead", "shift LEFT",
0393:                        "selectPreviousColumnExtendSelection",
0394:                        "shift ctrl LEFT",
0395:                        "selectPreviousColumnExtendSelection", "shift KP_LEFT",
0396:                        "selectPreviousColumnExtendSelection",
0397:                        "shift ctrl KP_LEFT",
0398:                        "selectPreviousColumnExtendSelection", "RIGHT",
0399:                        "selectNextColumn", "ctrl RIGHT",
0400:                        "selectNextColumnChangeLead", "KP_RIGHT",
0401:                        "selectNextColumn", "ctrl KP_RIGHT",
0402:                        "selectNextColumnChangeLead", "shift RIGHT",
0403:                        "selectNextColumnExtendSelection", "shift ctrl RIGHT",
0404:                        "selectNextColumnExtendSelection", "shift KP_RIGHT",
0405:                        "selectNextColumnExtendSelection",
0406:                        "shift ctrl KP_RIGHT",
0407:                        "selectNextColumnExtendSelection", "ctrl SPACE",
0408:                        "selectNextRowExtendSelection", "HOME",
0409:                        "selectFirstRow", "ctrl HOME",
0410:                        "selectFirstRowChangeLead", "shift HOME",
0411:                        "selectFirstRowExtendSelection", "shift ctrl HOME",
0412:                        "selectFirstRowExtendSelection", "END",
0413:                        "selectLastRow", "ctrl END", "selectLastRowChangeLead",
0414:                        "shift END", "selectLastRowExtendSelection",
0415:                        "shift ctrl END", "selectLastRowExtendSelection",
0416:                        "PAGE_UP", "scrollUp", "ctrl PAGE_UP",
0417:                        "scrollUpChangeLead", "shift PAGE_UP",
0418:                        "scrollUpExtendSelection", "shift ctrl PAGE_UP",
0419:                        "scrollUpExtendSelection", "PAGE_DOWN", "scrollDown",
0420:                        "ctrl PAGE_DOWN", "scrollDownChangeLead",
0421:                        "shift PAGE_DOWN", "scrollDownExtendSelection",
0422:                        "shift ctrl PAGE_DOWN", "scrollDownExtendSelection",
0423:                        "ctrl A", "selectAll", "ctrl SLASH", "selectAll",
0424:                        "ctrl BACK_SLASH", "clearSelection", "ctrl UP",
0425:                        "selectPreviousRowChangeLead", "ctrl KP_UP",
0426:                        "selectPreviousRowChangeLead", "SPACE",
0427:                        "addToSelection", "ctrl SPACE", "toggleAndAnchor",
0428:                        "shift ctrl SPACE", "moveSelectionTo", "shift SPACE",
0429:                        "extendTo" };
0430:                Object[] toolBarAncestorInputMap = new Object[] { "UP",
0431:                        "navigateUp", "KP_UP", "navigateUp", "DOWN",
0432:                        "navigateDown", "KP_DOWN", "navigateDown", "LEFT",
0433:                        "navigateLeft", "KP_LEFT", "navigateLeft", "RIGHT",
0434:                        "navigateRight", "KP_RIGHT", "navigateRight" };
0435:                Object[] sliderFocusInputMap = new Object[] { "RIGHT",
0436:                        "positiveUnitIncrement", "KP_RIGHT",
0437:                        "positiveUnitIncrement", "DOWN",
0438:                        "negativeUnitIncrement", "KP_DOWN",
0439:                        "negativeUnitIncrement", "PAGE_DOWN",
0440:                        "negativeBlockIncrement", "LEFT",
0441:                        "negativeUnitIncrement", "KP_LEFT",
0442:                        "negativeUnitIncrement", "UP", "positiveUnitIncrement",
0443:                        "KP_UP", "positiveUnitIncrement", "PAGE_UP",
0444:                        "positiveBlockIncrement", "HOME", "minScroll", "END",
0445:                        "maxScroll" };
0446:                Object[] comboBoxAncestorInputMap = new Object[] { "ESCAPE",
0447:                        "hidePopup", "PAGE_UP", "pageUpPassThrough",
0448:                        "PAGE_DOWN", "pageDownPassThrough", "HOME",
0449:                        "homePassThrough", "END", "endPassThrough", "ENTER",
0450:                        "enterPressed" };
0451:
0452:                Object basicCompDefaults[] = {
0453:                        "AuditoryCues.allAuditoryCues",
0454:                        auditoryCuesAllAuditoryCues,
0455:                        "AuditoryCues.cueList",
0456:                        auditoryCuesCueList,
0457:                        "AuditoryCues.noAuditoryCues",
0458:                        new Object[] { "mute" },
0459:                        "Button.border",
0460:                        new UIDefaults.ProxyLazyValue(
0461:                                "javax.swing.plaf.basic.BasicBorders",
0462:                                "getButtonBorder"),
0463:                        "Button.focusInputMap",
0464:                        new UIDefaults.LazyInputMap(new Object[] { "SPACE",
0465:                                "pressed", "released SPACE", "released",
0466:                                "ENTER", "pressed", "released ENTER",
0467:                                "released" }),
0468:                        "Button.font",
0469:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0470:                        "Button.margin",
0471:                        new InsetsUIResource(2, 14, 2, 14),
0472:                        "Button.textIconGap",
0473:                        new Integer(4),
0474:                        "Button.textShiftOffset",
0475:                        new Integer(0),
0476:                        "CheckBox.border",
0477:                        new UIDefaults.ProxyLazyValue(
0478:                                "javax.swing.plaf.basic.BasicBorders",
0479:                                "getRadioButtonBorder"),
0480:                        "CheckBox.focusInputMap",
0481:                        new UIDefaults.LazyInputMap(new Object[] { "SPACE",
0482:                                "pressed", "released SPACE", "released" }),
0483:                        "CheckBox.font",
0484:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0485:                        "CheckBox.icon",
0486:                        new UIDefaults.ProxyLazyValue(
0487:                                "javax.swing.plaf.basic.BasicIconFactory",
0488:                                "getCheckBoxIcon"),
0489:                        "CheckBox.margin",
0490:                        new InsetsUIResource(2, 2, 2, 2),
0491:                        "CheckBox.textIconGap",
0492:                        new Integer(4),
0493:                        "CheckBox.textShiftOffset",
0494:                        new Integer(0),
0495:                        "CheckBoxMenuItem.acceleratorFont",
0496:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0497:                        "CheckBoxMenuItem.arrowIcon",
0498:                        new UIDefaults.ProxyLazyValue(
0499:                                "javax.swing.plaf.basic.BasicIconFactory",
0500:                                "getMenuItemArrowIcon"),
0501:                        "CheckBoxMenuItem.border",
0502:                        new UIDefaults.ProxyLazyValue(
0503:                                "javax.swing.plaf.basic.BasicBorders$MarginBorder"),
0504:                        "CheckBoxMenuItem.borderPainted",
0505:                        Boolean.FALSE,
0506:                        "CheckBoxMenuItem.checkIcon",
0507:                        new UIDefaults.ProxyLazyValue(
0508:                                "javax.swing.plaf.basic.BasicIconFactory",
0509:                                "getCheckBoxMenuItemIcon"),
0510:                        "CheckBoxMenuItem.font",
0511:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0512:                        "CheckBoxMenuItem.margin",
0513:                        new InsetsUIResource(2, 2, 2, 2),
0514:                        "ColorChooser.font",
0515:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0516:                        "ColorChooser.swatchesRecentSwatchSize",
0517:                        new DimensionUIResource(10, 10),
0518:                        "ColorChooser.swatchesSwatchSize",
0519:                        new DimensionUIResource(10, 10),
0520:                        "ComboBox.ancestorInputMap",
0521:                        new UIDefaults.LazyInputMap(comboBoxAncestorInputMap),
0522:                        "ComboBox.font",
0523:                        lazyValueForFont("SansSerif", Font.PLAIN, 12),
0524:                        "Desktop.ancestorInputMap",
0525:                        new UIDefaults.LazyInputMap(desktopAncestorInputMap),
0526:                        "DesktopIcon.border",
0527:                        new UIDefaults.ProxyLazyValue(
0528:                                "javax.swing.plaf.basic.BasicBorders",
0529:                                "getInternalFrameBorder"),
0530:                        "EditorPane.border",
0531:                        new UIDefaults.ProxyLazyValue(
0532:                                "javax.swing.plaf.basic.BasicBorders$MarginBorder"),
0533:                        "EditorPane.caretBlinkRate",
0534:                        BLINK_RATE,
0535:                        "EditorPane.font",
0536:                        lazyValueForFont("Serif", Font.PLAIN, 12),
0537:                        "EditorPane.margin",
0538:                        new InsetsUIResource(3, 3, 3, 3),
0539:                        "FileChooser.ancestorInputMap",
0540:                        new UIDefaults.LazyInputMap(new Object[] { "ESCAPE",
0541:                                "cancelSelection" }),
0542:                        "FileChooser.detailsViewIcon",
0543:                        makeIcon(BasicLookAndFeel.class,
0544:                                "icons/DetailsView.gif"),
0545:                        "FileChooser.homeFolderIcon",
0546:                        makeIcon(BasicLookAndFeel.class, "icons/HomeFolder.gif"),
0547:                        "FileChooser.listViewIcon",
0548:                        makeIcon(BasicLookAndFeel.class, "icons/ListView.gif"),
0549:                        "FileChooser.newFolderIcon",
0550:                        makeIcon(BasicLookAndFeel.class, "icons/NewFolder.gif"),
0551:                        "FileChooser.upFolderIcon",
0552:                        makeIcon(BasicLookAndFeel.class, "icons/UpFolder.gif"),
0553:                        "FileView.computerIcon",
0554:                        makeIcon(BasicLookAndFeel.class, "icons/Computer.gif"),
0555:                        "FileView.directoryIcon",
0556:                        makeIcon(BasicLookAndFeel.class, "icons/Directory.gif"),
0557:                        "FileView.fileIcon",
0558:                        makeIcon(BasicLookAndFeel.class, "icons/File.gif"),
0559:                        "FileView.floppyDriveIcon",
0560:                        makeIcon(BasicLookAndFeel.class,
0561:                                "icons/FloppyDrive.gif"),
0562:                        "FileView.hardDriveIcon",
0563:                        makeIcon(BasicLookAndFeel.class, "icons/HardDrive.gif"),
0564:                        "FormattedTextField.border",
0565:                        new UIDefaults.ProxyLazyValue(
0566:                                "javax.swing.plaf.basic.BasicBorders",
0567:                                "getTextFieldBorder"),
0568:                        "FormattedTextField.caretBlinkRate",
0569:                        BLINK_RATE,
0570:                        "FormattedTextField.focusInputMap",
0571:                        new UIDefaults.LazyInputMap(
0572:                                formattedTextFieldFocusInputMap),
0573:                        "FormattedTextField.font",
0574:                        lazyValueForFont("SansSerif", Font.PLAIN, 12),
0575:                        "FormattedTextField.margin",
0576:                        new InsetsUIResource(0, 0, 0, 0),
0577:                        "InternalFrame.border",
0578:                        new UIDefaults.ProxyLazyValue(
0579:                                "javax.swing.plaf.basic.BasicBorders",
0580:                                "getInternalFrameBorder"),
0581:                        "InternalFrame.closeIcon",
0582:                        new UIDefaults.ProxyLazyValue(
0583:                                "javax.swing.plaf.basic.BasicIconFactory",
0584:                                "createEmptyFrameIcon"),
0585:                        "InternalFrame.icon",
0586:                        makeIcon(BasicLookAndFeel.class, "icons/Logo.gif"),
0587:                        "InternalFrame.iconifyIcon",
0588:                        new UIDefaults.ProxyLazyValue(
0589:                                "javax.swing.plaf.basic.BasicIconFactory",
0590:                                "createEmptyFrameIcon"),
0591:                        "InternalFrame.maximizeIcon",
0592:                        new UIDefaults.ProxyLazyValue(
0593:                                "javax.swing.plaf.basic.BasicIconFactory",
0594:                                "createEmptyFrameIcon"),
0595:                        "InternalFrame.minimizeIcon",
0596:                        new UIDefaults.ProxyLazyValue(
0597:                                "javax.swing.plaf.basic.BasicIconFactory",
0598:                                "createEmptyFrameIcon"),
0599:                        "InternalFrame.titleFont",
0600:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0601:                        "InternalFrame.windowBindings",
0602:                        new Object[] { "shift ESCAPE", "showSystemMenu",
0603:                                "ctrl SPACE", "showSystemMenu", "ESCAPE",
0604:                                "hideSystemMenu" },
0605:                        "Label.font",
0606:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0607:                        "List.cellRenderer",
0608:                        makeListCellRenderer(),
0609:                        "List.focusCellHighlightBorder",
0610:                        new UIDefaults.ProxyLazyValue(
0611:                                "javax.swing.plaf.BorderUIResource$LineBorderUIResource",
0612:                                new Object[] { new ColorUIResource(Color.BLACK) }),
0613:                        "List.focusInputMap",
0614:                        new UIDefaults.LazyInputMap(listFocusInputMap),
0615:                        "List.focusInputMap.RightToLeft",
0616:                        new UIDefaults.LazyInputMap(
0617:                                listFocusInputMapRightToLeft),
0618:                        "List.font",
0619:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0620:                        "Menu.acceleratorFont",
0621:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0622:                        "Menu.arrowIcon",
0623:                        new UIDefaults.ProxyLazyValue(
0624:                                "javax.swing.plaf.basic.BasicIconFactory",
0625:                                "getMenuArrowIcon"),
0626:                        "Menu.border",
0627:                        new UIDefaults.ProxyLazyValue(
0628:                                "javax.swing.plaf.basic.BasicBorders$MarginBorder"),
0629:                        "Menu.borderPainted",
0630:                        Boolean.FALSE,
0631:                        "Menu.checkIcon",
0632:                        new UIDefaults.ProxyLazyValue(
0633:                                "javax.swing.plaf.basic.BasicIconFactory",
0634:                                "getMenuItemCheckIcon"),
0635:                        "Menu.crossMenuMnemonic",
0636:                        Boolean.TRUE,
0637:                        "Menu.font",
0638:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0639:                        "Menu.margin",
0640:                        new InsetsUIResource(2, 2, 2, 2),
0641:                        "Menu.menuPopupOffsetX",
0642:                        new Integer(0),
0643:                        "Menu.menuPopupOffsetY",
0644:                        new Integer(0),
0645:                        "Menu.shortcutKeys",
0646:                        new int[] { KeyEvent.ALT_MASK },
0647:                        "Menu.submenuPopupOffsetX",
0648:                        new Integer(-2),
0649:                        "Menu.submenuPopupOffsetY",
0650:                        new Integer(-2),
0651:                        "MenuBar.border",
0652:                        new UIDefaults.ProxyLazyValue(
0653:                                "javax.swing.plaf.basic.BasicBorders",
0654:                                "getMenuBarBorder"),
0655:                        "MenuBar.font",
0656:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0657:                        "MenuBar.windowBindings",
0658:                        new Object[] { "F10", "takeFocus" },
0659:                        "MenuItem.acceleratorDelimiter",
0660:                        new String("+"),
0661:                        "MenuItem.acceleratorFont",
0662:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0663:                        "MenuItem.arrowIcon",
0664:                        new UIDefaults.ProxyLazyValue(
0665:                                "javax.swing.plaf.basic.BasicIconFactory",
0666:                                "getMenuItemArrowIcon"),
0667:                        "MenuItem.border",
0668:                        new UIDefaults.ProxyLazyValue(
0669:                                "javax.swing.plaf.basic.BasicBorders$MarginBorder"),
0670:                        "MenuItem.borderPainted",
0671:                        Boolean.FALSE,
0672:                        "MenuItem.checkIcon",
0673:                        new UIDefaults.ProxyLazyValue(
0674:                                "javax.swing.plaf.basic.BasicIconFactory",
0675:                                "getMenuItemCheckIcon"),
0676:                        "MenuItem.font",
0677:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0678:                        "MenuItem.margin",
0679:                        new InsetsUIResource(2, 2, 2, 2),
0680:                        "OptionPane.border",
0681:                        new UIDefaults.ProxyLazyValue(
0682:                                "javax.swing.plaf.BorderUIResource$EmptyBorderUIResource",
0683:                                new Object[] { new Integer(10),
0684:                                        new Integer(10), new Integer(12),
0685:                                        new Integer(10) }),
0686:                        "OptionPane.buttonAreaBorder",
0687:                        new UIDefaults.ProxyLazyValue(
0688:                                "javax.swing.plaf.BorderUIResource$EmptyBorderUIResource",
0689:                                new Object[] { new Integer(6), new Integer(0),
0690:                                        new Integer(0), new Integer(0) }),
0691:                        "OptionPane.buttonClickThreshhold",
0692:                        new Integer(500),
0693:                        "OptionPane.errorIcon",
0694:                        makeIcon(BasicLookAndFeel.class, "icons/Error.gif"),
0695:                        "OptionPane.font",
0696:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0697:                        "OptionPane.informationIcon",
0698:                        makeIcon(BasicLookAndFeel.class, "icons/Inform.gif"),
0699:                        "OptionPane.messageAreaBorder",
0700:                        new UIDefaults.ProxyLazyValue(
0701:                                "javax.swing.plaf.BorderUIResource$EmptyBorderUIResource",
0702:                                new Object[] { new Integer(0), new Integer(0),
0703:                                        new Integer(0), new Integer(0) }),
0704:                        "OptionPane.minimumSize",
0705:                        new DimensionUIResource(262, 90),
0706:                        "OptionPane.questionIcon",
0707:                        makeIcon(BasicLookAndFeel.class, "icons/Question.gif"),
0708:                        "OptionPane.warningIcon",
0709:                        makeIcon(BasicLookAndFeel.class, "icons/Warn.gif"),
0710:                        "OptionPane.windowBindings",
0711:                        new Object[] { "ESCAPE", "close" },
0712:                        "Panel.font",
0713:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0714:                        "PasswordField.border",
0715:                        new UIDefaults.ProxyLazyValue(
0716:                                "javax.swing.plaf.basic.BasicBorders",
0717:                                "getTextFieldBorder"),
0718:                        "PasswordField.caretBlinkRate",
0719:                        BLINK_RATE,
0720:                        "PasswordField.font",
0721:                        lazyValueForFont("MonoSpaced", Font.PLAIN, 12),
0722:                        "PasswordField.margin",
0723:                        new InsetsUIResource(0, 0, 0, 0),
0724:                        "PopupMenu.border",
0725:                        new UIDefaults.ProxyLazyValue(
0726:                                "javax.swing.plaf.basic.BasicBorders",
0727:                                "getInternalFrameBorder"),
0728:                        "PopupMenu.font",
0729:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0730:                        "PopupMenu.selectedWindowInputMapBindings",
0731:                        new UIDefaults.LazyInputMap(
0732:                                popupMenuSelectedWindowInputMapBindings),
0733:                        "PopupMenu.selectedWindowInputMapBindings.RightToLeft",
0734:                        new UIDefaults.LazyInputMap(new Object[] { "LEFT",
0735:                                "selectChild", "KP_LEFT", "selectChild",
0736:                                "RIGHT", "selectParent", "KP_RIGHT",
0737:                                "selectParent" }),
0738:                        "ProgressBar.border",
0739:                        new UIDefaults.ProxyLazyValue(
0740:                                "javax.swing.plaf.basic.BasicBorders",
0741:                                "getProgressBarBorder"),
0742:                        "ProgressBar.verticalSize",
0743:                        new DimensionUIResource(12, 146),
0744:                        "ProgressBar.horizontalSize",
0745:                        new DimensionUIResource(146, 12),
0746:                        "ProgressBar.cellLength",
0747:                        new Integer(3),
0748:                        "ProgressBar.cellSpacing",
0749:                        new Integer(2),
0750:                        "ProgressBar.cycleTime",
0751:                        new Integer(500),
0752:                        "ProgressBar.font",
0753:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0754:                        "ProgressBar.repaintInterval",
0755:                        new Integer(60),
0756:                        "RadioButton.border",
0757:                        new UIDefaults.ProxyLazyValue(
0758:                                "javax.swing.plaf.basic.BasicBorders",
0759:                                "getRadioButtonBorder"),
0760:                        "RadioButton.focusInputMap",
0761:                        new UIDefaults.LazyInputMap(radioButtonFocusInputMap),
0762:                        "RadioButton.font",
0763:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0764:                        "RadioButton.icon",
0765:                        new UIDefaults.ProxyLazyValue(
0766:                                "javax.swing.plaf.basic.BasicIconFactory",
0767:                                "getRadioButtonIcon"),
0768:                        "RadioButton.margin",
0769:                        new InsetsUIResource(2, 2, 2, 2),
0770:                        "RadioButton.textIconGap",
0771:                        new Integer(4),
0772:                        "RadioButton.textShiftOffset",
0773:                        new Integer(0),
0774:                        "RadioButtonMenuItem.acceleratorFont",
0775:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0776:                        "RadioButtonMenuItem.arrowIcon",
0777:                        new UIDefaults.ProxyLazyValue(
0778:                                "javax.swing.plaf.basic.BasicIconFactory",
0779:                                "getMenuItemArrowIcon"),
0780:                        "RadioButtonMenuItem.border",
0781:                        new UIDefaults.ProxyLazyValue(
0782:                                "javax.swing.plaf.basic.BasicBorders$MarginBorder"),
0783:                        "RadioButtonMenuItem.borderPainted",
0784:                        Boolean.FALSE,
0785:                        "RadioButtonMenuItem.checkIcon",
0786:                        new UIDefaults.ProxyLazyValue(
0787:                                "javax.swing.plaf.basic.BasicIconFactory",
0788:                                "getRadioButtonMenuItemIcon"),
0789:                        "RadioButtonMenuItem.font",
0790:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0791:                        "RadioButtonMenuItem.margin",
0792:                        new InsetsUIResource(2, 2, 2, 2),
0793:                        "RootPane.defaultButtonWindowKeyBindings",
0794:                        new Object[] { "ENTER", "press", "released ENTER",
0795:                                "release", "ctrl ENTER", "press",
0796:                                "ctrl released ENTER", "release" },
0797:                        "RootPane.ancestorInputMap",
0798:                        new UIDefaults.LazyInputMap(rootPaneAncestorInputMap),
0799:                        "ScrollBar.ancestorInputMap",
0800:                        new UIDefaults.LazyInputMap(scrollBarAncestorInputMap),
0801:                        "ScrollBar.ancestorInputMap.RightToLeft",
0802:                        new UIDefaults.LazyInputMap(
0803:                                scrollBarAncestorInputMapRightToLeft),
0804:                        "ScrollBar.maximumThumbSize",
0805:                        new DimensionUIResource(4096, 4096),
0806:                        "ScrollBar.minimumThumbSize",
0807:                        new DimensionUIResource(8, 8),
0808:                        "ScrollBar.width",
0809:                        new Integer(16),
0810:                        "ScrollPane.ancestorInputMap",
0811:                        new UIDefaults.LazyInputMap(scrollPaneAncestorInputMap),
0812:                        "ScrollPane.ancestorInputMap.RightToLeft",
0813:                        new UIDefaults.LazyInputMap(
0814:                                scrollPaneAncestorInputMapRightToLeft),
0815:                        "ScrollPane.border",
0816:                        new UIDefaults.ProxyLazyValue(
0817:                                "javax.swing.plaf.basic.BasicBorders",
0818:                                "getTextFieldBorder"),
0819:                        "ScrollPane.font",
0820:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0821:                        "Slider.focusInputMap",
0822:                        new UIDefaults.LazyInputMap(sliderFocusInputMap),
0823:                        "Slider.focusInputMap.RightToLeft",
0824:                        new UIDefaults.LazyInputMap(new Object[] { "RIGHT",
0825:                                "negativeUnitIncrement", "KP_RIGHT",
0826:                                "negativeUnitIncrement", "LEFT",
0827:                                "positiveUnitIncrement", "KP_LEFT",
0828:                                "positiveUnitIncrement" }),
0829:                        "Slider.focusInsets",
0830:                        new InsetsUIResource(2, 2, 2, 2),
0831:                        "Spinner.ancestorInputMap",
0832:                        new UIDefaults.LazyInputMap(spinnerAncestorInputMap),
0833:                        "Spinner.arrowButtonSize",
0834:                        new DimensionUIResource(16, 5),
0835:                        "Spinner.border",
0836:                        new UIDefaults.ProxyLazyValue(
0837:                                "javax.swing.plaf.basic.BasicBorders",
0838:                                "getTextFieldBorder"),
0839:                        "Spinner.editorBorderPainted",
0840:                        Boolean.FALSE,
0841:                        "Spinner.font",
0842:                        lazyValueForFont("MonoSpaced", Font.PLAIN, 12),
0843:                        "SplitPane.ancestorInputMap",
0844:                        new UIDefaults.LazyInputMap(splitPaneAncestorInputMap),
0845:                        "SplitPane.border",
0846:                        new UIDefaults.ProxyLazyValue(
0847:                                "javax.swing.plaf.basic.BasicBorders",
0848:                                "getSplitPaneBorder"),
0849:                        "SplitPane.dividerSize",
0850:                        new Integer(7),
0851:                        "SplitPaneDivider.border",
0852:                        new UIDefaults.ProxyLazyValue(
0853:                                "javax.swing.plaf.basic.BasicBorders",
0854:                                "getSplitPaneDividerBorder"),
0855:                        "TabbedPane.ancestorInputMap",
0856:                        new UIDefaults.LazyInputMap(tabbedPaneAncestorInputMap),
0857:                        "TabbedPane.contentBorderInsets",
0858:                        new InsetsUIResource(2, 2, 3, 3),
0859:                        "TabbedPane.focusInputMap",
0860:                        new UIDefaults.LazyInputMap(tabbedPaneFocusInputMap),
0861:                        "TabbedPane.font",
0862:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0863:                        "TabbedPane.selectedTabPadInsets",
0864:                        new InsetsUIResource(2, 2, 2, 1),
0865:                        "TabbedPane.tabAreaInsets",
0866:                        new InsetsUIResource(3, 2, 0, 2),
0867:                        "TabbedPane.tabInsets",
0868:                        new InsetsUIResource(0, 4, 1, 4),
0869:                        "TabbedPane.tabRunOverlay",
0870:                        new Integer(2),
0871:                        "TabbedPane.textIconGap",
0872:                        new Integer(4),
0873:                        "Table.ancestorInputMap",
0874:                        new UIDefaults.LazyInputMap(tableAncestorInputMap),
0875:                        "Table.ancestorInputMap.RightToLeft",
0876:                        new UIDefaults.LazyInputMap(
0877:                                tableAncestorInputMapRightToLeft),
0878:                        "Table.focusCellHighlightBorder",
0879:                        new UIDefaults.ProxyLazyValue(
0880:                                "javax.swing.plaf.BorderUIResource$LineBorderUIResource",
0881:                                new Object[] { new ColorUIResource(Color.BLACK) }),
0882:                        "Table.font",
0883:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0884:                        "Table.scrollPaneBorder",
0885:                        new UIDefaults.ProxyLazyValue(
0886:                                "javax.swing.plaf.BorderUIResource",
0887:                                "getLoweredBevelBorderUIResource"),
0888:                        "TableHeader.cellBorder",
0889:                        new UIDefaults.ProxyLazyValue(
0890:                                "javax.swing.plaf.BorderUIResource$BevelBorderUIResource",
0891:                                new Object[] { new Integer(0), null, null,
0892:                                        null, null }),
0893:                        "TableHeader.font",
0894:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0895:                        "TextArea.border",
0896:                        new UIDefaults.ProxyLazyValue(
0897:                                "javax.swing.plaf.basic.BasicBorders$MarginBorder"),
0898:                        "TextArea.caretBlinkRate",
0899:                        BLINK_RATE,
0900:                        "TextArea.font",
0901:                        lazyValueForFont("MonoSpaced", Font.PLAIN, 12),
0902:                        "TextArea.margin",
0903:                        new InsetsUIResource(0, 0, 0, 0),
0904:                        "TextField.border",
0905:                        new UIDefaults.ProxyLazyValue(
0906:                                "javax.swing.plaf.basic.BasicBorders",
0907:                                "getTextFieldBorder"),
0908:                        "TextField.caretBlinkRate",
0909:                        BLINK_RATE,
0910:                        "TextField.font",
0911:                        lazyValueForFont("SansSerif", Font.PLAIN, 12),
0912:                        "TextField.margin",
0913:                        new InsetsUIResource(0, 0, 0, 0),
0914:                        "TextPane.border",
0915:                        new UIDefaults.ProxyLazyValue(
0916:                                "javax.swing.plaf.basic.BasicBorders$MarginBorder"),
0917:                        "TextPane.caretBlinkRate",
0918:                        BLINK_RATE,
0919:                        "TextPane.font",
0920:                        lazyValueForFont("Serif", Font.PLAIN, 12),
0921:                        "TextPane.margin",
0922:                        new InsetsUIResource(3, 3, 3, 3),
0923:                        "TitledBorder.border",
0924:                        new UIDefaults.ProxyLazyValue(
0925:                                "javax.swing.plaf.BorderUIResource",
0926:                                "getEtchedBorderUIResource"),
0927:                        "TitledBorder.font",
0928:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0929:                        "ToggleButton.border",
0930:                        new UIDefaults.ProxyLazyValue(
0931:                                "javax.swing.plaf.basic.BasicBorders",
0932:                                "getToggleButtonBorder"),
0933:                        "ToggleButton.focusInputMap",
0934:                        new UIDefaults.LazyInputMap(toggleButtonFocusInputMap),
0935:                        "ToggleButton.font",
0936:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0937:                        "ToggleButton.margin",
0938:                        new InsetsUIResource(2, 14, 2, 14),
0939:                        "ToggleButton.textIconGap",
0940:                        new Integer(4),
0941:                        "ToggleButton.textShiftOffset",
0942:                        new Integer(0),
0943:                        "ToolBar.ancestorInputMap",
0944:                        new UIDefaults.LazyInputMap(toolBarAncestorInputMap),
0945:                        "ToolBar.border",
0946:                        new UIDefaults.ProxyLazyValue(
0947:                                "javax.swing.plaf.BorderUIResource",
0948:                                "getEtchedBorderUIResource"),
0949:                        "ToolBar.font",
0950:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0951:                        "ToolBar.separatorSize",
0952:                        new DimensionUIResource(10, 10),
0953:                        "ToolTip.border",
0954:                        new UIDefaults.ProxyLazyValue(
0955:                                "javax.swing.plaf.BorderUIResource",
0956:                                "getBlackLineBorderUIResource"),
0957:                        "ToolTip.font",
0958:                        lazyValueForFont("SansSerif", Font.PLAIN, 12),
0959:                        "Tree.ancestorInputMap",
0960:                        new UIDefaults.LazyInputMap(new Object[] { "ESCAPE",
0961:                                "cancel" }),
0962:                        "Tree.changeSelectionWithFocus",
0963:                        Boolean.TRUE,
0964:                        "Tree.closedIcon",
0965:                        makeIcon(BasicLookAndFeel.class, "icons/TreeClosed.gif"),
0966:                        "Tree.drawsFocusBorderAroundIcon",
0967:                        Boolean.FALSE,
0968:                        "Tree.editorBorder",
0969:                        new UIDefaults.ProxyLazyValue(
0970:                                "javax.swing.plaf.BorderUIResource",
0971:                                "getBlackLineBorderUIResource"),
0972:                        "Tree.focusInputMap",
0973:                        new UIDefaults.LazyInputMap(treeFocusInputMap),
0974:                        "Tree.focusInputMap.RightToLeft",
0975:                        new UIDefaults.LazyInputMap(
0976:                                treeFocusInputMapRightToLeft), "Tree.font",
0977:                        lazyValueForFont("Dialog", Font.PLAIN, 12),
0978:                        "Tree.leafIcon",
0979:                        makeIcon(BasicLookAndFeel.class, "icons/TreeLeaf.gif"),
0980:                        "Tree.leftChildIndent", new Integer(7),
0981:                        "Tree.openIcon",
0982:                        makeIcon(BasicLookAndFeel.class, "icons/TreeOpen.gif"),
0983:                        "Tree.rightChildIndent", new Integer(13),
0984:                        "Tree.rowHeight", new Integer(16),
0985:                        "Tree.scrollsOnExpand", Boolean.TRUE, "Viewport.font",
0986:                        lazyValueForFont("Dialog", Font.PLAIN, 12) };
0987:                Object[] componentColors = { "Button.background",
0988:                        uiDefs.get("control"), "Button.darkShadow",
0989:                        uiDefs.get("controlDkShadow"), "Button.foreground",
0990:                        uiDefs.get("controlText"), "Button.highlight",
0991:                        uiDefs.get("controlLtHighlight"), "Button.light",
0992:                        uiDefs.get("controlHighlight"), "Button.shadow",
0993:                        uiDefs.get("controlShadow"), "CheckBox.background",
0994:                        uiDefs.get("control"), "CheckBox.foreground",
0995:                        uiDefs.get("controlText"),
0996:                        "CheckBoxMenuItem.acceleratorForeground",
0997:                        uiDefs.get("menuText"),
0998:                        "CheckBoxMenuItem.acceleratorSelectionForeground",
0999:                        uiDefs.get("textHighlightText"),
1000:                        "CheckBoxMenuItem.background", uiDefs.get("menu"),
1001:                        "CheckBoxMenuItem.foreground", uiDefs.get("menuText"),
1002:                        "CheckBoxMenuItem.selectionBackground",
1003:                        uiDefs.get("textHighlight"),
1004:                        "CheckBoxMenuItem.selectionForeground",
1005:                        uiDefs.get("textHighlightText"),
1006:                        "ColorChooser.background", uiDefs.get("control"),
1007:                        "ColorChooser.foreground", uiDefs.get("controlText"),
1008:                        "ColorChooser.swatchesDefaultRecentColor",
1009:                        uiDefs.get("control"), "ComboBox.background",
1010:                        uiDefs.get("control"), "ComboBox.buttonBackground",
1011:                        uiDefs.get("control"), "ComboBox.buttonDarkShadow",
1012:                        uiDefs.get("controlDkShadow"),
1013:                        "ComboBox.buttonHighlight",
1014:                        uiDefs.get("controlLtHighlight"),
1015:                        "ComboBox.buttonShadow", uiDefs.get("controlShadow"),
1016:                        "ComboBox.disabledBackground", uiDefs.get("control"),
1017:                        "ComboBox.disabledForeground",
1018:                        uiDefs.get("textInactiveText"), "ComboBox.foreground",
1019:                        uiDefs.get("controlText"),
1020:                        "ComboBox.selectionBackground",
1021:                        uiDefs.get("textHighlight"),
1022:                        "ComboBox.selectionForeground",
1023:                        uiDefs.get("textHighlightText"), "Desktop.background",
1024:                        uiDefs.get("desktop"), "EditorPane.background",
1025:                        uiDefs.getColor("window"),
1026:                        "EditorPane.caretForeground", uiDefs.get("textText"),
1027:                        "EditorPane.foreground", uiDefs.get("textText"),
1028:                        "EditorPane.inactiveForeground",
1029:                        uiDefs.get("textInactiveText"),
1030:                        "EditorPane.selectionBackground",
1031:                        uiDefs.get("textHighlight"),
1032:                        "EditorPane.selectionForeground",
1033:                        uiDefs.get("textHighlightText"),
1034:                        "FormattedTextField.background", uiDefs.get("window"),
1035:                        "FormattedTextField.caretForeground",
1036:                        uiDefs.get("textText"),
1037:                        "FormattedTextField.foreground",
1038:                        uiDefs.get("textText"),
1039:                        "FormattedTextField.inactiveBackground",
1040:                        uiDefs.get("control"),
1041:                        "FormattedTextField.inactiveForeground",
1042:                        uiDefs.get("textInactiveText"),
1043:                        "FormattedTextField.selectionBackground",
1044:                        uiDefs.get("textHighlight"),
1045:                        "FormattedTextField.selectionForeground",
1046:                        uiDefs.get("textHighlightText"),
1047:                        "InternalFrame.activeTitleBackground",
1048:                        uiDefs.get("activeCaption"),
1049:                        "InternalFrame.activeTitleForeground",
1050:                        uiDefs.get("controlText"), "InternalFrame.borderColor",
1051:                        uiDefs.get("control"),
1052:                        "InternalFrame.borderDarkShadow",
1053:                        uiDefs.get("controlDkShadow"),
1054:                        "InternalFrame.borderHighlight",
1055:                        uiDefs.get("controlLtHighlight"),
1056:                        "InternalFrame.borderLight",
1057:                        uiDefs.get("controlHighlight"),
1058:                        "InternalFrame.borderShadow",
1059:                        uiDefs.get("controlShadow"),
1060:                        "InternalFrame.inactiveTitleBackground",
1061:                        uiDefs.get("inactiveCaption"),
1062:                        "InternalFrame.inactiveTitleForeground",
1063:                        uiDefs.get("inactiveCaptionText"), "Label.background",
1064:                        uiDefs.get("control"), "Label.disabledForeground",
1065:                        uiDefs.get("controlLtHighlight"),
1066:                        "Label.disabledShadow", uiDefs.get("controlShadow"),
1067:                        "Label.foreground", uiDefs.get("controlText"),
1068:                        "List.background", uiDefs.get("window"),
1069:                        "List.foreground", uiDefs.get("textText"),
1070:                        "List.selectionBackground",
1071:                        uiDefs.get("textHighlight"),
1072:                        "List.selectionForeground",
1073:                        uiDefs.get("textHighlightText"),
1074:                        "Menu.acceleratorForeground", uiDefs.get("menuText"),
1075:                        "Menu.acceleratorSelectionForeground",
1076:                        uiDefs.get("textHighlightText"), "Menu.background",
1077:                        uiDefs.get("menu"), "Menu.foreground",
1078:                        uiDefs.get("menuText"), "Menu.selectionBackground",
1079:                        uiDefs.get("textHighlight"),
1080:                        "Menu.selectionForeground",
1081:                        uiDefs.get("textHighlightText"), "MenuBar.background",
1082:                        uiDefs.get("menu"), "MenuBar.foreground",
1083:                        uiDefs.get("menuText"), "MenuBar.highlight",
1084:                        uiDefs.get("controlLtHighlight"), "MenuBar.shadow",
1085:                        uiDefs.get("controlShadow"),
1086:                        "MenuItem.acceleratorForeground",
1087:                        uiDefs.get("menuText"),
1088:                        "MenuItem.acceleratorSelectionForeground",
1089:                        uiDefs.get("textHighlightText"), "MenuItem.background",
1090:                        uiDefs.get("menu"), "MenuItem.foreground",
1091:                        uiDefs.get("menuText"), "MenuItem.selectionBackground",
1092:                        uiDefs.get("textHighlight"),
1093:                        "MenuItem.selectionForeground",
1094:                        uiDefs.get("textHighlightText"),
1095:                        "OptionPane.background", uiDefs.get("control"),
1096:                        "OptionPane.foreground", uiDefs.get("controlText"),
1097:                        "OptionPane.messageForeground",
1098:                        uiDefs.get("controlText"), "Panel.background",
1099:                        uiDefs.get("control"), "Panel.foreground",
1100:                        uiDefs.get("textText"), "PasswordField.background",
1101:                        uiDefs.get("window"), "PasswordField.caretForeground",
1102:                        uiDefs.get("textText"), "PasswordField.foreground",
1103:                        uiDefs.get("textText"),
1104:                        "PasswordField.inactiveBackground",
1105:                        uiDefs.get("control"),
1106:                        "PasswordField.inactiveForeground",
1107:                        uiDefs.get("textInactiveText"),
1108:                        "PasswordField.selectionBackground",
1109:                        uiDefs.get("textHighlight"),
1110:                        "PasswordField.selectionForeground",
1111:                        uiDefs.get("textHighlightText"),
1112:                        "PopupMenu.background", uiDefs.get("menu"),
1113:                        "PopupMenu.foreground", uiDefs.get("menuText"),
1114:                        "ProgressBar.background", uiDefs.get("control"),
1115:                        "ProgressBar.foreground", uiDefs.get("textHighlight"),
1116:                        "ProgressBar.selectionBackground",
1117:                        uiDefs.get("textHighlight"),
1118:                        "ProgressBar.selectionForeground",
1119:                        uiDefs.get("control"), "RadioButton.background",
1120:                        uiDefs.get("control"), "RadioButton.darkShadow",
1121:                        uiDefs.get("controlDkShadow"),
1122:                        "RadioButton.foreground", uiDefs.get("controlText"),
1123:                        "RadioButton.highlight",
1124:                        uiDefs.get("controlLtHighlight"), "RadioButton.light",
1125:                        uiDefs.get("controlHighlight"), "RadioButton.shadow",
1126:                        uiDefs.get("controlShadow"),
1127:                        "RadioButtonMenuItem.acceleratorForeground",
1128:                        uiDefs.get("menuText"),
1129:                        "RadioButtonMenuItem.acceleratorSelectionForeground",
1130:                        uiDefs.get("textHighlightText"),
1131:                        "RadioButtonMenuItem.background", uiDefs.get("menu"),
1132:                        "RadioButtonMenuItem.foreground",
1133:                        uiDefs.get("menuText"),
1134:                        "RadioButtonMenuItem.selectionBackground",
1135:                        uiDefs.get("textHighlight"),
1136:                        "RadioButtonMenuItem.selectionForeground",
1137:                        uiDefs.get("textHighlightText"),
1138:                        "ScrollBar.background", uiDefs.get("control"),
1139:                        "ScrollBar.foreground", uiDefs.get("control"),
1140:                        "ScrollBar.thumb", uiDefs.get("control"),
1141:                        "ScrollBar.thumbDarkShadow",
1142:                        uiDefs.get("controlDkShadow"),
1143:                        "ScrollBar.thumbHighlight",
1144:                        uiDefs.get("controlLtHighlight"),
1145:                        "ScrollBar.thumbShadow", uiDefs.get("controlShadow"),
1146:                        "ScrollBar.track", uiDefs.get("scrollbar"),
1147:                        "ScrollBar.trackHighlight",
1148:                        uiDefs.get("controlDkShadow"), "ScrollPane.background",
1149:                        uiDefs.get("control"), "ScrollPane.foreground",
1150:                        uiDefs.get("controlText"), "Separator.background",
1151:                        uiDefs.get("controlLtHighlight"),
1152:                        "Separator.foreground", uiDefs.get("controlShadow"),
1153:                        "Separator.highlight",
1154:                        uiDefs.get("controlLtHighlight"), "Separator.shadow",
1155:                        uiDefs.get("controlShadow"), "Slider.background",
1156:                        uiDefs.get("control"), "Slider.focus",
1157:                        uiDefs.get("controlDkShadow"), "Slider.foreground",
1158:                        uiDefs.get("control"), "Slider.highlight",
1159:                        uiDefs.get("controlLtHighlight"), "Slider.shadow",
1160:                        uiDefs.get("controlShadow"), "Spinner.background",
1161:                        uiDefs.get("control"), "Spinner.foreground",
1162:                        uiDefs.get("control"), "SplitPane.background",
1163:                        uiDefs.get("control"), "SplitPane.darkShadow",
1164:                        uiDefs.get("controlDkShadow"), "SplitPane.highlight",
1165:                        uiDefs.get("controlLtHighlight"), "SplitPane.shadow",
1166:                        uiDefs.get("controlShadow"), "TabbedPane.background",
1167:                        uiDefs.get("control"), "TabbedPane.darkShadow",
1168:                        uiDefs.get("controlDkShadow"), "TabbedPane.focus",
1169:                        uiDefs.get("controlText"), "TabbedPane.foreground",
1170:                        uiDefs.get("controlText"), "TabbedPane.highlight",
1171:                        uiDefs.get("controlLtHighlight"), "TabbedPane.light",
1172:                        uiDefs.get("controlHighlight"), "TabbedPane.shadow",
1173:                        uiDefs.get("controlShadow"), "Table.background",
1174:                        uiDefs.get("window"), "Table.focusCellBackground",
1175:                        uiDefs.get("window"), "Table.focusCellForeground",
1176:                        uiDefs.get("controlText"), "Table.foreground",
1177:                        uiDefs.get("controlText"), "Table.gridColor",
1178:                        uiDefs.get("controlDkShadow"),
1179:                        "Table.selectionBackground",
1180:                        uiDefs.get("textHighlight"),
1181:                        "Table.selectionForeground",
1182:                        uiDefs.get("textHighlightText"),
1183:                        "TableHeader.background", uiDefs.get("control"),
1184:                        "TableHeader.foreground", uiDefs.get("controlText"),
1185:                        "TextArea.background", uiDefs.get("window"),
1186:                        "TextArea.caretForeground", uiDefs.get("textText"),
1187:                        "TextArea.foreground", uiDefs.get("textText"),
1188:                        "TextArea.inactiveForeground",
1189:                        uiDefs.get("textInactiveText"),
1190:                        "TextArea.selectionBackground",
1191:                        uiDefs.get("textHighlight"),
1192:                        "TextArea.selectionForeground",
1193:                        uiDefs.get("textHighlightText"),
1194:                        "TextField.background", uiDefs.get("window"),
1195:                        "TextField.caretForeground", uiDefs.get("textText"),
1196:                        "TextField.darkShadow", uiDefs.get("controlDkShadow"),
1197:                        "TextField.foreground", uiDefs.get("textText"),
1198:                        "TextField.highlight",
1199:                        uiDefs.get("controlLtHighlight"),
1200:                        "TextField.inactiveBackground", uiDefs.get("control"),
1201:                        "TextField.inactiveForeground",
1202:                        uiDefs.get("textInactiveText"), "TextField.light",
1203:                        uiDefs.get("controlHighlight"),
1204:                        "TextField.selectionBackground",
1205:                        uiDefs.get("textHighlight"),
1206:                        "TextField.selectionForeground",
1207:                        uiDefs.get("textHighlightText"), "TextField.shadow",
1208:                        uiDefs.get("controlShadow"), "TextPane.background",
1209:                        uiDefs.get("window"), "TextPane.caretForeground",
1210:                        uiDefs.get("textText"), "TextPane.foreground",
1211:                        uiDefs.get("textText"), "TextPane.inactiveForeground",
1212:                        uiDefs.get("textInactiveText"),
1213:                        "TextPane.selectionBackground",
1214:                        uiDefs.get("textHighlight"),
1215:                        "TextPane.selectionForeground",
1216:                        uiDefs.get("textHighlightText"),
1217:                        "TitledBorder.titleColor", uiDefs.get("controlText"),
1218:                        "ToggleButton.background", uiDefs.get("control"),
1219:                        "ToggleButton.darkShadow",
1220:                        uiDefs.get("controlDkShadow"),
1221:                        "ToggleButton.foreground", uiDefs.get("controlText"),
1222:                        "ToggleButton.highlight",
1223:                        uiDefs.get("controlLtHighlight"), "ToggleButton.light",
1224:                        uiDefs.get("controlHighlight"), "ToggleButton.shadow",
1225:                        uiDefs.get("controlShadow"), "ToolBar.background",
1226:                        uiDefs.get("control"), "ToolBar.darkShadow",
1227:                        uiDefs.get("controlDkShadow"),
1228:                        "ToolBar.dockingBackground", uiDefs.get("control"),
1229:                        "ToolBar.dockingForeground",
1230:                        new ColorUIResource(Color.GREEN),
1231:                        "ToolBar.floatingBackground", uiDefs.get("control"),
1232:                        "ToolBar.floatingForeground",
1233:                        uiDefs.get("controlDkShadow"), "ToolBar.foreground",
1234:                        uiDefs.get("controlText"), "ToolBar.highlight",
1235:                        uiDefs.get("controlLtHighlight"), "ToolBar.light",
1236:                        uiDefs.get("controlHighlight"), "ToolBar.shadow",
1237:                        uiDefs.get("controlShadow"), "ToolTip.background",
1238:                        uiDefs.get("info"), "ToolTip.foreground",
1239:                        uiDefs.get("infoText"), "Tree.background",
1240:                        uiDefs.get("window"), "Tree.foreground",
1241:                        uiDefs.get("textText"), "Tree.hash",
1242:                        uiDefs.get("controlDkShadow"),
1243:                        "Tree.selectionBackground",
1244:                        uiDefs.get("textHighlight"),
1245:                        "Tree.selectionBorderColor", uiDefs.get("controlText"),
1246:                        "Tree.selectionForeground",
1247:                        uiDefs.get("textHighlightText"), "Tree.textBackground",
1248:                        uiDefs.get("text"), "Tree.textForeground",
1249:                        uiDefs.get("textText"), "Viewport.background",
1250:                        uiDefs.get("control"), "Viewport.foreground",
1251:                        uiDefs.get("textText") };
1252:
1253:                uiDefs.putDefaults(componentColors);
1254:                uiDefs.putDefaults(basicCompDefaults);
1255:            }
1256:
1257:            protected void initClassDefaults(final UIDefaults uiDefs) {
1258:                Object[] basicComponentUIs = { "InternalFrameUI",
1259:                        "javax.swing.plaf.basic.BasicInternalFrameUI",
1260:                        "ViewportUI", "javax.swing.plaf.basic.BasicViewportUI",
1261:                        "ScrollBarUI",
1262:                        "javax.swing.plaf.basic.BasicScrollBarUI", "ToolTipUI",
1263:                        "javax.swing.plaf.basic.BasicToolTipUI", "MenuItemUI",
1264:                        "javax.swing.plaf.basic.BasicMenuItemUI", "MenuUI",
1265:                        "javax.swing.plaf.basic.BasicMenuUI", "TextAreaUI",
1266:                        "javax.swing.plaf.basic.BasicTextAreaUI",
1267:                        "PopupMenuUI",
1268:                        "javax.swing.plaf.basic.BasicPopupMenuUI",
1269:                        "ScrollPaneUI",
1270:                        "javax.swing.plaf.basic.BasicScrollPaneUI", "SliderUI",
1271:                        "javax.swing.plaf.basic.BasicSliderUI", "ComboBoxUI",
1272:                        "javax.swing.plaf.basic.BasicComboBoxUI",
1273:                        "RadioButtonUI",
1274:                        "javax.swing.plaf.basic.BasicRadioButtonUI",
1275:                        "FormattedTextFieldUI",
1276:                        "javax.swing.plaf.basic.BasicFormattedTextFieldUI",
1277:                        "TreeUI", "javax.swing.plaf.basic.BasicTreeUI",
1278:                        "MenuBarUI", "javax.swing.plaf.basic.BasicMenuBarUI",
1279:                        "RadioButtonMenuItemUI",
1280:                        "javax.swing.plaf.basic.BasicRadioButtonMenuItemUI",
1281:                        "ProgressBarUI",
1282:                        "javax.swing.plaf.basic.BasicProgressBarUI",
1283:                        "ToolBarUI", "javax.swing.plaf.basic.BasicToolBarUI",
1284:                        "ColorChooserUI",
1285:                        "javax.swing.plaf.basic.BasicColorChooserUI",
1286:                        "ToolBarSeparatorUI",
1287:                        "javax.swing.plaf.basic.BasicToolBarSeparatorUI",
1288:                        "TabbedPaneUI",
1289:                        "javax.swing.plaf.basic.BasicTabbedPaneUI",
1290:                        "DesktopPaneUI",
1291:                        "javax.swing.plaf.basic.BasicDesktopPaneUI", "TableUI",
1292:                        "javax.swing.plaf.basic.BasicTableUI", "PanelUI",
1293:                        "javax.swing.plaf.basic.BasicPanelUI",
1294:                        "CheckBoxMenuItemUI",
1295:                        "javax.swing.plaf.basic.BasicCheckBoxMenuItemUI",
1296:                        "PasswordFieldUI",
1297:                        "javax.swing.plaf.basic.BasicPasswordFieldUI",
1298:                        "CheckBoxUI", "javax.swing.plaf.basic.BasicCheckBoxUI",
1299:                        "TableHeaderUI",
1300:                        "javax.swing.plaf.basic.BasicTableHeaderUI",
1301:                        "SplitPaneUI",
1302:                        "javax.swing.plaf.basic.BasicSplitPaneUI",
1303:                        "EditorPaneUI",
1304:                        "javax.swing.plaf.basic.BasicEditorPaneUI", "ListUI",
1305:                        "javax.swing.plaf.basic.BasicListUI", "SpinnerUI",
1306:                        "javax.swing.plaf.basic.BasicSpinnerUI",
1307:                        "DesktopIconUI",
1308:                        "javax.swing.plaf.basic.BasicDesktopIconUI",
1309:                        "TextFieldUI",
1310:                        "javax.swing.plaf.basic.BasicTextFieldUI",
1311:                        "TextPaneUI", "javax.swing.plaf.basic.BasicTextPaneUI",
1312:                        "LabelUI", "javax.swing.plaf.basic.BasicLabelUI",
1313:                        "ButtonUI", "javax.swing.plaf.basic.BasicButtonUI",
1314:                        "ToggleButtonUI",
1315:                        "javax.swing.plaf.basic.BasicToggleButtonUI",
1316:                        "OptionPaneUI",
1317:                        "javax.swing.plaf.basic.BasicOptionPaneUI",
1318:                        "PopupMenuSeparatorUI",
1319:                        "javax.swing.plaf.basic.BasicPopupMenuSeparatorUI",
1320:                        "RootPaneUI", "javax.swing.plaf.basic.BasicRootPaneUI",
1321:                        "SeparatorUI",
1322:                        "javax.swing.plaf.basic.BasicSeparatorUI" };
1323:
1324:                uiDefs.putDefaults(basicComponentUIs);
1325:            }
1326:
1327:            public UIDefaults getDefaults() {
1328:                if (uiDefaults == null) {
1329:                    uiDefaults = new UIDefaults();
1330:                    initClassDefaults(uiDefaults);
1331:                    initSystemColorDefaults(uiDefaults);
1332:                    initComponentDefaults(uiDefaults);
1333:                    uiDefaults.addResourceBundle(RESOURCE_BUNDLE);
1334:                }
1335:
1336:                return uiDefaults;
1337:            }
1338:
1339:            protected ActionMap getAudioActionMap() {
1340:                ActionMapUIResource result = new ActionMapUIResource();
1341:                Object[] actions = (Object[]) getDefaults().get(
1342:                        "AuditoryCues.cueList");
1343:                if (actions == null) {
1344:                    return result;
1345:                }
1346:                for (int i = 0; i < actions.length; i++) {
1347:                    result.put(actions[i], createAudioAction(actions[i]));
1348:                }
1349:
1350:                return result;
1351:            }
1352:
1353:            protected Action createAudioAction(final Object key) {
1354:                return new AudioAction((String) key);
1355:            }
1356:
1357:            void fireSoundAction(final JComponent c, final String name) {
1358:                ActionMap map = SwingUtilities.getUIActionMap(c);
1359:                if (map != null) {
1360:                    playSound(map.get(name));
1361:                }
1362:            }
1363:
1364:            protected void playSound(final Action action) {
1365:                if (action == null) {
1366:                    return;
1367:                }
1368:
1369:                String key = (String) action.getValue(Action.NAME);
1370:                Object[] actions = (Object[]) UIManager.getDefaults().get(
1371:                        "AuditoryCues.playList");
1372:                if (actions == null) {
1373:                    return;
1374:                }
1375:                for (int i = 0; i < actions.length; i++) {
1376:                    if (actions[i].equals(key)) {
1377:                        action.actionPerformed(new ActionEvent(this , 10001,
1378:                                null));
1379:                        break;
1380:                    }
1381:                }
1382:            }
1383:
1384:            private Object makeListCellRenderer() {
1385:                return new UIDefaults.ActiveValue() {
1386:                    public Object createValue(final UIDefaults uiDefaults) {
1387:                        return new DefaultListCellRenderer.UIResource();
1388:                    }
1389:                };
1390:            }
1391:
1392:            private static ProxyLazyValue lazyValueForFont(
1393:                    final String fontName, final int style, final int size) {
1394:                return new UIDefaults.ProxyLazyValue(
1395:                        "javax.swing.plaf.FontUIResource",
1396:                        new Object[] { fontName, new Integer(style),
1397:                                new Integer(size) });
1398:            }
1399:
1400:            private void loadColors(final UIDefaults uiDefs,
1401:                    final String[] colors) {
1402:                for (int i = 0; i < colors.length; i += 2) {
1403:                    uiDefs.put(colors[i], new ColorUIResource(Integer.decode(
1404:                            colors[i + 1]).intValue()));
1405:                }
1406:            }
1407:
1408:            private void loadSystemColors(final UIDefaults uiDefs,
1409:                    final Object[] colors) {
1410:                for (int i = 0; i < colors.length; i += 2) {
1411:                    uiDefs.put(colors[i], (colors[i + 1]));
1412:                }
1413:            }
1414:
1415:            private Object[] getBasicSystemColors() {
1416:                Object[] basicSystemColors = { "desktop", SystemColor.desktop,
1417:                        "activeCaption", SystemColor.activeCaption,
1418:                        "activeCaptionText", SystemColor.activeCaptionText,
1419:                        "activeCaptionBorder", SystemColor.activeCaptionBorder,
1420:                        "inactiveCaption", SystemColor.inactiveCaption,
1421:                        "inactiveCaptionText", SystemColor.inactiveCaptionText,
1422:                        "inactiveCaptionBorder",
1423:                        SystemColor.inactiveCaptionBorder, "window",
1424:                        SystemColor.window, "windowBorder",
1425:                        SystemColor.windowBorder, "windowText",
1426:                        SystemColor.windowText, "menu", SystemColor.menu,
1427:                        "menuText", SystemColor.menuText, "text",
1428:                        SystemColor.text, "textText", SystemColor.textText,
1429:                        "textHighlight", SystemColor.textHighlight,
1430:                        "textHighlightText", SystemColor.textHighlightText,
1431:                        "textInactiveText", SystemColor.textInactiveText,
1432:                        "control", SystemColor.control, "controlText",
1433:                        SystemColor.controlText, "controlHighlight",
1434:                        SystemColor.controlHighlight, "controlLtHighlight",
1435:                        SystemColor.controlLtHighlight, "controlShadow",
1436:                        SystemColor.controlShadow, "controlDkShadow",
1437:                        SystemColor.controlDkShadow, "scrollbar",
1438:                        SystemColor.scrollbar, "info", SystemColor.info,
1439:                        "infoText", SystemColor.infoText };
1440:                return basicSystemColors;
1441:            }
1442:
1443:            final class AudioAction extends AbstractAction {
1444:                private String key;
1445:
1446:                AudioAction(final String key) {
1447:                    this .key = key;
1448:                    this .putValue(Action.NAME, key);
1449:                }
1450:
1451:                /**
1452:                 * Create instance of Runnable which plays sound mapped with key
1453:                 * @param String key
1454:                 * @return Runnable result
1455:                 */
1456:                private Runnable createRunnableSound(final String key) {
1457:                    String pathToSound = getDefaults().getString(key);
1458:                    if (pathToSound == null) {
1459:                        return defaultRunnable();
1460:                    }
1461:                    URL url = BasicLookAndFeel.class.getResource(pathToSound);
1462:                    if (url == null) {
1463:                        return (Runnable) BasicLookAndFeel
1464:                                .getDesktopPropertyValue(pathToSound,
1465:                                        defaultRunnable());
1466:                    }
1467:
1468:                    return getSoundRunnableFromURL(url);
1469:                }
1470:
1471:                /**
1472:                 * Create Runnable to get sound from URL
1473:                 * @param URL url
1474:                 * @return Runnable result
1475:                 */
1476:                private Runnable getSoundRunnableFromURL(final URL url) {
1477:                    /* TODO return back when sound is implemented
1478:                    try {
1479:                        final AudioInputStream audioStream = AudioSystem.getAudioInputStream(url);
1480:                        final AudioFormat audioFormat = audioStream.getFormat();
1481:                        final DataLine.Info info = new DataLine.Info(SourceDataLine.class, audioFormat);
1482:                        if (AudioSystem.isLineSupported(info)) {
1483:                            return newRunnable(audioStream, audioFormat, info);
1484:                        }
1485:                    } catch (final Exception ignored) {
1486:                    }*/
1487:                    return defaultRunnable();
1488:                }
1489:
1490:                /**
1491:                 * Return Runnable to play the sound from audioStream
1492:                 * @param AudioInputStream audioStream
1493:                 * @param AudioFormat audioFormat
1494:                 * @param DataLine.Info info
1495:                 * @return Runnable result
1496:                 */
1497:                /*
1498:                 * TODO uncomment when javax.sound is implemented
1499:                private Runnable newRunnable(final AudioInputStream audioStream, final AudioFormat audioFormat, final DataLine.Info info) {
1500:                    return new Runnable() {
1501:                        public void run() {
1502:                            try {
1503:                                SourceDataLine line = (SourceDataLine) AudioSystem.getLine(info);
1504:                                line.open(audioFormat);
1505:                                line.start();
1506:                                byte[] data = new byte[audioStream.available()];
1507:                                audioStream.read(data);
1508:                                line.write(data, 0, data.length);
1509:                                line.drain();
1510:                                line.stop();
1511:                                line.close();
1512:                            } catch (final Exception ignored) {
1513:                                ignored.printStackTrace();
1514:                            }
1515:                        }
1516:                    };
1517:                }
1518:                 */
1519:
1520:                /**
1521:                 * Perform action
1522:                 */
1523:                public void actionPerformed(final ActionEvent e) {
1524:                    new Thread(createRunnableSound(key)).start();
1525:                }
1526:
1527:                /**
1528:                 * Empty Runnable
1529:                 * @return Runnable result
1530:                 */
1531:                private Runnable defaultRunnable() {
1532:                    return new Runnable() {
1533:                        public void run() {
1534:                        }
1535:                    };
1536:                }
1537:            }
1538:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.