-/*\r
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.\r
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\r
- *\r
- * This code is free software; you can redistribute it and/or modify it\r
- * under the terms of the GNU General Public License version 2 only, as\r
- * published by the Free Software Foundation. Oracle designates this\r
- * particular file as subject to the "Classpath" exception as provided\r
- * by Oracle in the LICENSE file that accompanied this code.\r
- *\r
- * This code is distributed in the hope that it will be useful, but WITHOUT\r
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\r
- * version 2 for more details (a copy is included in the LICENSE file that\r
- * accompanied this code).\r
- *\r
- * You should have received a copy of the GNU General Public License version\r
- * 2 along with this work; if not, write to the Free Software Foundation,\r
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\r
- *\r
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\r
- * or visit www.oracle.com if you need additional information or have any\r
- * questions.\r
- */\r
-\r
-package swingjs.plaf;\r
-\r
-//import jsjava.awt.AWTEvent;\r
-import jsjava.awt.Color;\r
-import jsjava.awt.Dimension;\r
-import jsjava.awt.Font;\r
-import jsjavax.swing.DefaultListCellRenderer;\r
-import jsjavax.swing.JTextField;\r
-//import jsjava.awt.Component;\r
-//import jsjava.awt.Dimension;\r
-//import jsjava.awt.Font;\r
-//import jsjava.awt.Point;\r
-//import jsjava.awt.Toolkit;\r
-//import jsjava.awt.Window;\r
-//import jsjava.awt.event.AWTEventListener;\r
-//import jsjava.awt.event.ActionEvent;\r
-//import jsjava.awt.event.KeyEvent;\r
-//import jsjava.awt.event.MouseEvent;\r
-//import jsjava.beans.PropertyChangeEvent;\r
-//import jsjava.beans.PropertyChangeListener;\r
-//import jsjava.beans.PropertyVetoException;\r
-//import java.io.BufferedInputStream;\r
-//import java.io.ByteArrayInputStream;\r
-//import java.io.ByteArrayOutputStream;\r
-//import java.io.IOException;\r
-//import java.io.InputStream;\r
-////import java.io.Serializable;\r
-//import jsjava.security.AccessController;\r
-//import jsjava.security.PrivilegedAction;\r
-//import java.util.HashSet;\r
-//import jsjava.util.Locale;\r
-//\r
-////import jsjavax.sound.sampled.AudioInputStream;\r
-////import jsjavax.sound.sampled.AudioSystem;\r
-////import jsjavax.sound.sampled.Clip;\r
-////import jsjavax.sound.sampled.DataLine;\r
-////import jsjavax.sound.sampled.LineEvent;\r
-////import jsjavax.sound.sampled.LineListener;\r
-//import jsjavax.swing.AbstractAction;\r
-//import jsjavax.swing.Action;\r
-//import jsjavax.swing.ActionMap;\r
-//import jsjavax.swing.DefaultListCellRenderer;\r
-//import jsjavax.swing.JComponent;\r
-////import jsjavax.swing.JInternalFrame;\r
-//import jsjavax.swing.JTextField;\r
-//import jsjavax.swing.LookAndFeel;\r
-//import jsjavax.swing.MenuElement;\r
-//import jsjavax.swing.MenuSelectionManager;\r
-//import jsjavax.swing.SwingUtilities;\r
-import jsjavax.swing.LookAndFeel;\r
-import jsjavax.swing.UIDefaults;\r
-//import jsjavax.swing.UIManager;\r
-//import jsjavax.swing.border.BevelBorder;\r
-//import jsjavax.swing.plaf.ActionMapUIResource;\r
-//import jsjavax.swing.plaf.BorderUIResource;\r
-import jsjavax.swing.plaf.ColorUIResource;\r
-import jsjavax.swing.plaf.FontUIResource;\r
-//import jsjavax.swing.plaf.ComponentUI;\r
-import jsjavax.swing.plaf.DimensionUIResource;\r
-//import jsjavax.swing.plaf.DimensionUIResource;\r
-//import jsjavax.swing.plaf.InsetsUIResource;\r
-////import jsjavax.swing.plaf.basic.popupMenuUI;\r
-////import jsjavax.swing.plaf.basic.BasicSplitPaneDivider;\r
-//import jsjavax.swing.text.DefaultEditorKit;\r
-//\r
-//import jssun.awt.AppContext;\r
-//import jssun.swing.SwingUtilities2;\r
-////import jssun.swing.SwingLazyValue;\r
-//\r
-import jsjavax.swing.plaf.InsetsUIResource;\r
-import jssun.swing.SwingLazyValue;\r
-\r
-/**\r
- * A base class to use in creating a look and feel for Swing.\r
- * <p>\r
- * Each of the {@code ComponentUI}s provided by {@code BasicLookAndFeel} derives\r
- * its behavior from the defaults table. Unless otherwise noted each of the\r
- * {@code ComponentUI} implementations in this package document the set of\r
- * defaults they use. Unless otherwise noted the defaults are installed at the\r
- * time {@code installUI} is invoked, and follow the recommendations outlined in\r
- * {@code LookAndFeel} for installing defaults.\r
- * <p>\r
- * <strong>Warning:</strong> Serialized objects of this class will not be\r
- * compatible with future Swing releases. The current serialization support is\r
- * appropriate for short term storage or RMI between applications running the\r
- * same version of Swing. As of 1.4, support for long term storage of all\r
- * JavaBeans<sup><font size="-2">TM</font></sup> has been added to the\r
- * <code>java.beans</code> package. Please see {@link java.beans.XMLEncoder}.\r
- * \r
- * @author unattributed\r
- */\r
-public class HTML5LookAndFeel extends LookAndFeel {\r
- // /**\r
- // * Whether or not the developer has created a JPopupMenu.\r
- // */\r
- // static boolean needsEventHelper;\r
- //\r
- // /**\r
- // * Lock used when manipulating clipPlaying.\r
- // */\r
- // private transient Object audioLock = new Object();\r
- // /**\r
- // * The Clip that is currently playing (set in AudioAction).\r
- // */\r
- // private Clip clipPlaying;\r
- //\r
- // AWTEventHelper invocator = null;\r
- //\r
- // /*\r
- // * Listen for our AppContext being disposed\r
- // */\r
- // private PropertyChangeListener disposer = null;\r
- //\r
- /**\r
- * Returns the look and feel defaults. The returned {@code UIDefaults} is\r
- * populated by invoking, in order, {@code initClassDefaults},\r
- * {@code initSystemColorDefaults} and {@code initComponentDefaults}.\r
- * <p>\r
- * While this method is public, it should only be invoked by the\r
- * {@code UIManager} when the look and feel is set as the current look and\r
- * feel and after {@code initialize} has been invoked.\r
- * \r
- * @return the look and feel defaults\r
- * \r
- * @see #initClassDefaults\r
- * @see #initSystemColorDefaults\r
- * @see #initComponentDefaults\r
- */\r
- public UIDefaults getDefaults() {\r
- UIDefaults table = new UIDefaults(610, 0.75f);\r
-\r
- initClassDefaults(table);\r
- initSystemColorDefaults(table);\r
- initComponentDefaults(table);\r
-\r
- return table;\r
- }\r
-\r
- /**\r
- * {@inheritDoc}\r
- */\r
- public void initialize() {\r
- // if (needsEventHelper) {\r
- // installAWTEventListener();\r
- // }\r
- }\r
-\r
- void installAWTEventListener() {\r
- // if (invocator == null) {\r
- // invocator = new AWTEventHelper();\r
- // needsEventHelper = true;\r
- //\r
- // // Add a PropertyChangeListener to our AppContext so we're alerted\r
- // // when the AppContext is disposed(), at which time this laf should\r
- // // be uninitialize()d.\r
- // disposer = new PropertyChangeListener() {\r
- // public void propertyChange(PropertyChangeEvent prpChg) {\r
- // uninitialize();\r
- // }\r
- // };\r
- // AppContext.getAppContext().addPropertyChangeListener(\r
- // AppContext.GUI_DISPOSED,\r
- // disposer);\r
- // }\r
- }\r
-\r
- /**\r
- * {@inheritDoc}\r
- */\r
- public void uninitialize() {\r
- // AppContext context = AppContext.getAppContext();\r
- // synchronized (popupMenuUI.MOUSE_GRABBER_KEY) {\r
- // Object grabber = context.get(popupMenuUI.MOUSE_GRABBER_KEY);\r
- // if (grabber != null) {\r
- // ((popupMenuUI.MouseGrabber)grabber).uninstall();\r
- // }\r
- // }\r
- // synchronized (popupMenuUI.MENU_KEYBOARD_HELPER_KEY) {\r
- // Object helper =\r
- // context.get(popupMenuUI.MENU_KEYBOARD_HELPER_KEY);\r
- // if (helper != null) {\r
- // ((popupMenuUI.MenuKeyboardHelper)helper).uninstall();\r
- // }\r
- // }\r
- //\r
- // if(invocator != null) {\r
- // AccessController.doPrivileged(invocator);\r
- // invocator = null;\r
- // }\r
- //\r
- // if (disposer != null) {\r
- // // Note that we're likely calling removePropertyChangeListener()\r
- // // during the course of AppContext.firePropertyChange().\r
- // // However, EventListenerAggreggate has code to safely modify\r
- // // the list under such circumstances.\r
- // context.removePropertyChangeListener(AppContext.GUI_DISPOSED,\r
- // disposer);\r
- // disposer = null;\r
- // }\r
- }\r
-\r
- /**\r
- * Populates {@code table} with mappings from {@code uiClassID} to the fully\r
- * qualified name of the ui class. The value for a particular\r
- * {@code uiClassID} is {@code "jsjavax.swing.plaf.basic.Basic + uiClassID"}.\r
- * For example, the value for the {@code uiClassID} {@code TreeUI} is\r
- * {@code "jsjavax.swing.plaf.basic.BasicTreeUI"}.\r
- * \r
- * @param table\r
- * the {@code UIDefaults} instance the entries are added to\r
- * @throws NullPointerException\r
- * if {@code table} is {@code null}\r
- * \r
- * @see jsjavax.swing.LookAndFeel\r
- * @see #getDefaults\r
- */\r
- protected void initClassDefaults(UIDefaults table) {\r
- final String packageName = "swingjs.plaf.";\r
- Object[] uiDefaults = { \r
- /**/ "ButtonUI", packageName + "JSButtonUI",\r
- /**/ "CheckBoxUI", packageName + "JSCheckBoxUI", \r
- "ColorChooserUI", packageName + "JSColorChooserUI", \r
- /**/ "FormattedTextFieldUI", packageName + "JSFormattedTextFieldUI", \r
- /**/ "MenuBarUI", packageName + "JSMenuBarUI", \r
- /**/ "MenuUI", packageName + "JSMenuUI",\r
- /**/ "MenuItemUI", packageName + "JSMenuItemUI", \r
- /**/ "CheckBoxMenuItemUI", packageName + "JSCheckBoxMenuItemUI", \r
- /**/ "RadioButtonMenuItemUI", packageName + "JSRadioButtonMenuItemUI", \r
- /**/ "RadioButtonUI", packageName + "JSRadioButtonUI", \r
- /**/ "ToggleButtonUI", packageName + "JSToggleButtonUI", \r
- /**/ "PopupMenuUI", packageName + "JSPopupMenuUI", \r
- "ProgressBarUI", packageName + "JSProgressBarUI", \r
- /**/ "ScrollBarUI", packageName + "JSScrollBarUI", \r
- /**/ "ScrollPaneUI", packageName + "JSScrollPaneUI", \r
- "SplitPaneUI", packageName + "JSSplitPaneUI", \r
- /**/ "SliderUI", packageName + "JSSliderUI",\r
- /**/ "SeparatorUI", packageName + "JSSeparatorUI", \r
- "SpinnerUI", packageName + "JSSpinnerUI", \r
- /**/ "ToolBarSeparatorUI", packageName + "JSToolBarSeparatorUI", \r
- /**/ "PopupMenuSeparatorUI", packageName + "JSPopupMenuSeparatorUI", \r
- "TabbedPaneUI", packageName + "JSTabbedPaneUI", \r
- /**/ "TextAreaUI", packageName + "JSTextAreaUI", \r
- /**/ "TextFieldUI", packageName + "JSTextFieldUI", \r
- /**/ "PasswordFieldUI", packageName + "JSPasswordFieldUI", \r
- "TextPaneUI", packageName + "JSTextPaneUI", \r
- "EditorPaneUI", packageName + "JSEditorPaneUI", \r
- "TreeUI", packageName + "JSTreeUI",\r
- /**/ "LabelUI", packageName + "JSLabelUI", \r
- "ListUI", packageName + "JSListUI", \r
- "ToolBarUI", packageName + "JSToolBarUI",\r
- "ToolTipUI", packageName + "JSToolTipUI", \r
- /**/ "ComboBoxUI", packageName + "JSComboBoxUI", \r
- "TableUI", packageName + "JSTableUI",\r
- "TableHeaderUI", packageName + "JSTableHeaderUI", \r
- "InternalFrameUI", packageName + "JSInternalFrameUI", \r
- "DesktopPaneUI", packageName + "JSDesktopPaneUI", \r
- "DesktopIconUI", packageName + "JSDesktopIconUI", \r
- "OptionPaneUI", packageName + "JSOptionPaneUI", \r
- /**/ "PanelUI", packageName + "JSPanelUI",\r
- /**/ "ViewportUI", packageName + "JSViewportUI", \r
- /**/ "RootPaneUI", packageName + "JSRootPaneUI"\r
- };\r
-\r
- table.putDefaults(uiDefaults);\r
- }\r
-\r
- /**\r
- * Populates {@code table} with system colors. This creates an array of\r
- * {@code name-color} pairs and invokes {@code loadSystemColors}.\r
- * <p>\r
- * The name is a {@code String} that corresponds to the name of one of the\r
- * static {@code SystemColor} fields in the {@code SystemColor} class. A\r
- * name-color pair is created for every such {@code SystemColor} field.\r
- * <p>\r
- * The {@code color} corresponds to a hex {@code String} as understood by\r
- * {@code Color.decode}. For example, one of the {@code name-color} pairs is\r
- * {@code "desktop"-"#005C5C"}. This corresponds to the {@code SystemColor}\r
- * field {@code desktop}, with a color value of {@code new Color(0x005C5C)}.\r
- * <p>\r
- * The following shows two of the {@code name-color} pairs:\r
- * \r
- * <pre>\r
- * String[] nameColorPairs = new String[] { "desktop", "#005C5C", "activeCaption",\r
- * "#000080" };\r
- * loadSystemColors(table, nameColorPairs, isNativeLookAndFeel());\r
- * </pre>\r
- * \r
- * As previously stated, this invokes {@code loadSystemColors} with the\r
- * supplied {@code table} and {@code name-color} pair array. The last argument\r
- * to {@code loadSystemColors} indicates whether the value of the field in\r
- * {@code SystemColor} should be used. This method passes the value of\r
- * {@code isNativeLookAndFeel()} as the last argument to\r
- * {@code loadSystemColors}.\r
- * \r
- * @param table\r
- * the {@code UIDefaults} object the values are added to\r
- * @throws NullPointerException\r
- * if {@code table} is {@code null}\r
- * \r
- * @see jsjava.awt.SystemColor\r
- * @see #getDefaults\r
- * @see #loadSystemColors\r
- */\r
- protected void initSystemColorDefaults(UIDefaults table) {\r
- String[] defaultSystemColors = { \r
- \r
- \r
-// "desktop", "#005C5C", /*\r
-// * Color of the\r
-// * desktop\r
-// * background\r
-// */\r
-// "activeCaption", "#000080", /*\r
-// * Color for captions (title bars) when they are\r
-// * active.\r
-// */\r
-// "activeCaptionText", "#FFFFFF", /*\r
-// * Text color for text in captions (title\r
-// * bars).\r
-// */\r
-// "activeCaptionBorder", "#C0C0C0", /*\r
-// * Border color for caption (title bar)\r
-// * window borders.\r
-// */\r
-// "inactiveCaption", "#808080", /*\r
-// * Color for captions (title bars) when not\r
-// * active.\r
-// */\r
-// "inactiveCaptionText", "#C0C0C0", /*\r
-// * Text color for text in inactive\r
-// * captions (title bars).\r
-// */\r
-// "inactiveCaptionBorder", "#C0C0C0", /*\r
-// * Border color for inactive caption\r
-// * (title bar) window borders.\r
-// */\r
- // plaf.metal.OceanTheme\r
- "window", "#FFFFFF", /* Default color for the interior of windows */\r
-// "windowBorder", "#000000", /* ??? */\r
- "windowText", "#333333", /* ??? */\r
- "menu", "#C0C0C0", /* Background color for menus */\r
- "menuText", "#333333", /* Text color for menus */\r
- "text", "#C0C0C0", /* Text background color */\r
- "textText", "#333333", /* Text foreground color */\r
-// "textHighlight", "#000080", /* Text background color when selected */\r
-// "textHighlightText", "#FFFFFF", /* Text color when selected */\r
-// "textInactiveText", "#808080", /* Text color when disabled */\r
- "control", "#EEEEEE", // SECONDARY3 Default color for controls (buttons, sliders, etc)\r
- "controlText", "#333333", // Default color for text in controls \r
-// "controlHighlight", "#C0C0C0", /*\r
-// * Specular highlight (opposite of the\r
-// * shadow)\r
-// */\r
-// "controlLtHighlight", "#FFFFFF", /* Highlight color for controls */\r
-// "controlShadow", "#808080", /* Shadow color for controls */\r
-// "controlDkShadow", "#000000", /* Dark shadow color for controls */\r
- "scrollbar", "#E0E0E0", /* Scrollbar background (usually the "track") */\r
- "info", "#FFFFE1", /* ??? */\r
- "infoText", "#000000" /* ??? */\r
- };\r
-\r
- loadSystemColors(table, defaultSystemColors, isNativeLookAndFeel());\r
- }\r
-\r
- /**\r
- * Populates {@code table} with the {@code name-color} pairs in\r
- * {@code systemColors}. Refer to {@link #initSystemColorDefaults(UIDefaults)}\r
- * for details on the format of {@code systemColors}.\r
- * <p>\r
- * An entry is added to {@code table} for each of the {@code name-color} pairs\r
- * in {@code systemColors}. The entry key is the {@code name} of the\r
- * {@code name-color} pair.\r
- * <p>\r
- * The value of the entry corresponds to the {@code color} of the\r
- * {@code name-color} pair. The value of the entry is calculated in one of two\r
- * ways. With either approach the value is always a {@code ColorUIResource}.\r
- * <p>\r
- * If {@code useNative} is {@code false}, the {@code color} is created by\r
- * using {@code Color.decode} to convert the {@code String} into a\r
- * {@code Color}. If {@code decode} can not convert the {@code String} into a\r
- * {@code Color} ({@code NumberFormatException} is thrown) then a\r
- * {@code ColorUIResource} of black is used.\r
- * <p>\r
- * If {@code useNative} is {@code true}, the {@code color} is the value of the\r
- * field in {@code SystemColor} with the same name as the {@code name} of the\r
- * {@code name-color} pair. If the field is not valid, a\r
- * {@code ColorUIResource} of black is used.\r
- * \r
- * @param table\r
- * the {@code UIDefaults} object the values are added to\r
- * @param systemColors\r
- * array of {@code name-color} pairs as described in\r
- * {@link #initSystemColorDefaults(UIDefaults)}\r
- * @param useNative\r
- * whether the color is obtained from {@code SystemColor} or\r
- * {@code Color.decode}\r
- * @throws NullPointerException\r
- * if {@code systemColors} is {@code null}; or {@code systemColors}\r
- * is not empty, and {@code table} is {@code null}; or one of the\r
- * names of the {@code name-color} pairs is {@code null}; or\r
- * {@code useNative} is {@code false} and one of the {@code colors}\r
- * of the {@code name-color} pairs is {@code null}\r
- * @throws ArrayIndexOutOfBoundsException\r
- * if {@code useNative} is {@code false} and\r
- * {@code systemColors.length} is odd\r
- * \r
- * @see #initSystemColorDefaults(jsjavax.swing.UIDefaults)\r
- * @see jsjava.awt.SystemColor\r
- * @see jsjava.awt.Color#decode(String)\r
- */\r
- protected void loadSystemColors(UIDefaults table, String[] systemColors,\r
- boolean useNative) {\r
- /*\r
- * PENDING(hmuller) We don't load the system colors below because they're\r
- * not reliable. Hopefully we'll be able to do better in a future version of\r
- * AWT.\r
- */\r
-// if (useNative) {\r
-// for (int i = 0; i < systemColors.length; i += 2) {\r
-// Color color = Color.black;\r
-// // try {\r
-// // String name = systemColors[i];\r
-// // color = (Color)(SystemColor.class.getField(name).get(null));\r
-// // } catch (Exception e) {\r
-// // }\r
-// table.put(systemColors[i], new ColorUIResource(color));\r
-// }\r
-// } else {\r
- for (int i = 0; i < systemColors.length; i += 2) {\r
- Color color = Color.black;\r
- try {\r
- color = Color.decode(systemColors[i + 1]);\r
- } catch (NumberFormatException e) {\r
- e.printStackTrace();\r
- }\r
- table.put(systemColors[i], new ColorUIResource(color));\r
- }\r
-// }\r
- }\r
-\r
- /**\r
- * Initialize the defaults table with the name of the ResourceBundle used for\r
- * getting localized defaults. Also initialize the default locale used when no\r
- * locale is passed into UIDefaults.get(). The default locale should generally\r
- * not be relied upon. It is here for compatability with releases prior to\r
- * 1.4.\r
- */\r
- private void initResourceBundle(UIDefaults table) {\r
- // table.setDefaultLocale( Locale.getDefault() );\r
- // table.addResourceBundle(\r
- // "com.sun.swing.internal.plaf.basic.resources.basic" );\r
- }\r
-\r
- /**\r
- * Populates {@code table} with the defaults for the basic look and feel.\r
- * \r
- * @param table\r
- * the {@code UIDefaults} to add the values to\r
- * @throws NullPointerException\r
- * if {@code table} is {@code null}\r
- */\r
- protected void initComponentDefaults(UIDefaults table) {\r
-\r
- initResourceBundle(table);\r
-\r
- // // *** Shared Integers\r
- // Integer fiveHundred = new Integer(500);\r
-\r
- // *** Shared Longs\r
- Long oneThousand = new Long(1000);\r
-\r
- // *** Shared Fonts\r
- Integer twelve = new Integer(12);\r
- Integer fontPlain = new Integer(Font.PLAIN);\r
- // Integer fontBold = new Integer(Font.BOLD);\r
- // Object dialogPlain12 = new SwingLazyValue(\r
- // "jsjavax.swing.plaf.FontUIResource",\r
- // null,\r
- // new Object[] {Font.DIALOG, fontPlain, twelve});\r
- Object serifPlain12 = new FontUIResource(Font.SERIF, Font.PLAIN, 12);\r
- Object sansSerifPlain12 = new FontUIResource(Font.SANS_SERIF, Font.PLAIN,\r
- 12);\r
- Object dialogPlain12 = new FontUIResource(Font.DIALOG, Font.PLAIN, 12);\r
- Object monospacedPlain12 = new FontUIResource(Font.MONOSPACED, Font.PLAIN, 12);\r
- // Object dialogBold12 = new SwingLazyValue(\r
- // "jsjavax.swing.plaf.FontUIResource",\r
- // null,\r
- // new Object[] {Font.DIALOG, fontBold, twelve});\r
- //\r
-\r
- // *** Shared Colors\r
- // ColorUIResource red = new ColorUIResource(Color.red);\r
- ColorUIResource black = new ColorUIResource(Color.black);\r
- ColorUIResource white = new ColorUIResource(Color.white);\r
- // ColorUIResource yellow = new ColorUIResource(Color.yellow);\r
- ColorUIResource gray = new ColorUIResource(Color.gray);\r
- // ColorUIResource lightGray = new ColorUIResource(Color.lightGray);\r
- ColorUIResource darkGray = new ColorUIResource(Color.darkGray);\r
- // ColorUIResource scrollBarTrack = new ColorUIResource(224, 224, 224);\r
-\r
- Color control = table.getColor("control");\r
- // Color controlDkShadow = table.getColor("controlDkShadow");\r
- // Color controlHighlight = table.getColor("controlHighlight");\r
- // Color controlLtHighlight = table.getColor("controlLtHighlight");\r
- // Color controlShadow = table.getColor("controlShadow");\r
- Color controlText = table.getColor("controlText");\r
- Color menu = table.getColor("menu");\r
- Color menuText = table.getColor("menuText");\r
- // Color textHighlight = table.getColor("textHighlight");\r
- // Color textHighlightText = table.getColor("textHighlightText");\r
- // Color textInactiveText = table.getColor("textInactiveText");\r
- Color textText = table.getColor("textText");\r
- Color window = table.getColor("window");\r
-\r
- // *** Shared Insets\r
- InsetsUIResource zeroInsets = new InsetsUIResource(0, 0, 0, 0);\r
- InsetsUIResource twoInsets = new InsetsUIResource(2, 2, 2, 2);\r
- InsetsUIResource threeInsets = new InsetsUIResource(3, 3, 3, 3);\r
-\r
- // // *** Shared Borders\r
- // Object marginBorder = new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicBorders$MarginBorder");\r
- // Object etchedBorder = new SwingLazyValue(\r
- // "jsjavax.swing.plaf.BorderUIResource",\r
- // "getEtchedBorderUIResource");\r
- // Object loweredBevelBorder = new SwingLazyValue(\r
- // "jsjavax.swing.plaf.BorderUIResource",\r
- // "getLoweredBevelBorderUIResource");\r
- //\r
- // Object popupMenuBorder = new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicBorders",\r
- // "getInternalFrameBorder");\r
- //\r
- // Object blackLineBorder = new SwingLazyValue(\r
- // "jsjavax.swing.plaf.BorderUIResource",\r
- // "getBlackLineBorderUIResource");\r
- // Object focusCellHighlightBorder = new SwingLazyValue(\r
- // "jsjavax.swing.plaf.BorderUIResource$LineBorderUIResource",\r
- // null,\r
- // new Object[] {yellow});\r
- //\r
- // Object noFocusBorder = new\r
- // BorderUIResource.EmptyBorderUIResource(1,1,1,1);\r
- //\r
- // Object tableHeaderBorder = new SwingLazyValue(\r
- // "jsjavax.swing.plaf.BorderUIResource$BevelBorderUIResource",\r
- // null,\r
- // new Object[] { new Integer(BevelBorder.RAISED),\r
- // controlLtHighlight,\r
- // control,\r
- // controlDkShadow,\r
- // controlShadow });\r
- //\r
- //\r
- // // *** Button value objects\r
- //\r
- // Object buttonBorder =\r
- // new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicBorders",\r
- // "getButtonBorder");\r
- //\r
- // Object buttonToggleBorder =\r
- // new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicBorders",\r
- // "getToggleButtonBorder");\r
- //\r
- // Object radioButtonBorder =\r
- // new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicBorders",\r
- // "getRadioButtonBorder");\r
- //\r
- // // *** FileChooser / FileView value objects\r
- //\r
- // Object newFolderIcon = SwingUtilities2.makeIcon(getClass(),\r
- // BasicLookAndFeel.class,\r
- // "icons/NewFolder.gif");\r
- // Object upFolderIcon = SwingUtilities2.makeIcon(getClass(),\r
- // BasicLookAndFeel.class,\r
- // "icons/UpFolder.gif");\r
- // Object homeFolderIcon = SwingUtilities2.makeIcon(getClass(),\r
- // BasicLookAndFeel.class,\r
- // "icons/HomeFolder.gif");\r
- // Object detailsViewIcon = SwingUtilities2.makeIcon(getClass(),\r
- // BasicLookAndFeel.class,\r
- // "icons/DetailsView.gif");\r
- // Object listViewIcon = SwingUtilities2.makeIcon(getClass(),\r
- // BasicLookAndFeel.class,\r
- // "icons/ListView.gif");\r
- // Object directoryIcon = SwingUtilities2.makeIcon(getClass(),\r
- // BasicLookAndFeel.class,\r
- // "icons/Directory.gif");\r
- // Object fileIcon = SwingUtilities2.makeIcon(getClass(),\r
- // BasicLookAndFeel.class,\r
- // "icons/File.gif");\r
- // Object computerIcon = SwingUtilities2.makeIcon(getClass(),\r
- // BasicLookAndFeel.class,\r
- // "icons/Computer.gif");\r
- // Object hardDriveIcon = SwingUtilities2.makeIcon(getClass(),\r
- // BasicLookAndFeel.class,\r
- // "icons/HardDrive.gif");\r
- // Object floppyDriveIcon = SwingUtilities2.makeIcon(getClass(),\r
- // BasicLookAndFeel.class,\r
- // "icons/FloppyDrive.gif");\r
- //\r
- //\r
- // // *** InternalFrame value objects\r
- //\r
- // Object internalFrameBorder = new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicBorders",\r
- // "getInternalFrameBorder");\r
- //\r
- // // *** List value objects\r
- //\r
- Object listCellRendererActiveValue = new UIDefaults.ActiveValue() {\r
- public Object createValue(UIDefaults table) {\r
- return new DefaultListCellRenderer.UIResource();\r
- }\r
- };\r
-\r
- //\r
- // // *** Menus value objects\r
- //\r
- // Object menuBarBorder =\r
- // new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicBorders",\r
- // "getMenuBarBorder");\r
- //\r
- // Object menuItemCheckIcon =\r
- // new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicIconFactory",\r
- // "getMenuItemCheckIcon");\r
- //\r
- // Object menuItemArrowIcon =\r
- // new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicIconFactory",\r
- // "getMenuItemArrowIcon");\r
- //\r
- //\r
- // Object menuArrowIcon =\r
- // new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicIconFactory",\r
- // "getMenuArrowIcon");\r
- //\r
- // Object checkBoxIcon =\r
- // new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicIconFactory",\r
- // "getCheckBoxIcon");\r
- //\r
- // Object radioButtonIcon =\r
- // new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicIconFactory",\r
- // "getRadioButtonIcon");\r
- //\r
- // Object checkBoxMenuItemIcon =\r
- // new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicIconFactory",\r
- // "getCheckBoxMenuItemIcon");\r
- //\r
- // Object radioButtonMenuItemIcon =\r
- // new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicIconFactory",\r
- // "getRadioButtonMenuItemIcon");\r
- //\r
- // Object menuItemAcceleratorDelimiter = new String("+");\r
- //\r
- // // *** OptionPane value objects\r
- //\r
- // Object optionPaneMinimumSize = new DimensionUIResource(262, 90);\r
- //\r
- Integer zero = new Integer(0);\r
- // Object zeroBorder = new SwingLazyValue(\r
- // "jsjavax.swing.plaf.BorderUIResource$EmptyBorderUIResource",\r
- // new Object[] {zero, zero, zero, zero});\r
- //\r
- // Integer ten = new Integer(10);\r
- // Object optionPaneBorder = new SwingLazyValue(\r
- // "jsjavax.swing.plaf.BorderUIResource$EmptyBorderUIResource",\r
- // new Object[] {ten, ten, twelve, ten});\r
- //\r
- // Object optionPaneButtonAreaBorder = new SwingLazyValue(\r
- // "jsjavax.swing.plaf.BorderUIResource$EmptyBorderUIResource",\r
- // new Object[] {new Integer(6), zero, zero, zero});\r
- //\r
- //\r
- // // *** ProgessBar value objects\r
- //\r
- // Object progressBarBorder =\r
- // new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicBorders",\r
- // "getProgressBarBorder");\r
- //\r
- // // ** ScrollBar value objects\r
- //\r
- // Object minimumThumbSize = new DimensionUIResource(8,8);\r
- // Object maximumThumbSize = new DimensionUIResource(4096,4096);\r
- //\r
- // // ** Slider value objects\r
- //\r
- // Object sliderFocusInsets = twoInsets;\r
- //\r
- // Object toolBarSeparatorSize = new DimensionUIResource( 10, 10 );\r
- //\r
- //\r
- // // *** SplitPane value objects\r
- //\r
- // Object splitPaneBorder =\r
- // new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicBorders",\r
- // "getSplitPaneBorder");\r
- // Object splitPaneDividerBorder =\r
- // new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicBorders",\r
- // "getSplitPaneDividerBorder");\r
- //\r
- // ** TabbedBane value objects\r
-\r
- Object tabbedPaneTabInsets = new InsetsUIResource(0, 4, 1, 4);\r
-\r
- Object tabbedPaneTabPadInsets = new InsetsUIResource(2, 2, 2, 1);\r
-\r
- Object tabbedPaneTabAreaInsets = new InsetsUIResource(3, 2, 0, 2);\r
-\r
- Object tabbedPaneContentBorderInsets = new InsetsUIResource(2, 2, 3, 3);\r
-\r
- // *** Text value objects\r
-\r
- // Object textFieldBorder =\r
- // new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicBorders",\r
- // "getTextFieldBorder");\r
- //\r
- Object editorMargin = threeInsets;\r
-\r
- // Object caretBlinkRate = fiveHundred;\r
- Integer four = new Integer(4);\r
- //\r
- // Object[] allAuditoryCues = new Object[] {\r
- // "CheckBoxMenuItem.commandSound",\r
- // "InternalFrame.closeSound",\r
- // "InternalFrame.maximizeSound",\r
- // "InternalFrame.minimizeSound",\r
- // "InternalFrame.restoreDownSound",\r
- // "InternalFrame.restoreUpSound",\r
- // "MenuItem.commandSound",\r
- // "OptionPane.errorSound",\r
- // "OptionPane.informationSound",\r
- // "OptionPane.questionSound",\r
- // "OptionPane.warningSound",\r
- // "PopupMenu.popupSound",\r
- // "RadioButtonMenuItem.commandSound"};\r
- //\r
- // Object[] noAuditoryCues = new Object[] {"mute"};\r
- //\r
- // // *** Component Defaults\r
- //\r
- Object[] defaults = {\r
- "*.font",\r
- dialogPlain12,\r
- "*.background",\r
- control,\r
- "*.foreground",\r
- controlText,\r
- // *** Auditory Feedback\r
- // "AuditoryCues.cueList", allAuditoryCues,\r
- // "AuditoryCues.allAuditoryCues", allAuditoryCues,\r
- // "AuditoryCues.noAuditoryCues", noAuditoryCues,\r
- // // this key defines which of the various cues to render.\r
- // // L&Fs that want auditory feedback NEED to override playList.\r
- // "AuditoryCues.playList", null,\r
-\r
- // *** Buttons\r
- // "Button.defaultButtonFollowsFocus", Boolean.TRUE,\r
- // "Button.font", dialogPlain12,\r
- // "Button.background", control,\r
- // "Button.foreground", controlText,\r
- // "Button.shadow", controlShadow,\r
- // "Button.darkShadow", controlDkShadow,\r
- // "Button.light", controlHighlight,\r
- // "Button.highlight", controlLtHighlight,\r
- // "Button.border", buttonBorder,\r
- "Button.margin",\r
- new InsetsUIResource(2, 14, 2, 14),\r
- // "Button.textIconGap", four,\r
- // "Button.textShiftOffset", zero,\r
- // "Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {\r
- // "SPACE", "pressed",\r
- // "released SPACE", "released",\r
- // "ENTER", "pressed",\r
- // "released ENTER", "released"\r
- // }),\r
- //\r
- // "ToggleButton.font", dialogPlain12,\r
- // "ToggleButton.background", control,\r
- // "ToggleButton.foreground", controlText,\r
- // "ToggleButton.shadow", controlShadow,\r
- // "ToggleButton.darkShadow", controlDkShadow,\r
- // "ToggleButton.light", controlHighlight,\r
- // "ToggleButton.highlight", controlLtHighlight,\r
- // "ToggleButton.border", buttonToggleBorder,\r
- "ToggleButton.margin",\r
- new InsetsUIResource(2, 14, 2, 14),\r
- "ToggleButton.textIconGap",\r
- four,\r
- "ToggleButton.textShiftOffset",\r
- zero,\r
- // "ToggleButton.focusInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "SPACE", "pressed",\r
- // "released SPACE", "released"\r
- // }),\r
- //\r
- // "RadioButton.font", dialogPlain12,\r
- // "RadioButton.background", control,\r
- // "RadioButton.foreground", controlText,\r
- // "RadioButton.shadow", controlShadow,\r
- // "RadioButton.darkShadow", controlDkShadow,\r
- // "RadioButton.light", controlHighlight,\r
- // "RadioButton.highlight", controlLtHighlight,\r
- // "RadioButton.border", radioButtonBorder,\r
- "RadioButton.margin",\r
- twoInsets,\r
- "RadioButton.textIconGap",\r
- four,\r
- "RadioButton.textShiftOffset",\r
- zero,\r
- // "RadioButton.icon", radioButtonIcon,\r
- // "RadioButton.focusInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "SPACE", "pressed",\r
- // "released SPACE", "released",\r
- // "RETURN", "pressed"\r
- // }),\r
- //\r
- // "CheckBox.font", dialogPlain12,\r
- // "CheckBox.background", control,\r
- // "CheckBox.foreground", controlText,\r
- // "CheckBox.border", radioButtonBorder,\r
- "CheckBox.margin",\r
- twoInsets,\r
- "CheckBox.textIconGap",\r
- four,\r
- "CheckBox.textShiftOffset",\r
- zero,\r
- // "CheckBox.icon", checkBoxIcon,\r
- // "CheckBox.focusInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "SPACE", "pressed",\r
- // "released SPACE", "released"\r
- // }),\r
- // "FileChooser.useSystemExtensionHiding", Boolean.FALSE,\r
-\r
- // *** ColorChooser\r
- // "ColorChooser.font", dialogPlain12,\r
- // "ColorChooser.background", control,\r
- // "ColorChooser.foreground", controlText,\r
- //\r
- "ColorChooser.swatchesSwatchSize",\r
- new Dimension(10, 10),\r
- "ColorChooser.swatchesRecentSwatchSize",\r
- new Dimension(10, 10),\r
- "ColorChooser.swatchesDefaultRecentColor",\r
- control,\r
-\r
- // *** ComboBox\r
- "ComboBox.font",\r
- sansSerifPlain12,\r
- "ComboBox.background",\r
- window,\r
- "ComboBox.foreground",\r
- textText,\r
- // "ComboBox.buttonBackground", control,\r
- // "ComboBox.buttonShadow", controlShadow,\r
- // "ComboBox.buttonDarkShadow", controlDkShadow,\r
- // "ComboBox.buttonHighlight", controlLtHighlight,\r
- // "ComboBox.selectionBackground", textHighlight,\r
- // "ComboBox.selectionForeground", textHighlightText,\r
- // "ComboBox.disabledBackground", control,\r
- // "ComboBox.disabledForeground", textInactiveText,\r
- "ComboBox.timeFactor",\r
- oneThousand,\r
- "ComboBox.isEnterSelectablePopup",\r
- Boolean.FALSE,\r
- // "ComboBox.ancestorInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "ESCAPE", "hidePopup",\r
- // "PAGE_UP", "pageUpPassThrough",\r
- // "PAGE_DOWN", "pageDownPassThrough",\r
- // "HOME", "homePassThrough",\r
- // "END", "endPassThrough",\r
- // "ENTER", "enterPressed"\r
- // }),\r
- //\r
- // *** FileChooser\r
-\r
- // "FileChooser.newFolderIcon", newFolderIcon,\r
- // "FileChooser.upFolderIcon", upFolderIcon,\r
- // "FileChooser.homeFolderIcon", homeFolderIcon,\r
- // "FileChooser.detailsViewIcon", detailsViewIcon,\r
- // "FileChooser.listViewIcon", listViewIcon,\r
- "FileChooser.readOnly",\r
- Boolean.FALSE,\r
- // "FileChooser.usesSingleFilePane", Boolean.FALSE,\r
- // "FileChooser.ancestorInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "ESCAPE", "cancelSelection",\r
- // "F5", "refresh",\r
- // }),\r
- //\r
- // "FileView.directoryIcon", directoryIcon,\r
- // "FileView.fileIcon", fileIcon,\r
- // "FileView.computerIcon", computerIcon,\r
- // "FileView.hardDriveIcon", hardDriveIcon,\r
- // "FileView.floppyDriveIcon", floppyDriveIcon,\r
-\r
- // *** InternalFrame\r
- // "InternalFrame.titleFont", dialogBold12,\r
- // "InternalFrame.borderColor", control,\r
- // "InternalFrame.borderShadow", controlShadow,\r
- // "InternalFrame.borderDarkShadow", controlDkShadow,\r
- // "InternalFrame.borderHighlight", controlLtHighlight,\r
- // "InternalFrame.borderLight", controlHighlight,\r
- // "InternalFrame.border", internalFrameBorder,\r
- // "InternalFrame.icon", SwingUtilities2.makeIcon(getClass(),\r
- // BasicLookAndFeel.class,\r
- // "icons/JavaCup16.png"),\r
- //\r
- // /* Default frame icons are undefined for Basic. */\r
- // "InternalFrame.maximizeIcon",\r
- // new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicIconFactory",\r
- // "createEmptyFrameIcon"),\r
- // "InternalFrame.minimizeIcon",\r
- // new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicIconFactory",\r
- // "createEmptyFrameIcon"),\r
- // "InternalFrame.iconifyIcon",\r
- // new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicIconFactory",\r
- // "createEmptyFrameIcon"),\r
- // "InternalFrame.closeIcon",\r
- // new SwingLazyValue(\r
- // "jsjavax.swing.plaf.basic.BasicIconFactory",\r
- // "createEmptyFrameIcon"),\r
- // // InternalFrame Auditory Cue Mappings\r
- // "InternalFrame.closeSound", null,\r
- // "InternalFrame.maximizeSound", null,\r
- // "InternalFrame.minimizeSound", null,\r
- // "InternalFrame.restoreDownSound", null,\r
- // "InternalFrame.restoreUpSound", null,\r
- //\r
- // "InternalFrame.activeTitleBackground", table.get("activeCaption"),\r
- // "InternalFrame.activeTitleForeground",\r
- // table.get("activeCaptionText"),\r
- // "InternalFrame.inactiveTitleBackground",\r
- // table.get("inactiveCaption"),\r
- // "InternalFrame.inactiveTitleForeground",\r
- // table.get("inactiveCaptionText"),\r
- // "InternalFrame.windowBindings", new Object[] {\r
- // "shift ESCAPE", "showSystemMenu",\r
- // "ctrl SPACE", "showSystemMenu",\r
- // "ESCAPE", "hideSystemMenu"},\r
- //\r
- // "InternalFrameTitlePane.iconifyButtonOpacity", Boolean.TRUE,\r
- // "InternalFrameTitlePane.maximizeButtonOpacity", Boolean.TRUE,\r
- // "InternalFrameTitlePane.closeButtonOpacity", Boolean.TRUE,\r
-\r
- // "DesktopIcon.border", internalFrameBorder,\r
- //\r
- // "Desktop.minOnScreenInsets", threeInsets,\r
- // "Desktop.background", table.get("desktop"),\r
- // "Desktop.ancestorInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "ctrl F5", "restore",\r
- // "ctrl F4", "close",\r
- // "ctrl F7", "move",\r
- // "ctrl F8", "resize",\r
- // "RIGHT", "right",\r
- // "KP_RIGHT", "right",\r
- // "shift RIGHT", "shrinkRight",\r
- // "shift KP_RIGHT", "shrinkRight",\r
- // "LEFT", "left",\r
- // "KP_LEFT", "left",\r
- // "shift LEFT", "shrinkLeft",\r
- // "shift KP_LEFT", "shrinkLeft",\r
- // "UP", "up",\r
- // "KP_UP", "up",\r
- // "shift UP", "shrinkUp",\r
- // "shift KP_UP", "shrinkUp",\r
- // "DOWN", "down",\r
- // "KP_DOWN", "down",\r
- // "shift DOWN", "shrinkDown",\r
- // "shift KP_DOWN", "shrinkDown",\r
- // "ESCAPE", "escape",\r
- // "ctrl F9", "minimize",\r
- // "ctrl F10", "maximize",\r
- // "ctrl F6", "selectNextFrame",\r
- // "ctrl TAB", "selectNextFrame",\r
- // "ctrl alt F6", "selectNextFrame",\r
- // "shift ctrl alt F6", "selectPreviousFrame",\r
- // "ctrl F12", "navigateNext",\r
- // "shift ctrl F12", "navigatePrevious"\r
- // }),\r
-\r
- // *** Label\r
- // "Label.font", dialogPlain12,\r
- // "Label.background", control,\r
- // "Label.foreground", controlText,\r
- // "Label.disabledForeground", white,\r
- // "Label.disabledShadow", controlShadow,\r
- "Label.border",\r
- null,\r
-\r
- // *** List\r
- // "List.font", dialogPlain12,\r
- "List.background",\r
- window,\r
- "List.foreground",\r
- textText,\r
- // "List.selectionBackground", textHighlight,\r
- // "List.selectionForeground", textHighlightText,\r
- // "List.noFocusBorder", noFocusBorder,\r
- // "List.focusCellHighlightBorder", focusCellHighlightBorder,\r
- // "List.dropLineColor", controlShadow,\r
- // "List.border", null,\r
- "List.cellRenderer",\r
- listCellRendererActiveValue,\r
- "List.timeFactor",\r
- oneThousand,\r
- // "List.focusInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "ctrl C", "copy",\r
- // "ctrl V", "paste",\r
- // "ctrl X", "cut",\r
- // "COPY", "copy",\r
- // "PASTE", "paste",\r
- // "CUT", "cut",\r
- // "control INSERT", "copy",\r
- // "shift INSERT", "paste",\r
- // "shift DELETE", "cut",\r
- // "UP", "selectPreviousRow",\r
- // "KP_UP", "selectPreviousRow",\r
- // "shift UP", "selectPreviousRowExtendSelection",\r
- // "shift KP_UP", "selectPreviousRowExtendSelection",\r
- // "ctrl shift UP", "selectPreviousRowExtendSelection",\r
- // "ctrl shift KP_UP", "selectPreviousRowExtendSelection",\r
- // "ctrl UP", "selectPreviousRowChangeLead",\r
- // "ctrl KP_UP", "selectPreviousRowChangeLead",\r
- // "DOWN", "selectNextRow",\r
- // "KP_DOWN", "selectNextRow",\r
- // "shift DOWN", "selectNextRowExtendSelection",\r
- // "shift KP_DOWN", "selectNextRowExtendSelection",\r
- // "ctrl shift DOWN", "selectNextRowExtendSelection",\r
- // "ctrl shift KP_DOWN", "selectNextRowExtendSelection",\r
- // "ctrl DOWN", "selectNextRowChangeLead",\r
- // "ctrl KP_DOWN", "selectNextRowChangeLead",\r
- // "LEFT", "selectPreviousColumn",\r
- // "KP_LEFT", "selectPreviousColumn",\r
- // "shift LEFT", "selectPreviousColumnExtendSelection",\r
- // "shift KP_LEFT", "selectPreviousColumnExtendSelection",\r
- // "ctrl shift LEFT", "selectPreviousColumnExtendSelection",\r
- // "ctrl shift KP_LEFT", "selectPreviousColumnExtendSelection",\r
- // "ctrl LEFT", "selectPreviousColumnChangeLead",\r
- // "ctrl KP_LEFT", "selectPreviousColumnChangeLead",\r
- // "RIGHT", "selectNextColumn",\r
- // "KP_RIGHT", "selectNextColumn",\r
- // "shift RIGHT", "selectNextColumnExtendSelection",\r
- // "shift KP_RIGHT", "selectNextColumnExtendSelection",\r
- // "ctrl shift RIGHT", "selectNextColumnExtendSelection",\r
- // "ctrl shift KP_RIGHT", "selectNextColumnExtendSelection",\r
- // "ctrl RIGHT", "selectNextColumnChangeLead",\r
- // "ctrl KP_RIGHT", "selectNextColumnChangeLead",\r
- // "HOME", "selectFirstRow",\r
- // "shift HOME", "selectFirstRowExtendSelection",\r
- // "ctrl shift HOME", "selectFirstRowExtendSelection",\r
- // "ctrl HOME", "selectFirstRowChangeLead",\r
- // "END", "selectLastRow",\r
- // "shift END", "selectLastRowExtendSelection",\r
- // "ctrl shift END", "selectLastRowExtendSelection",\r
- // "ctrl END", "selectLastRowChangeLead",\r
- // "PAGE_UP", "scrollUp",\r
- // "shift PAGE_UP", "scrollUpExtendSelection",\r
- // "ctrl shift PAGE_UP", "scrollUpExtendSelection",\r
- // "ctrl PAGE_UP", "scrollUpChangeLead",\r
- // "PAGE_DOWN", "scrollDown",\r
- // "shift PAGE_DOWN", "scrollDownExtendSelection",\r
- // "ctrl shift PAGE_DOWN", "scrollDownExtendSelection",\r
- // "ctrl PAGE_DOWN", "scrollDownChangeLead",\r
- // "ctrl A", "selectAll",\r
- // "ctrl SLASH", "selectAll",\r
- // "ctrl BACK_SLASH", "clearSelection",\r
- // "SPACE", "addToSelection",\r
- // "ctrl SPACE", "toggleAndAnchor",\r
- // "shift SPACE", "extendTo",\r
- // "ctrl shift SPACE", "moveSelectionTo"\r
- // }),\r
- // "List.focusInputMap.RightToLeft",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "LEFT", "selectNextColumn",\r
- // "KP_LEFT", "selectNextColumn",\r
- // "shift LEFT", "selectNextColumnExtendSelection",\r
- // "shift KP_LEFT", "selectNextColumnExtendSelection",\r
- // "ctrl shift LEFT", "selectNextColumnExtendSelection",\r
- // "ctrl shift KP_LEFT", "selectNextColumnExtendSelection",\r
- // "ctrl LEFT", "selectNextColumnChangeLead",\r
- // "ctrl KP_LEFT", "selectNextColumnChangeLead",\r
- // "RIGHT", "selectPreviousColumn",\r
- // "KP_RIGHT", "selectPreviousColumn",\r
- // "shift RIGHT", "selectPreviousColumnExtendSelection",\r
- // "shift KP_RIGHT", "selectPreviousColumnExtendSelection",\r
- // "ctrl shift RIGHT", "selectPreviousColumnExtendSelection",\r
- // "ctrl shift KP_RIGHT", "selectPreviousColumnExtendSelection",\r
- // "ctrl RIGHT", "selectPreviousColumnChangeLead",\r
- // "ctrl KP_RIGHT", "selectPreviousColumnChangeLead",\r
- // }),\r
- //\r
- // *** Menus\r
- "MenuBar.font", \r
- dialogPlain12,\r
- "MenuBar.background",\r
- menu,\r
- "MenuBar.foreground",\r
- menuText,\r
- // "MenuBar.shadow", controlShadow,\r
- // "MenuBar.highlight", controlLtHighlight,\r
- // "MenuBar.border", menuBarBorder,\r
- // "MenuBar.windowBindings", new Object[] {\r
- // "F10", "takeFocus" },\r
- //\r
- "MenuItem.font", dialogPlain12,\r
- //"MenuItem.acceleratorFont", dialogPlain12,\r
- "MenuItem.background",\r
- menu,\r
- "MenuItem.foreground",\r
- menuText,\r
- // "MenuItem.selectionForeground", textHighlightText,\r
- // "MenuItem.selectionBackground", textHighlight,\r
- // "MenuItem.disabledForeground", null,\r
- // "MenuItem.acceleratorForeground", menuText,\r
- // "MenuItem.acceleratorSelectionForeground", textHighlightText,\r
- // "MenuItem.acceleratorDelimiter", menuItemAcceleratorDelimiter,\r
- // "MenuItem.border", marginBorder,\r
- // "MenuItem.borderPainted", Boolean.FALSE,\r
- "MenuItem.margin",\r
- twoInsets,\r
- // "MenuItem.checkIcon", menuItemCheckIcon,\r
- // "MenuItem.arrowIcon", menuItemArrowIcon,\r
- // "MenuItem.commandSound", null,\r
- //\r
- "RadioButtonMenuItem.font", dialogPlain12,\r
- // "RadioButtonMenuItem.acceleratorFont", dialogPlain12,\r
- "RadioButtonMenuItem.background",\r
- menu,\r
- "RadioButtonMenuItem.foreground",\r
- menuText,\r
- // "RadioButtonMenuItem.selectionForeground", textHighlightText,\r
- // "RadioButtonMenuItem.selectionBackground", textHighlight,\r
- // "RadioButtonMenuItem.disabledForeground", null,\r
- // "RadioButtonMenuItem.acceleratorForeground", menuText,\r
- // "RadioButtonMenuItem.acceleratorSelectionForeground",\r
- // textHighlightText,\r
- // "RadioButtonMenuItem.border", marginBorder,\r
- // "RadioButtonMenuItem.borderPainted", Boolean.FALSE,\r
- "RadioButtonMenuItem.margin",\r
- twoInsets,\r
- // "RadioButtonMenuItem.checkIcon", radioButtonMenuItemIcon,\r
- // "RadioButtonMenuItem.arrowIcon", menuItemArrowIcon,\r
- // "RadioButtonMenuItem.commandSound", null,\r
-\r
- "CheckBoxMenuItem.font", dialogPlain12,\r
- // "CheckBoxMenuItem.acceleratorFont", dialogPlain12,\r
- "CheckBoxMenuItem.background",\r
- menu,\r
- "CheckBoxMenuItem.foreground",\r
- menuText,\r
- // "CheckBoxMenuItem.selectionForeground", textHighlightText,\r
- // "CheckBoxMenuItem.selectionBackground", textHighlight,\r
- // "CheckBoxMenuItem.disabledForeground", null,\r
- // "CheckBoxMenuItem.acceleratorForeground", menuText,\r
- // "CheckBoxMenuItem.acceleratorSelectionForeground", textHighlightText,\r
- // "CheckBoxMenuItem.border", marginBorder,\r
- // "CheckBoxMenuItem.borderPainted", Boolean.FALSE,\r
- "CheckBoxMenuItem.margin",\r
- twoInsets,\r
- // "CheckBoxMenuItem.checkIcon", checkBoxMenuItemIcon,\r
- // "CheckBoxMenuItem.arrowIcon", menuItemArrowIcon,\r
- // "CheckBoxMenuItem.commandSound", null,\r
-\r
- // "Menu.font", dialogPlain12,\r
- // "Menu.acceleratorFont", dialogPlain12,\r
- "Menu.background",\r
- menu,\r
- "Menu.foreground",\r
- menuText,\r
- // "Menu.selectionForeground", textHighlightText,\r
- // "Menu.selectionBackground", textHighlight,\r
- // "Menu.disabledForeground", null,\r
- // "Menu.acceleratorForeground", menuText,\r
- // "Menu.acceleratorSelectionForeground", textHighlightText,\r
- // "Menu.border", marginBorder,\r
- // "Menu.borderPainted", Boolean.FALSE,\r
- "Menu.margin",\r
- twoInsets,\r
- // "Menu.checkIcon", menuItemCheckIcon,\r
- // "Menu.arrowIcon", menuArrowIcon,\r
- // "Menu.menuPopupOffsetX", new Integer(0),\r
- // "Menu.menuPopupOffsetY", new Integer(0),\r
- // "Menu.submenuPopupOffsetX", new Integer(0),\r
- // "Menu.submenuPopupOffsetY", new Integer(0),\r
- // "Menu.shortcutKeys", new int[] {KeyEvent.ALT_MASK},\r
- // "Menu.crossMenuMnemonic", Boolean.TRUE,\r
- // Menu.cancelMode affects the cancel menu action behaviour;\r
- // currently supports:\r
- // "hideLastSubmenu" (default)\r
- // hides the last open submenu,\r
- // and move selection one step back\r
- // "hideMenuTree"\r
- // resets selection and\r
- // hide the entire structure of open menu and its submenus\r
- // "Menu.cancelMode", "hideLastSubmenu",\r
-\r
- // Menu.preserveTopLevelSelection affects\r
- // the cancel menu action behaviour\r
- // if set to true then top level menu selection\r
- // will be preserved when the last popup was cancelled;\r
- // the menu itself will be unselect with the next cancel action\r
- // "Menu.preserveTopLevelSelection", Boolean.FALSE,\r
-\r
- // PopupMenu\r
- // "PopupMenu.font", dialogPlain12,\r
- "PopupMenu.background",\r
- menu,\r
- "PopupMenu.foreground",\r
- menuText,\r
- // "PopupMenu.border", popupMenuBorder,\r
- // Internal Frame Auditory Cue Mappings\r
- // "PopupMenu.popupSound", null,\r
- // // These window InputMap bindings are used when the Menu is\r
- // // selected.\r
- // "PopupMenu.selectedWindowInputMapBindings", new Object[] {\r
- // "ESCAPE", "cancel",\r
- // "DOWN", "selectNext",\r
- // "KP_DOWN", "selectNext",\r
- // "UP", "selectPrevious",\r
- // "KP_UP", "selectPrevious",\r
- // "LEFT", "selectParent",\r
- // "KP_LEFT", "selectParent",\r
- // "RIGHT", "selectChild",\r
- // "KP_RIGHT", "selectChild",\r
- // "ENTER", "return",\r
- // "ctrl ENTER", "return",\r
- // "SPACE", "return"\r
- // },\r
- // "PopupMenu.selectedWindowInputMapBindings.RightToLeft", new Object[]\r
- // {\r
- // "LEFT", "selectChild",\r
- // "KP_LEFT", "selectChild",\r
- // "RIGHT", "selectParent",\r
- // "KP_RIGHT", "selectParent",\r
- // },\r
- "PopupMenu.consumeEventOnClose",\r
- Boolean.FALSE,\r
-\r
- // *** OptionPane\r
- // You can additionaly define OptionPane.messageFont which will\r
- // dictate the fonts used for the message, and\r
- // OptionPane.buttonFont, which defines the font for the buttons.\r
- // "OptionPane.font", dialogPlain12,\r
- // "OptionPane.background", control,\r
- // "OptionPane.foreground", controlText,\r
- "OptionPane.messageForeground",\r
- controlText,\r
- // "OptionPane.border", optionPaneBorder,\r
- // "OptionPane.messageAreaBorder", zeroBorder,\r
- // "OptionPane.buttonAreaBorder", optionPaneButtonAreaBorder,\r
- // "OptionPane.minimumSize", optionPaneMinimumSize,\r
- // "OptionPane.errorIcon", SwingUtilities2.makeIcon(getClass(),\r
- // BasicLookAndFeel.class,\r
- // "icons/Error.gif"),\r
- // "OptionPane.informationIcon", SwingUtilities2.makeIcon(getClass(),\r
- // BasicLookAndFeel.class,\r
- // "icons/Inform.gif"),\r
- // "OptionPane.warningIcon", SwingUtilities2.makeIcon(getClass(),\r
- // BasicLookAndFeel.class,\r
- // "icons/Warn.gif"),\r
- // "OptionPane.questionIcon", SwingUtilities2.makeIcon(getClass(),\r
- // BasicLookAndFeel.class,\r
- // "icons/Question.gif"),\r
- // "OptionPane.windowBindings", new Object[] {\r
- // "ESCAPE", "close" },\r
- // // OptionPane Auditory Cue Mappings\r
- // "OptionPane.errorSound", null,\r
- // "OptionPane.informationSound", null, // Info and Plain\r
- // "OptionPane.questionSound", null,\r
- // "OptionPane.warningSound", null,\r
- // "OptionPane.buttonClickThreshhold", fiveHundred,\r
-\r
- // *** Panel\r
- "Panel.font", \r
- dialogPlain12,\r
- "Panel.background", \r
- control,\r
- "Panel.foreground",\r
- textText,\r
-\r
- // *** ProgressBar\r
- // "ProgressBar.font", dialogPlain12,\r
- // "ProgressBar.foreground", textHighlight,\r
- // "ProgressBar.background", control,\r
- // "ProgressBar.selectionForeground", control,\r
- // "ProgressBar.selectionBackground", textHighlight,\r
- // "ProgressBar.border", progressBarBorder,\r
- "ProgressBar.cellLength",\r
- new Integer(1),\r
- "ProgressBar.cellSpacing",\r
- zero,\r
- "ProgressBar.repaintInterval",\r
- new Integer(50),\r
- "ProgressBar.cycleTime",\r
- new Integer(3000),\r
- "ProgressBar.horizontalSize",\r
- new DimensionUIResource(146, 12),\r
- "ProgressBar.verticalSize",\r
- new DimensionUIResource(12, 146),\r
-\r
- // *** Separator\r
- // "Separator.shadow", controlShadow, // DEPRECATED - DO NOT USE!\r
- // "Separator.highlight", controlLtHighlight, // DEPRECATED - DO NOT\r
- // USE!\r
- //\r
- // "Separator.background", controlLtHighlight,\r
- // "Separator.foreground", controlShadow,\r
-\r
- // *** ScrollBar/ScrollPane/Viewport\r
- // "ScrollBar.background", scrollBarTrack,\r
- "ScrollBar.foreground",\r
- control,\r
- // "ScrollBar.track", table.get("scrollbar"),\r
- // "ScrollBar.trackHighlight", controlDkShadow,\r
- // "ScrollBar.thumb", control,\r
- // "ScrollBar.thumbHighlight", controlLtHighlight,\r
- // "ScrollBar.thumbDarkShadow", controlDkShadow,\r
- // "ScrollBar.thumbShadow", controlShadow,\r
- // "ScrollBar.border", null,\r
- // "ScrollBar.minimumThumbSize", minimumThumbSize,\r
- // "ScrollBar.maximumThumbSize", maximumThumbSize,\r
- // "ScrollBar.ancestorInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "RIGHT", "positiveUnitIncrement",\r
- // "KP_RIGHT", "positiveUnitIncrement",\r
- // "DOWN", "positiveUnitIncrement",\r
- // "KP_DOWN", "positiveUnitIncrement",\r
- // "PAGE_DOWN", "positiveBlockIncrement",\r
- // "LEFT", "negativeUnitIncrement",\r
- // "KP_LEFT", "negativeUnitIncrement",\r
- // "UP", "negativeUnitIncrement",\r
- // "KP_UP", "negativeUnitIncrement",\r
- // "PAGE_UP", "negativeBlockIncrement",\r
- // "HOME", "minScroll",\r
- // "END", "maxScroll"\r
- // }),\r
- // "ScrollBar.ancestorInputMap.RightToLeft",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "RIGHT", "negativeUnitIncrement",\r
- // "KP_RIGHT", "negativeUnitIncrement",\r
- // "LEFT", "positiveUnitIncrement",\r
- // "KP_LEFT", "positiveUnitIncrement",\r
- // }),\r
- "ScrollBar.width",\r
- new Integer(16),\r
-\r
- // "ScrollPane.font", dialogPlain12,\r
- // "ScrollPane.background", control,\r
- // "ScrollPane.foreground", controlText,\r
- // "ScrollPane.border", textFieldBorder,\r
- // "ScrollPane.viewportBorder", null,\r
- // "ScrollPane.ancestorInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "RIGHT", "unitScrollRight",\r
- // "KP_RIGHT", "unitScrollRight",\r
- // "DOWN", "unitScrollDown",\r
- // "KP_DOWN", "unitScrollDown",\r
- // "LEFT", "unitScrollLeft",\r
- // "KP_LEFT", "unitScrollLeft",\r
- // "UP", "unitScrollUp",\r
- // "KP_UP", "unitScrollUp",\r
- // "PAGE_UP", "scrollUp",\r
- // "PAGE_DOWN", "scrollDown",\r
- // "ctrl PAGE_UP", "scrollLeft",\r
- // "ctrl PAGE_DOWN", "scrollRight",\r
- // "ctrl HOME", "scrollHome",\r
- // "ctrl END", "scrollEnd"\r
- // }),\r
- // "ScrollPane.ancestorInputMap.RightToLeft",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "ctrl PAGE_UP", "scrollRight",\r
- // "ctrl PAGE_DOWN", "scrollLeft",\r
- // }),\r
- //\r
- // "Viewport.font", dialogPlain12,\r
- // "Viewport.background", control,\r
- "Viewport.foreground",\r
- textText,\r
-\r
- // *** Slider\r
- // "Slider.font", dialogPlain12,\r
- // "Slider.foreground", control,\r
- // "Slider.background", control,\r
- // "Slider.highlight", controlLtHighlight,\r
- // "Slider.tickColor", Color.black,\r
- // "Slider.shadow", controlShadow,\r
- // "Slider.focus", controlDkShadow,\r
- // "Slider.border", null,\r
- "Slider.horizontalSize",\r
- new Dimension(200, 21),\r
- "Slider.verticalSize",\r
- new Dimension(21, 200),\r
- "Slider.minimumHorizontalSize",\r
- new Dimension(36, 21),\r
- "Slider.minimumVerticalSize",\r
- new Dimension(21, 36),\r
- // "Slider.focusInsets", sliderFocusInsets,\r
- // "Slider.focusInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "RIGHT", "positiveUnitIncrement",\r
- // "KP_RIGHT", "positiveUnitIncrement",\r
- // "DOWN", "negativeUnitIncrement",\r
- // "KP_DOWN", "negativeUnitIncrement",\r
- // "PAGE_DOWN", "negativeBlockIncrement",\r
- // "LEFT", "negativeUnitIncrement",\r
- // "KP_LEFT", "negativeUnitIncrement",\r
- // "UP", "positiveUnitIncrement",\r
- // "KP_UP", "positiveUnitIncrement",\r
- // "PAGE_UP", "positiveBlockIncrement",\r
- // "HOME", "minScroll",\r
- // "END", "maxScroll"\r
- // }),\r
- // "Slider.focusInputMap.RightToLeft",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "RIGHT", "negativeUnitIncrement",\r
- // "KP_RIGHT", "negativeUnitIncrement",\r
- // "LEFT", "positiveUnitIncrement",\r
- // "KP_LEFT", "positiveUnitIncrement",\r
- // }),\r
- //\r
- // *** Spinner\r
- "Spinner.font",\r
- monospacedPlain12,\r
- // "Spinner.background", control,\r
- // "Spinner.foreground", control,\r
- // "Spinner.border", textFieldBorder,\r
- // "Spinner.arrowButtonBorder", null,\r
- // "Spinner.arrowButtonInsets", null,\r
- "Spinner.arrowButtonSize",\r
- new Dimension(16, 5),\r
- // "Spinner.ancestorInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "UP", "increment",\r
- // "KP_UP", "increment",\r
- // "DOWN", "decrement",\r
- // "KP_DOWN", "decrement",\r
- // }),\r
- // "Spinner.editorBorderPainted", Boolean.FALSE,\r
- "Spinner.editorAlignment",\r
- JTextField.TRAILING,\r
-\r
- // *** SplitPane\r
- "SplitPane.background",\r
- control,\r
- // "SplitPane.highlight", controlLtHighlight,\r
- // "SplitPane.shadow", controlShadow,\r
- // "SplitPane.darkShadow", controlDkShadow,\r
- // "SplitPane.border", splitPaneBorder,\r
- "SplitPane.dividerSize",\r
- new Integer(7),\r
- // "SplitPaneDivider.border", splitPaneDividerBorder,\r
- "SplitPaneDivider.draggingColor",\r
- darkGray,\r
- // "SplitPane.ancestorInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "UP", "negativeIncrement",\r
- // "DOWN", "positiveIncrement",\r
- // "LEFT", "negativeIncrement",\r
- // "RIGHT", "positiveIncrement",\r
- // "KP_UP", "negativeIncrement",\r
- // "KP_DOWN", "positiveIncrement",\r
- // "KP_LEFT", "negativeIncrement",\r
- // "KP_RIGHT", "positiveIncrement",\r
- // "HOME", "selectMin",\r
- // "END", "selectMax",\r
- // "F8", "startResize",\r
- // "F6", "toggleFocus",\r
- // "ctrl TAB", "focusOutForward",\r
- // "ctrl shift TAB", "focusOutBackward"\r
- // }),\r
- //\r
- // *** TabbedPane\r
- // "TabbedPane.font", dialogPlain12,\r
- // "TabbedPane.background", control,\r
- // "TabbedPane.foreground", controlText,\r
- // "TabbedPane.highlight", controlLtHighlight,\r
- // "TabbedPane.light", controlHighlight,\r
- // "TabbedPane.shadow", controlShadow,\r
- // "TabbedPane.darkShadow", controlDkShadow,\r
- "TabbedPane.selected",\r
- null,\r
- // "TabbedPane.focus", controlText,\r
- "TabbedPane.textIconGap",\r
- four,\r
-\r
- // Causes tabs to be painted on top of the content area border.\r
- // The amount of overlap is then controlled by tabAreaInsets.bottom,\r
- // which is zero by default\r
- "TabbedPane.tabsOverlapBorder",\r
- Boolean.FALSE,\r
- // "TabbedPane.selectionFollowsFocus", Boolean.TRUE,\r
-\r
- "TabbedPane.labelShift",\r
- 1,\r
- "TabbedPane.selectedLabelShift",\r
- -1,\r
- "TabbedPane.tabInsets",\r
- tabbedPaneTabInsets,\r
- "TabbedPane.selectedTabPadInsets",\r
- tabbedPaneTabPadInsets,\r
- "TabbedPane.tabAreaInsets",\r
- tabbedPaneTabAreaInsets,\r
- "TabbedPane.contentBorderInsets",\r
- tabbedPaneContentBorderInsets,\r
- "TabbedPane.tabRunOverlay",\r
- new Integer(2),\r
- // "TabbedPane.tabsOpaque", Boolean.TRUE,\r
- // "TabbedPane.contentOpaque", Boolean.TRUE,\r
- // "TabbedPane.focusInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "RIGHT", "navigateRight",\r
- // "KP_RIGHT", "navigateRight",\r
- // "LEFT", "navigateLeft",\r
- // "KP_LEFT", "navigateLeft",\r
- // "UP", "navigateUp",\r
- // "KP_UP", "navigateUp",\r
- // "DOWN", "navigateDown",\r
- // "KP_DOWN", "navigateDown",\r
- // "ctrl DOWN", "requestFocusForVisibleComponent",\r
- // "ctrl KP_DOWN", "requestFocusForVisibleComponent",\r
- // }),\r
- // "TabbedPane.ancestorInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "ctrl PAGE_DOWN", "navigatePageDown",\r
- // "ctrl PAGE_UP", "navigatePageUp",\r
- // "ctrl UP", "requestFocus",\r
- // "ctrl KP_UP", "requestFocus",\r
- // }),\r
- //\r
- //\r
- // *** Table\r
- // "Table.font", dialogPlain12,\r
- // "Table.foreground", controlText, // cell text color\r
- "Table.background",\r
- window, // cell background color\r
- // "Table.selectionForeground", textHighlightText,\r
- // "Table.selectionBackground", textHighlight,\r
- // "Table.dropLineColor", controlShadow,\r
- "Table.dropLineShortColor",\r
- black,\r
- "Table.gridColor",\r
- gray, // grid line color\r
- "Table.focusCellBackground",\r
- window,\r
- "Table.focusCellForeground",\r
- controlText,\r
- // "Table.focusCellHighlightBorder", focusCellHighlightBorder,\r
- // "Table.scrollPaneBorder", loweredBevelBorder,\r
- // "Table.ancestorInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "ctrl C", "copy",\r
- // "ctrl V", "paste",\r
- // "ctrl X", "cut",\r
- // "COPY", "copy",\r
- // "PASTE", "paste",\r
- // "CUT", "cut",\r
- // "control INSERT", "copy",\r
- // "shift INSERT", "paste",\r
- // "shift DELETE", "cut",\r
- // "RIGHT", "selectNextColumn",\r
- // "KP_RIGHT", "selectNextColumn",\r
- // "shift RIGHT", "selectNextColumnExtendSelection",\r
- // "shift KP_RIGHT", "selectNextColumnExtendSelection",\r
- // "ctrl shift RIGHT", "selectNextColumnExtendSelection",\r
- // "ctrl shift KP_RIGHT", "selectNextColumnExtendSelection",\r
- // "ctrl RIGHT", "selectNextColumnChangeLead",\r
- // "ctrl KP_RIGHT", "selectNextColumnChangeLead",\r
- // "LEFT", "selectPreviousColumn",\r
- // "KP_LEFT", "selectPreviousColumn",\r
- // "shift LEFT", "selectPreviousColumnExtendSelection",\r
- // "shift KP_LEFT", "selectPreviousColumnExtendSelection",\r
- // "ctrl shift LEFT", "selectPreviousColumnExtendSelection",\r
- // "ctrl shift KP_LEFT", "selectPreviousColumnExtendSelection",\r
- // "ctrl LEFT", "selectPreviousColumnChangeLead",\r
- // "ctrl KP_LEFT", "selectPreviousColumnChangeLead",\r
- // "DOWN", "selectNextRow",\r
- // "KP_DOWN", "selectNextRow",\r
- // "shift DOWN", "selectNextRowExtendSelection",\r
- // "shift KP_DOWN", "selectNextRowExtendSelection",\r
- // "ctrl shift DOWN", "selectNextRowExtendSelection",\r
- // "ctrl shift KP_DOWN", "selectNextRowExtendSelection",\r
- // "ctrl DOWN", "selectNextRowChangeLead",\r
- // "ctrl KP_DOWN", "selectNextRowChangeLead",\r
- // "UP", "selectPreviousRow",\r
- // "KP_UP", "selectPreviousRow",\r
- // "shift UP", "selectPreviousRowExtendSelection",\r
- // "shift KP_UP", "selectPreviousRowExtendSelection",\r
- // "ctrl shift UP", "selectPreviousRowExtendSelection",\r
- // "ctrl shift KP_UP", "selectPreviousRowExtendSelection",\r
- // "ctrl UP", "selectPreviousRowChangeLead",\r
- // "ctrl KP_UP", "selectPreviousRowChangeLead",\r
- // "HOME", "selectFirstColumn",\r
- // "shift HOME", "selectFirstColumnExtendSelection",\r
- // "ctrl shift HOME", "selectFirstRowExtendSelection",\r
- // "ctrl HOME", "selectFirstRow",\r
- // "END", "selectLastColumn",\r
- // "shift END", "selectLastColumnExtendSelection",\r
- // "ctrl shift END", "selectLastRowExtendSelection",\r
- // "ctrl END", "selectLastRow",\r
- // "PAGE_UP", "scrollUpChangeSelection",\r
- // "shift PAGE_UP", "scrollUpExtendSelection",\r
- // "ctrl shift PAGE_UP", "scrollLeftExtendSelection",\r
- // "ctrl PAGE_UP", "scrollLeftChangeSelection",\r
- // "PAGE_DOWN", "scrollDownChangeSelection",\r
- // "shift PAGE_DOWN", "scrollDownExtendSelection",\r
- // "ctrl shift PAGE_DOWN", "scrollRightExtendSelection",\r
- // "ctrl PAGE_DOWN", "scrollRightChangeSelection",\r
- // "TAB", "selectNextColumnCell",\r
- // "shift TAB", "selectPreviousColumnCell",\r
- // "ENTER", "selectNextRowCell",\r
- // "shift ENTER", "selectPreviousRowCell",\r
- // "ctrl A", "selectAll",\r
- // "ctrl SLASH", "selectAll",\r
- // "ctrl BACK_SLASH", "clearSelection",\r
- // "ESCAPE", "cancel",\r
- // "F2", "startEditing",\r
- // "SPACE", "addToSelection",\r
- // "ctrl SPACE", "toggleAndAnchor",\r
- // "shift SPACE", "extendTo",\r
- // "ctrl shift SPACE", "moveSelectionTo",\r
- // "F8", "focusHeader"\r
- // }),\r
- // "Table.ancestorInputMap.RightToLeft",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "RIGHT", "selectPreviousColumn",\r
- // "KP_RIGHT", "selectPreviousColumn",\r
- // "shift RIGHT", "selectPreviousColumnExtendSelection",\r
- // "shift KP_RIGHT", "selectPreviousColumnExtendSelection",\r
- // "ctrl shift RIGHT", "selectPreviousColumnExtendSelection",\r
- // "ctrl shift KP_RIGHT", "selectPreviousColumnExtendSelection",\r
- // "ctrl RIGHT", "selectPreviousColumnChangeLead",\r
- // "ctrl KP_RIGHT", "selectPreviousColumnChangeLead",\r
- // "LEFT", "selectNextColumn",\r
- // "KP_LEFT", "selectNextColumn",\r
- // "shift LEFT", "selectNextColumnExtendSelection",\r
- // "shift KP_LEFT", "selectNextColumnExtendSelection",\r
- // "ctrl shift LEFT", "selectNextColumnExtendSelection",\r
- // "ctrl shift KP_LEFT", "selectNextColumnExtendSelection",\r
- // "ctrl LEFT", "selectNextColumnChangeLead",\r
- // "ctrl KP_LEFT", "selectNextColumnChangeLead",\r
- // "ctrl PAGE_UP", "scrollRightChangeSelection",\r
- // "ctrl PAGE_DOWN", "scrollLeftChangeSelection",\r
- // "ctrl shift PAGE_UP", "scrollRightExtendSelection",\r
- // "ctrl shift PAGE_DOWN", "scrollLeftExtendSelection",\r
- // }),\r
- // "Table.ascendingSortIcon", new SwingLazyValue(\r
- // "sun.swing.icon.SortArrowIcon",\r
- // null, new Object[] { Boolean.TRUE,\r
- // "Table.sortIconColor" }),\r
- // "Table.descendingSortIcon", new SwingLazyValue(\r
- // "sun.swing.icon.SortArrowIcon",\r
- // null, new Object[] { Boolean.FALSE,\r
- // "Table.sortIconColor" }),\r
- // "Table.sortIconColor", controlShadow,\r
- //\r
- // "TableHeader.font", dialogPlain12,\r
- // "TableHeader.foreground", controlText, // header text color\r
- // "TableHeader.background", control, // header background\r
- // "TableHeader.cellBorder", tableHeaderBorder,\r
-\r
- // Support for changing the background/border of the currently\r
- // selected header column when the header has the keyboard focus.\r
- // "TableHeader.focusCellBackground", table.getColor("text"), // like\r
- // text component bg\r
- // "TableHeader.focusCellForeground", null,\r
- // "TableHeader.focusCellBorder", null,\r
- // "TableHeader.ancestorInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "SPACE", "toggleSortOrder",\r
- // "LEFT", "selectColumnToLeft",\r
- // "KP_LEFT", "selectColumnToLeft",\r
- // "RIGHT", "selectColumnToRight",\r
- // "KP_RIGHT", "selectColumnToRight",\r
- // "alt LEFT", "moveColumnLeft",\r
- // "alt KP_LEFT", "moveColumnLeft",\r
- // "alt RIGHT", "moveColumnRight",\r
- // "alt KP_RIGHT", "moveColumnRight",\r
- // "alt shift LEFT", "resizeLeft",\r
- // "alt shift KP_LEFT", "resizeLeft",\r
- // "alt shift RIGHT", "resizeRight",\r
- // "alt shift KP_RIGHT", "resizeRight",\r
- // "ESCAPE", "focusTable",\r
- // }),\r
- //\r
- // *** Text\r
- "TextField.font",\r
- sansSerifPlain12,\r
- "TextField.background",\r
- window,\r
- "TextField.foreground",\r
- textText,\r
- // "TextField.shadow", controlShadow,\r
- // "TextField.darkShadow", controlDkShadow,\r
- // "TextField.light", controlHighlight,\r
- // "TextField.highlight", controlLtHighlight,\r
- // "TextField.inactiveForeground", textInactiveText,\r
- // "TextField.inactiveBackground", control,\r
- // "TextField.selectionBackground", textHighlight,\r
- // "TextField.selectionForeground", textHighlightText,\r
- // "TextField.caretForeground", textText,\r
- // "TextField.caretBlinkRate", caretBlinkRate,\r
- // "TextField.border", textFieldBorder,\r
- "TextField.margin",\r
- zeroInsets,\r
-\r
- "FormattedTextField.font",\r
- sansSerifPlain12,\r
- "FormattedTextField.background",\r
- window,\r
- "FormattedTextField.foreground",\r
- textText,\r
- // "FormattedTextField.inactiveForeground", textInactiveText,\r
- // "FormattedTextField.inactiveBackground", control,\r
- // "FormattedTextField.selectionBackground", textHighlight,\r
- // "FormattedTextField.selectionForeground", textHighlightText,\r
- "FormattedTextField.caretForeground",\r
- textText,\r
- // "FormattedTextField.caretBlinkRate", caretBlinkRate,\r
- // "FormattedTextField.border", textFieldBorder,\r
- "FormattedTextField.margin",\r
- zeroInsets,\r
- // "FormattedTextField.focusInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "ctrl C", DefaultEditorKit.copyAction,\r
- // "ctrl V", DefaultEditorKit.pasteAction,\r
- // "ctrl X", DefaultEditorKit.cutAction,\r
- // "COPY", DefaultEditorKit.copyAction,\r
- // "PASTE", DefaultEditorKit.pasteAction,\r
- // "CUT", DefaultEditorKit.cutAction,\r
- // "control INSERT", DefaultEditorKit.copyAction,\r
- // "shift INSERT", DefaultEditorKit.pasteAction,\r
- // "shift DELETE", DefaultEditorKit.cutAction,\r
- // "shift LEFT", DefaultEditorKit.selectionBackwardAction,\r
- // "shift KP_LEFT", DefaultEditorKit.selectionBackwardAction,\r
- // "shift RIGHT", DefaultEditorKit.selectionForwardAction,\r
- // "shift KP_RIGHT", DefaultEditorKit.selectionForwardAction,\r
- // "ctrl LEFT", DefaultEditorKit.previousWordAction,\r
- // "ctrl KP_LEFT", DefaultEditorKit.previousWordAction,\r
- // "ctrl RIGHT", DefaultEditorKit.nextWordAction,\r
- // "ctrl KP_RIGHT", DefaultEditorKit.nextWordAction,\r
- // "ctrl shift LEFT", DefaultEditorKit.selectionPreviousWordAction,\r
- // "ctrl shift KP_LEFT", DefaultEditorKit.selectionPreviousWordAction,\r
- // "ctrl shift RIGHT", DefaultEditorKit.selectionNextWordAction,\r
- // "ctrl shift KP_RIGHT", DefaultEditorKit.selectionNextWordAction,\r
- // "ctrl A", DefaultEditorKit.selectAllAction,\r
- // "HOME", DefaultEditorKit.beginLineAction,\r
- // "END", DefaultEditorKit.endLineAction,\r
- // "shift HOME", DefaultEditorKit.selectionBeginLineAction,\r
- // "shift END", DefaultEditorKit.selectionEndLineAction,\r
- // "BACK_SPACE", DefaultEditorKit.deletePrevCharAction,\r
- // "shift BACK_SPACE", DefaultEditorKit.deletePrevCharAction,\r
- // "ctrl H", DefaultEditorKit.deletePrevCharAction,\r
- // "DELETE", DefaultEditorKit.deleteNextCharAction,\r
- // "ctrl DELETE", DefaultEditorKit.deleteNextWordAction,\r
- // "ctrl BACK_SPACE", DefaultEditorKit.deletePrevWordAction,\r
- // "RIGHT", DefaultEditorKit.forwardAction,\r
- // "LEFT", DefaultEditorKit.backwardAction,\r
- // "KP_RIGHT", DefaultEditorKit.forwardAction,\r
- // "KP_LEFT", DefaultEditorKit.backwardAction,\r
- // "ENTER", JTextField.notifyAction,\r
- // "ctrl BACK_SLASH", "unselect",\r
- // "control shift O", "toggle-componentOrientation",\r
- // "ESCAPE", "reset-field-edit",\r
- // "UP", "increment",\r
- // "KP_UP", "increment",\r
- // "DOWN", "decrement",\r
- // "KP_DOWN", "decrement",\r
- // }),\r
- //\r
- "PasswordField.font",\r
- monospacedPlain12,\r
- "PasswordField.background",\r
- window,\r
- "PasswordField.foreground",\r
- textText,\r
- // "PasswordField.inactiveForeground", textInactiveText,\r
- // "PasswordField.inactiveBackground", control,\r
- // "PasswordField.selectionBackground", textHighlight,\r
- // "PasswordField.selectionForeground", textHighlightText,\r
- // "PasswordField.caretForeground", textText,\r
- // "PasswordField.caretBlinkRate", caretBlinkRate,\r
- // "PasswordField.border", textFieldBorder,\r
- "PasswordField.margin",\r
- zeroInsets,\r
- "PasswordField.echoChar",\r
- '*',\r
-\r
- "TextArea.font",\r
- monospacedPlain12,\r
- "TextArea.background",\r
- window,\r
- "TextArea.foreground",\r
- textText,\r
- // "TextArea.inactiveForeground", textInactiveText,\r
- // "TextArea.selectionBackground", textHighlight,\r
- // "TextArea.selectionForeground", textHighlightText,\r
- // "TextArea.caretForeground", textText,\r
- // "TextArea.caretBlinkRate", caretBlinkRate,\r
- // "TextArea.border", marginBorder,\r
- "TextArea.margin",\r
- zeroInsets,\r
-\r
- "TextPane.font",\r
- serifPlain12,\r
- "TextPane.background",\r
- white,\r
- "TextPane.foreground",\r
- textText,\r
- // "TextPane.selectionBackground", textHighlight,\r
- // "TextPane.selectionForeground", textHighlightText,\r
- // "TextPane.caretForeground", textText,\r
- // "TextPane.caretBlinkRate", caretBlinkRate,\r
- // "TextPane.inactiveForeground", textInactiveText,\r
- // "TextPane.border", marginBorder,\r
- "TextPane.margin",\r
- editorMargin,\r
-\r
- "EditorPane.font",\r
- serifPlain12,\r
- "EditorPane.background",\r
- white,\r
- "EditorPane.foreground",\r
- textText,\r
- // "EditorPane.selectionBackground", textHighlight,\r
- // "EditorPane.selectionForeground", textHighlightText,\r
- // "EditorPane.caretForeground", textText,\r
- // "EditorPane.caretBlinkRate", caretBlinkRate,\r
- // "EditorPane.inactiveForeground", textInactiveText,\r
- // "EditorPane.border", marginBorder,\r
- "EditorPane.margin",\r
- editorMargin,\r
- //\r
- // "html.pendingImage", SwingUtilities2.makeIcon(getClass(),\r
- // BasicLookAndFeel.class,\r
- // "icons/image-delayed.png"),\r
- // "html.missingImage", SwingUtilities2.makeIcon(getClass(),\r
- // BasicLookAndFeel.class,\r
- // "icons/image-failed.png"),\r
- // *** TitledBorder\r
- // "TitledBorder.font", dialogPlain12,\r
- "TitledBorder.titleColor",\r
- controlText,\r
- // "TitledBorder.border", etchedBorder,\r
-\r
- // *** ToolBar\r
- // "ToolBar.font", dialogPlain12,\r
- // "ToolBar.background", control,\r
- // "ToolBar.foreground", controlText,\r
- // "ToolBar.shadow", controlShadow,\r
- // "ToolBar.darkShadow", controlDkShadow,\r
- // "ToolBar.light", controlHighlight,\r
- // "ToolBar.highlight", controlLtHighlight,\r
- // "ToolBar.dockingBackground", control,\r
- // "ToolBar.dockingForeground", red,\r
- // "ToolBar.floatingBackground", control,\r
- // "ToolBar.floatingForeground", darkGray,\r
- // "ToolBar.border", etchedBorder,\r
- // "ToolBar.separatorSize", toolBarSeparatorSize,\r
- // "ToolBar.ancestorInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "UP", "navigateUp",\r
- // "KP_UP", "navigateUp",\r
- // "DOWN", "navigateDown",\r
- // "KP_DOWN", "navigateDown",\r
- // "LEFT", "navigateLeft",\r
- // "KP_LEFT", "navigateLeft",\r
- // "RIGHT", "navigateRight",\r
- // "KP_RIGHT", "navigateRight"\r
- // }),\r
-\r
- // *** ToolTips\r
- // "ToolTip.font", sansSerifPlain12,\r
- // "ToolTip.background", table.get("info"),\r
- // "ToolTip.foreground", table.get("infoText"),\r
- // "ToolTip.border", blackLineBorder,\r
- // ToolTips also support backgroundInactive, borderInactive,\r
- // and foregroundInactive\r
-\r
- // *** ToolTipManager\r
- // ToolTipManager.enableToolTipMode currently supports:\r
- // "allWindows" (default):\r
- // enables tool tips for all windows of all java applications,\r
- // whether the windows are active or inactive\r
- // "activeApplication"\r
- // enables tool tips for windows of an application only when\r
- // the application has an active window\r
- // "ToolTipManager.enableToolTipMode", "allWindows",\r
-\r
- // *** Tree\r
- "Tree.paintLines",\r
- Boolean.TRUE,\r
- "Tree.lineTypeDashed",\r
- Boolean.FALSE,\r
- // "Tree.font", dialogPlain12,\r
- "Tree.background",\r
- window,\r
- "Tree.foreground",\r
- textText,\r
- "Tree.hash",\r
- gray,\r
- "Tree.textForeground",\r
- textText,\r
- "Tree.textBackground",\r
- table.get("text"),\r
- // "Tree.selectionForeground", textHighlightText,\r
- // "Tree.selectionBackground", textHighlight,\r
- // "Tree.selectionBorderColor", black,\r
- // "Tree.dropLineColor", controlShadow,\r
- // "Tree.editorBorder", blackLineBorder,\r
- "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent",\r
- new Integer(13), "Tree.rowHeight", new Integer(16),\r
- "Tree.scrollsOnExpand", Boolean.TRUE,\r
- // "Tree.openIcon", SwingUtilities2.makeIcon(getClass(),\r
- // BasicLookAndFeel.class,\r
- // "icons/TreeOpen.gif"),\r
- // "Tree.closedIcon", SwingUtilities2.makeIcon(getClass(),\r
- // BasicLookAndFeel.class,\r
- // "icons/TreeClosed.gif"),\r
- // "Tree.leafIcon", SwingUtilities2.makeIcon(getClass(),\r
- // BasicLookAndFeel.class,\r
- // "icons/TreeLeaf.gif"),\r
- // "Tree.expandedIcon", null,\r
- // "Tree.collapsedIcon", null,\r
- // "Tree.changeSelectionWithFocus", Boolean.TRUE,\r
- // "Tree.drawsFocusBorderAroundIcon", Boolean.FALSE,\r
- "Tree.timeFactor", oneThousand,\r
- // "Tree.focusInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "ctrl C", "copy",\r
- // "ctrl V", "paste",\r
- // "ctrl X", "cut",\r
- // "COPY", "copy",\r
- // "PASTE", "paste",\r
- // "CUT", "cut",\r
- // "control INSERT", "copy",\r
- // "shift INSERT", "paste",\r
- // "shift DELETE", "cut",\r
- // "UP", "selectPrevious",\r
- // "KP_UP", "selectPrevious",\r
- // "shift UP", "selectPreviousExtendSelection",\r
- // "shift KP_UP", "selectPreviousExtendSelection",\r
- // "ctrl shift UP", "selectPreviousExtendSelection",\r
- // "ctrl shift KP_UP", "selectPreviousExtendSelection",\r
- // "ctrl UP", "selectPreviousChangeLead",\r
- // "ctrl KP_UP", "selectPreviousChangeLead",\r
- // "DOWN", "selectNext",\r
- // "KP_DOWN", "selectNext",\r
- // "shift DOWN", "selectNextExtendSelection",\r
- // "shift KP_DOWN", "selectNextExtendSelection",\r
- // "ctrl shift DOWN", "selectNextExtendSelection",\r
- // "ctrl shift KP_DOWN", "selectNextExtendSelection",\r
- // "ctrl DOWN", "selectNextChangeLead",\r
- // "ctrl KP_DOWN", "selectNextChangeLead",\r
- // "RIGHT", "selectChild",\r
- // "KP_RIGHT", "selectChild",\r
- // "LEFT", "selectParent",\r
- // "KP_LEFT", "selectParent",\r
- // "PAGE_UP", "scrollUpChangeSelection",\r
- // "shift PAGE_UP", "scrollUpExtendSelection",\r
- // "ctrl shift PAGE_UP", "scrollUpExtendSelection",\r
- // "ctrl PAGE_UP", "scrollUpChangeLead",\r
- // "PAGE_DOWN", "scrollDownChangeSelection",\r
- // "shift PAGE_DOWN", "scrollDownExtendSelection",\r
- // "ctrl shift PAGE_DOWN", "scrollDownExtendSelection",\r
- // "ctrl PAGE_DOWN", "scrollDownChangeLead",\r
- // "HOME", "selectFirst",\r
- // "shift HOME", "selectFirstExtendSelection",\r
- // "ctrl shift HOME", "selectFirstExtendSelection",\r
- // "ctrl HOME", "selectFirstChangeLead",\r
- // "END", "selectLast",\r
- // "shift END", "selectLastExtendSelection",\r
- // "ctrl shift END", "selectLastExtendSelection",\r
- // "ctrl END", "selectLastChangeLead",\r
- // "F2", "startEditing",\r
- // "ctrl A", "selectAll",\r
- // "ctrl SLASH", "selectAll",\r
- // "ctrl BACK_SLASH", "clearSelection",\r
- // "ctrl LEFT", "scrollLeft",\r
- // "ctrl KP_LEFT", "scrollLeft",\r
- // "ctrl RIGHT", "scrollRight",\r
- // "ctrl KP_RIGHT", "scrollRight",\r
- // "SPACE", "addToSelection",\r
- // "ctrl SPACE", "toggleAndAnchor",\r
- // "shift SPACE", "extendTo",\r
- // "ctrl shift SPACE", "moveSelectionTo"\r
- // }),\r
- // "Tree.focusInputMap.RightToLeft",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "RIGHT", "selectParent",\r
- // "KP_RIGHT", "selectParent",\r
- // "LEFT", "selectChild",\r
- // "KP_LEFT", "selectChild",\r
- // }),\r
- // "Tree.ancestorInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "ESCAPE", "cancel"\r
- // }),\r
- // // Bind specific keys that can invoke popup on currently\r
- // // focused JComponent\r
- // "RootPane.ancestorInputMap",\r
- // new UIDefaults.LazyInputMap(new Object[] {\r
- // "shift F10", "postPopup",\r
- // "CONTEXT_MENU", "postPopup"\r
- // }),\r
- //\r
- // // These bindings are only enabled when there is a default\r
- // // button set on the rootpane.\r
- // "RootPane.defaultButtonWindowKeyBindings", new Object[] {\r
- // "ENTER", "press",\r
- // "released ENTER", "release",\r
- // "ctrl ENTER", "press",\r
- // "ctrl released ENTER", "release"\r
- // },\r
- };\r
-\r
- table.putDefaults(defaults);\r
- }\r
-\r
- // /**\r
- // * Returns the ui that is of type <code>klass</code>, or null if\r
- // * one can not be found.\r
- // */\r
- // static Object getUIOfType(ComponentUI ui, Class klass) {\r
- // if (klass.isInstance(ui)) {\r
- // return ui;\r
- // }\r
- // return null;\r
- // }\r
- //\r
- // // ********* Auditory Cue support methods and objects *********\r
- // // also see the "AuditoryCues" section of the defaults table\r
- //\r
- // /**\r
- // * Returns an <code>ActionMap</code> containing the audio actions\r
- // * for this look and feel.\r
- // * <P>\r
- // * The returned <code>ActionMap</code> contains <code>Actions</code> that\r
- // * embody the ability to render an auditory cue. These auditory\r
- // * cues map onto user and system activities that may be useful\r
- // * for an end user to know about (such as a dialog box appearing).\r
- // * <P>\r
- // * At the appropriate time,\r
- // * the {@code ComponentUI} is responsible for obtaining an\r
- // * <code>Action</code> out of the <code>ActionMap</code> and passing\r
- // * it to <code>playSound</code>.\r
- // * <P>\r
- // * This method first looks up the {@code ActionMap} from the\r
- // * defaults using the key {@code "AuditoryCues.actionMap"}.\r
- // * <p>\r
- // * If the value is {@code non-null}, it is returned. If the value\r
- // * of the default {@code "AuditoryCues.actionMap"} is {@code null}\r
- // * and the value of the default {@code "AuditoryCues.cueList"} is\r
- // * {@code non-null}, an {@code ActionMapUIResource} is created and\r
- // * populated. Population is done by iterating over each of the\r
- // * elements of the {@code "AuditoryCues.cueList"} array, and\r
- // * invoking {@code createAudioAction()} to create an {@code\r
- // * Action} for each element. The resulting {@code Action} is\r
- // * placed in the {@code ActionMapUIResource}, using the array\r
- // * element as the key. For example, if the {@code\r
- // * "AuditoryCues.cueList"} array contains a single-element, {@code\r
- // * "audioKey"}, the {@code ActionMapUIResource} is created, then\r
- // * populated by way of {@code actionMap.put(cueList[0],\r
- // * createAudioAction(cueList[0]))}.\r
- // * <p>\r
- // * If the value of the default {@code "AuditoryCues.actionMap"} is\r
- // * {@code null} and the value of the default\r
- // * {@code "AuditoryCues.cueList"} is {@code null}, an empty\r
- // * {@code ActionMapUIResource} is created.\r
- // *\r
- // *\r
- // * @return an ActionMap containing {@code Actions}\r
- // * responsible for playing auditory cues\r
- // * @throws ClassCastException if the value of the\r
- // * default {@code "AuditoryCues.actionMap"} is not an\r
- // * {@code ActionMap}, or the value of the default\r
- // * {@code "AuditoryCues.cueList"} is not an {@code Object[]}\r
- // * @see #createAudioAction\r
- // * @see #playSound(Action)\r
- // * @since 1.4\r
- // */\r
- // protected ActionMap getAudioActionMap() {\r
- // ActionMap audioActionMap = (ActionMap)UIManager.get(\r
- // "AuditoryCues.actionMap");\r
- // if (audioActionMap == null) {\r
- // Object[] acList = (Object[])UIManager.get("AuditoryCues.cueList");\r
- // if (acList != null) {\r
- // audioActionMap = new ActionMapUIResource();\r
- // for(int counter = acList.length-1; counter >= 0; counter--) {\r
- // audioActionMap.put(acList[counter],\r
- // createAudioAction(acList[counter]));\r
- // }\r
- // }\r
- // UIManager.getLookAndFeelDefaults().put("AuditoryCues.actionMap",\r
- // audioActionMap);\r
- // }\r
- // return audioActionMap;\r
- // }\r
- //\r
- // /**\r
- // * Creates and returns an {@code Action} used to play a sound.\r
- // * <p>\r
- // * If {@code key} is {@code non-null}, an {@code Action} is created\r
- // * using the value from the defaults with key {@code key}. The value\r
- // * identifies the sound resource to load when\r
- // * {@code actionPerformed} is invoked on the {@code Action}. The\r
- // * sound resource is loaded into a {@code byte[]} by way of\r
- // * {@code getClass().getResourceAsStream()}.\r
- // *\r
- // * @param key the key identifying the audio action\r
- // * @return an {@code Action} used to play the source, or {@code null}\r
- // * if {@code key} is {@code null}\r
- // * @see #playSound(Action)\r
- // * @since 1.4\r
- // */\r
- // protected Action createAudioAction(Object key) {\r
- // if (key != null) {\r
- // String audioKey = (String)key;\r
- // String audioValue = (String)UIManager.get(key);\r
- // return new AudioAction(audioKey, audioValue);\r
- // } else {\r
- // return null;\r
- // }\r
- // }\r
- //\r
- // /**\r
- // * Pass the name String to the super constructor. This is used\r
- // * later to identify the Action and decide whether to play it or\r
- // * not. Store the resource String. I is used to get the audio\r
- // * resource. In this case, the resource is an audio file.\r
- // *\r
- // * @since 1.4\r
- // */\r
- // private class AudioAction extends AbstractAction implements LineListener {\r
- // // We strive to only play one sound at a time (other platforms\r
- // // appear to do this). This is done by maintaining the field\r
- // // clipPlaying. Every time a sound is to be played,\r
- // // cancelCurrentSound is invoked to cancel any sound that may be\r
- // // playing.\r
- // private String audioResource;\r
- // private byte[] audioBuffer;\r
- //\r
- // /**\r
- // * The String is the name of the Action and\r
- // * points to the audio resource.\r
- // * The byte[] is a buffer of the audio bits.\r
- // */\r
- // public AudioAction(String name, String resource) {\r
- // super(name);\r
- // audioResource = resource;\r
- // }\r
- //\r
- // public void actionPerformed(ActionEvent e) {\r
- // if (audioBuffer == null) {\r
- // audioBuffer = loadAudioData(audioResource);\r
- // }\r
- // if (audioBuffer != null) {\r
- // cancelCurrentSound(null);\r
- // try {\r
- // AudioInputStream soundStream =\r
- // AudioSystem.getAudioInputStream(\r
- // new ByteArrayInputStream(audioBuffer));\r
- // DataLine.Info info =\r
- // new DataLine.Info(Clip.class, soundStream.getFormat());\r
- // Clip clip = (Clip) AudioSystem.getLine(info);\r
- // clip.open(soundStream);\r
- // clip.addLineListener(this);\r
- //\r
- // synchronized(audioLock) {\r
- // clipPlaying = clip;\r
- // }\r
- //\r
- // clip.start();\r
- // } catch (Exception ex) {}\r
- // }\r
- // }\r
- //\r
- // public void update(LineEvent event) {\r
- // if (event.getType() == LineEvent.Type.STOP) {\r
- // cancelCurrentSound((Clip)event.getLine());\r
- // }\r
- // }\r
- //\r
- // /**\r
- // * If the parameter is null, or equal to the currently\r
- // * playing sound, then cancel the currently playing sound.\r
- // */\r
- // private void cancelCurrentSound(Clip clip) {\r
- // Clip lastClip = null;\r
- //\r
- // synchronized(audioLock) {\r
- // if (clip == null || clip == clipPlaying) {\r
- // lastClip = clipPlaying;\r
- // clipPlaying = null;\r
- // }\r
- // }\r
- //\r
- // if (lastClip != null) {\r
- // lastClip.removeLineListener(this);\r
- // lastClip.close();\r
- // }\r
- // }\r
- // }\r
- //\r
- // /**\r
- // * Utility method that loads audio bits for the specified\r
- // * <code>soundFile</code> filename. If this method is unable to\r
- // * build a viable path name from the <code>baseClass</code> and\r
- // * <code>soundFile</code> passed into this method, it will\r
- // * return <code>null</code>.\r
- // *\r
- // * @param baseClass used as the root class/location to get the\r
- // * soundFile from\r
- // * @param soundFile the name of the audio file to be retrieved\r
- // * from disk\r
- // * @return A byte[] with audio data or null\r
- // * @since 1.4\r
- // */\r
- // private byte[] loadAudioData(final String soundFile){\r
- // if (soundFile == null) {\r
- // return null;\r
- // }\r
- // /* Copy resource into a byte array. This is\r
- // * necessary because several browsers consider\r
- // * Class.getResource a security risk since it\r
- // * can be used to load additional classes.\r
- // * Class.getResourceAsStream just returns raw\r
- // * bytes, which we can convert to a sound.\r
- // */\r
- // byte[] buffer = (byte[])AccessController.doPrivileged(\r
- // new PrivilegedAction() {\r
- // public Object run() {\r
- // try {\r
- // InputStream resource = BasicLookAndFeel.this.\r
- // getClass().getResourceAsStream(soundFile);\r
- // if (resource == null) {\r
- // return null;\r
- // }\r
- // BufferedInputStream in =\r
- // new BufferedInputStream(resource);\r
- // ByteArrayOutputStream out =\r
- // new ByteArrayOutputStream(1024);\r
- // byte[] buffer = new byte[1024];\r
- // int n;\r
- // while ((n = in.read(buffer)) > 0) {\r
- // out.write(buffer, 0, n);\r
- // }\r
- // in.close();\r
- // out.flush();\r
- // buffer = out.toByteArray();\r
- // return buffer;\r
- // } catch (IOException ioe) {\r
- // System.err.println(ioe.toString());\r
- // return null;\r
- // }\r
- // }\r
- // });\r
- // if (buffer == null) {\r
- // System.err.println(getClass().getName() + "/" +\r
- // soundFile + " not found.");\r
- // return null;\r
- // }\r
- // if (buffer.length == 0) {\r
- // System.err.println("warning: " + soundFile +\r
- // " is zero-length");\r
- // return null;\r
- // }\r
- // return buffer;\r
- // }\r
- //\r
- // /**\r
- // * If necessary, invokes {@code actionPerformed} on\r
- // * {@code audioAction} to play a sound.\r
- // * The {@code actionPerformed} method is invoked if the value of\r
- // * the {@code "AuditoryCues.playList"} default is a {@code\r
- // * non-null} {@code Object[]} containing a {@code String} entry\r
- // * equal to the name of the {@code audioAction}.\r
- // *\r
- // * @param audioAction an Action that knows how to render the audio\r
- // * associated with the system or user activity\r
- // * that is occurring; a value of {@code null}, is\r
- // * ignored\r
- // * @throws ClassCastException if {@code audioAction} is {@code non-null}\r
- // * and the value of the default {@code "AuditoryCues.playList"}\r
- // * is not an {@code Object[]}\r
- // * @since 1.4\r
- // */\r
- // protected void playSound(Action audioAction) {\r
- // if (audioAction != null) {\r
- // Object[] audioStrings = (Object[])\r
- // UIManager.get("AuditoryCues.playList");\r
- // if (audioStrings != null) {\r
- // // create a HashSet to help us decide to play or not\r
- // HashSet audioCues = new HashSet();\r
- // for (int i = 0; i < audioStrings.length; i++) {\r
- // audioCues.add(audioStrings[i]);\r
- // }\r
- // // get the name of the Action\r
- // String actionName = (String)audioAction.getValue(Action.NAME);\r
- // // if the actionName is in the audioCues HashSet, play it.\r
- // if (audioCues.contains(actionName)) {\r
- // audioAction.actionPerformed(new\r
- // ActionEvent(this, ActionEvent.ACTION_PERFORMED,\r
- // actionName));\r
- // }\r
- // }\r
- // }\r
- // }\r
- //\r
- //\r
- // /**\r
- // * Sets the parent of the passed in ActionMap to be the audio action\r
- // * map.\r
- // */\r
- // static void installAudioActionMap(ActionMap map) {\r
- // LookAndFeel laf = UIManager.getLookAndFeel();\r
- // if (laf instanceof BasicLookAndFeel) {\r
- // map.setParent(((BasicLookAndFeel)laf).getAudioActionMap());\r
- // }\r
- // }\r
- //\r
- //\r
- // /**\r
- // * Helper method to play a named sound.\r
- // *\r
- // * @param c JComponent to play the sound for.\r
- // * @param actionKey Key for the sound.\r
- // */\r
- // static void playSound(JComponent c, Object actionKey) {\r
- // LookAndFeel laf = UIManager.getLookAndFeel();\r
- // if (laf instanceof BasicLookAndFeel) {\r
- // ActionMap map = c.getActionMap();\r
- // if (map != null) {\r
- // Action audioAction = map.get(actionKey);\r
- // if (audioAction != null) {\r
- // // pass off firing the Action to a utility method\r
- // ((BasicLookAndFeel)laf).playSound(audioAction);\r
- // }\r
- // }\r
- // }\r
- // }\r
- //\r
- // /**\r
- // * This class contains listener that watches for all the mouse\r
- // * events that can possibly invoke popup on the component\r
- // */\r
- // class AWTEventHelper implements AWTEventListener,PrivilegedAction {\r
- // AWTEventHelper() {\r
- // super();\r
- // AccessController.doPrivileged(this);\r
- // }\r
- //\r
- // public Object run() {\r
- // Toolkit tk = Toolkit.getDefaultToolkit();\r
- // if(invocator == null) {\r
- // tk.addAWTEventListener(this, AWTEvent.MOUSE_EVENT_MASK);\r
- // } else {\r
- // tk.removeAWTEventListener(invocator);\r
- // }\r
- // // Return value not used.\r
- // return null;\r
- // }\r
- //\r
- // public void eventDispatched(AWTEvent ev) {\r
- // int eventID = ev.getID();\r
- // if((eventID & AWTEvent.MOUSE_EVENT_MASK) != 0) {\r
- // MouseEvent me = (MouseEvent) ev;\r
- // if(me.isPopupTrigger()) {\r
- // MenuElement[] elems = MenuSelectionManager\r
- // .defaultManager()\r
- // .getSelectedPath();\r
- // if(elems != null && elems.length != 0) {\r
- // return;\r
- // // We shall not interfere with already opened menu\r
- // }\r
- // Object c = me.getSource();\r
- // JComponent src = null;\r
- // if(c instanceof JComponent) {\r
- // src = (JComponent) c;\r
- // } else if(c instanceof BasicSplitPaneDivider) {\r
- // // Special case - if user clicks on divider we must\r
- // // invoke popup from the SplitPane\r
- // src = (JComponent)\r
- // ((BasicSplitPaneDivider)c).getParent();\r
- // }\r
- // if(src != null) {\r
- // if(src.getComponentPopupMenu() != null) {\r
- // Point pt = src.getPopupLocation(me);\r
- // if(pt == null) {\r
- // pt = me.getPoint();\r
- // pt = SwingUtilities.convertPoint((Component)c,\r
- // pt, src);\r
- // }\r
- // src.getComponentPopupMenu().show(src, pt.x, pt.y);\r
- // me.consume();\r
- // }\r
- // }\r
- // }\r
- // }\r
- // /* Activate a JInternalFrame if necessary. */\r
- // if (eventID == MouseEvent.MOUSE_PRESSED) {\r
- // Object object = ev.getSource();\r
- // if (!(object instanceof Component)) {\r
- // return;\r
- // }\r
- // Component component = (Component)object;\r
- // if (component != null) {\r
- // Component parent = component;\r
- // while (parent != null && !(parent instanceof Window)) {\r
- // if (parent instanceof JInternalFrame) {\r
- // // Activate the frame.\r
- // try { ((JInternalFrame)parent).setSelected(true); }\r
- // catch (PropertyVetoException e1) { }\r
- // }\r
- // parent = parent.getParent();\r
- // }\r
- // }\r
- // }\r
- // }\r
- // }\r
- //\r
- @Override\r
- public String getName() {\r
- return "SwingJS";\r
- }\r
-\r
- @Override\r
- public String getID() {\r
- return "SwingJS";\r
- }\r
-\r
- @Override\r
- public String getDescription() {\r
- return "SwingJS L&F";\r
- }\r
-\r
- @Override\r
- public boolean isNativeLookAndFeel() {\r
- return true;\r
- }\r
-\r
- @Override\r
- public boolean isSupportedLookAndFeel() {\r
- return true;\r
- }\r
-}\r
+/*
+ * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package swingjs.plaf;
+
+//import jsjava.awt.AWTEvent;
+import jsjava.awt.Color;
+import jsjava.awt.Dimension;
+import jsjava.awt.Font;
+import jsjavax.swing.DefaultListCellRenderer;
+import jsjavax.swing.JTextField;
+//import jsjava.awt.Component;
+//import jsjava.awt.Dimension;
+//import jsjava.awt.Font;
+//import jsjava.awt.Point;
+//import jsjava.awt.Toolkit;
+//import jsjava.awt.Window;
+//import jsjava.awt.event.AWTEventListener;
+//import jsjava.awt.event.ActionEvent;
+//import jsjava.awt.event.KeyEvent;
+//import jsjava.awt.event.MouseEvent;
+//import jsjava.beans.PropertyChangeEvent;
+//import jsjava.beans.PropertyChangeListener;
+//import jsjava.beans.PropertyVetoException;
+//import java.io.BufferedInputStream;
+//import java.io.ByteArrayInputStream;
+//import java.io.ByteArrayOutputStream;
+//import java.io.IOException;
+//import java.io.InputStream;
+////import java.io.Serializable;
+//import jsjava.security.AccessController;
+//import jsjava.security.PrivilegedAction;
+//import java.util.HashSet;
+//import jsjava.util.Locale;
+//
+////import jsjavax.sound.sampled.AudioInputStream;
+////import jsjavax.sound.sampled.AudioSystem;
+////import jsjavax.sound.sampled.Clip;
+////import jsjavax.sound.sampled.DataLine;
+////import jsjavax.sound.sampled.LineEvent;
+////import jsjavax.sound.sampled.LineListener;
+//import jsjavax.swing.AbstractAction;
+//import jsjavax.swing.Action;
+//import jsjavax.swing.ActionMap;
+//import jsjavax.swing.DefaultListCellRenderer;
+//import jsjavax.swing.JComponent;
+////import jsjavax.swing.JInternalFrame;
+//import jsjavax.swing.JTextField;
+//import jsjavax.swing.LookAndFeel;
+//import jsjavax.swing.MenuElement;
+//import jsjavax.swing.MenuSelectionManager;
+//import jsjavax.swing.SwingUtilities;
+import jsjavax.swing.LookAndFeel;
+import jsjavax.swing.UIDefaults;
+//import jsjavax.swing.UIManager;
+//import jsjavax.swing.border.BevelBorder;
+//import jsjavax.swing.plaf.ActionMapUIResource;
+//import jsjavax.swing.plaf.BorderUIResource;
+import jsjavax.swing.plaf.ColorUIResource;
+import jsjavax.swing.plaf.FontUIResource;
+//import jsjavax.swing.plaf.ComponentUI;
+import jsjavax.swing.plaf.DimensionUIResource;
+//import jsjavax.swing.plaf.DimensionUIResource;
+//import jsjavax.swing.plaf.InsetsUIResource;
+////import jsjavax.swing.plaf.basic.popupMenuUI;
+////import jsjavax.swing.plaf.basic.BasicSplitPaneDivider;
+//import jsjavax.swing.text.DefaultEditorKit;
+//
+//import jssun.awt.AppContext;
+//import jssun.swing.SwingUtilities2;
+////import jssun.swing.SwingLazyValue;
+//
+import jsjavax.swing.plaf.InsetsUIResource;
+import jssun.swing.SwingLazyValue;
+
+/**
+ * A base class to use in creating a look and feel for Swing.
+ * <p>
+ * Each of the {@code ComponentUI}s provided by {@code BasicLookAndFeel} derives
+ * its behavior from the defaults table. Unless otherwise noted each of the
+ * {@code ComponentUI} implementations in this package document the set of
+ * defaults they use. Unless otherwise noted the defaults are installed at the
+ * time {@code installUI} is invoked, and follow the recommendations outlined in
+ * {@code LookAndFeel} for installing defaults.
+ * <p>
+ * <strong>Warning:</strong> Serialized objects of this class will not be
+ * compatible with future Swing releases. The current serialization support is
+ * appropriate for short term storage or RMI between applications running the
+ * same version of Swing. As of 1.4, support for long term storage of all
+ * JavaBeans<sup><font size="-2">TM</font></sup> has been added to the
+ * <code>java.beans</code> package. Please see {@link java.beans.XMLEncoder}.
+ *
+ * @author unattributed
+ */
+public class HTML5LookAndFeel extends LookAndFeel {
+ // /**
+ // * Whether or not the developer has created a JPopupMenu.
+ // */
+ // static boolean needsEventHelper;
+ //
+ // /**
+ // * Lock used when manipulating clipPlaying.
+ // */
+ // private transient Object audioLock = new Object();
+ // /**
+ // * The Clip that is currently playing (set in AudioAction).
+ // */
+ // private Clip clipPlaying;
+ //
+ // AWTEventHelper invocator = null;
+ //
+ // /*
+ // * Listen for our AppContext being disposed
+ // */
+ // private PropertyChangeListener disposer = null;
+ //
+ /**
+ * Returns the look and feel defaults. The returned {@code UIDefaults} is
+ * populated by invoking, in order, {@code initClassDefaults},
+ * {@code initSystemColorDefaults} and {@code initComponentDefaults}.
+ * <p>
+ * While this method is public, it should only be invoked by the
+ * {@code UIManager} when the look and feel is set as the current look and
+ * feel and after {@code initialize} has been invoked.
+ *
+ * @return the look and feel defaults
+ *
+ * @see #initClassDefaults
+ * @see #initSystemColorDefaults
+ * @see #initComponentDefaults
+ */
+ public UIDefaults getDefaults() {
+ UIDefaults table = new UIDefaults(610, 0.75f);
+
+ initClassDefaults(table);
+ initSystemColorDefaults(table);
+ initComponentDefaults(table);
+
+ return table;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void initialize() {
+ // if (needsEventHelper) {
+ // installAWTEventListener();
+ // }
+ }
+
+ void installAWTEventListener() {
+ // if (invocator == null) {
+ // invocator = new AWTEventHelper();
+ // needsEventHelper = true;
+ //
+ // // Add a PropertyChangeListener to our AppContext so we're alerted
+ // // when the AppContext is disposed(), at which time this laf should
+ // // be uninitialize()d.
+ // disposer = new PropertyChangeListener() {
+ // public void propertyChange(PropertyChangeEvent prpChg) {
+ // uninitialize();
+ // }
+ // };
+ // AppContext.getAppContext().addPropertyChangeListener(
+ // AppContext.GUI_DISPOSED,
+ // disposer);
+ // }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void uninitialize() {
+ // AppContext context = AppContext.getAppContext();
+ // synchronized (popupMenuUI.MOUSE_GRABBER_KEY) {
+ // Object grabber = context.get(popupMenuUI.MOUSE_GRABBER_KEY);
+ // if (grabber != null) {
+ // ((popupMenuUI.MouseGrabber)grabber).uninstall();
+ // }
+ // }
+ // synchronized (popupMenuUI.MENU_KEYBOARD_HELPER_KEY) {
+ // Object helper =
+ // context.get(popupMenuUI.MENU_KEYBOARD_HELPER_KEY);
+ // if (helper != null) {
+ // ((popupMenuUI.MenuKeyboardHelper)helper).uninstall();
+ // }
+ // }
+ //
+ // if(invocator != null) {
+ // AccessController.doPrivileged(invocator);
+ // invocator = null;
+ // }
+ //
+ // if (disposer != null) {
+ // // Note that we're likely calling removePropertyChangeListener()
+ // // during the course of AppContext.firePropertyChange().
+ // // However, EventListenerAggreggate has code to safely modify
+ // // the list under such circumstances.
+ // context.removePropertyChangeListener(AppContext.GUI_DISPOSED,
+ // disposer);
+ // disposer = null;
+ // }
+ }
+
+ /**
+ * Populates {@code table} with mappings from {@code uiClassID} to the fully
+ * qualified name of the ui class. The value for a particular
+ * {@code uiClassID} is {@code "jsjavax.swing.plaf.basic.Basic + uiClassID"}.
+ * For example, the value for the {@code uiClassID} {@code TreeUI} is
+ * {@code "jsjavax.swing.plaf.basic.BasicTreeUI"}.
+ *
+ * @param table
+ * the {@code UIDefaults} instance the entries are added to
+ * @throws NullPointerException
+ * if {@code table} is {@code null}
+ *
+ * @see jsjavax.swing.LookAndFeel
+ * @see #getDefaults
+ */
+ protected void initClassDefaults(UIDefaults table) {
+ final String packageName = "swingjs.plaf.";
+ Object[] uiDefaults = {
+ /**/ "ButtonUI", packageName + "JSButtonUI",
+ /**/ "CheckBoxUI", packageName + "JSCheckBoxUI",
+ "ColorChooserUI", packageName + "JSColorChooserUI",
+ /**/ "FormattedTextFieldUI", packageName + "JSFormattedTextFieldUI",
+ /**/ "MenuBarUI", packageName + "JSMenuBarUI",
+ /**/ "MenuUI", packageName + "JSMenuUI",
+ /**/ "MenuItemUI", packageName + "JSMenuItemUI",
+ /**/ "CheckBoxMenuItemUI", packageName + "JSCheckBoxMenuItemUI",
+ /**/ "RadioButtonMenuItemUI", packageName + "JSRadioButtonMenuItemUI",
+ /**/ "RadioButtonUI", packageName + "JSRadioButtonUI",
+ /**/ "ToggleButtonUI", packageName + "JSToggleButtonUI",
+ /**/ "PopupMenuUI", packageName + "JSPopupMenuUI",
+ "ProgressBarUI", packageName + "JSProgressBarUI",
+ /**/ "ScrollBarUI", packageName + "JSScrollBarUI",
+ /**/ "ScrollPaneUI", packageName + "JSScrollPaneUI",
+ "SplitPaneUI", packageName + "JSSplitPaneUI",
+ /**/ "SliderUI", packageName + "JSSliderUI",
+ /**/ "SeparatorUI", packageName + "JSSeparatorUI",
+ "SpinnerUI", packageName + "JSSpinnerUI",
+ /**/ "ToolBarSeparatorUI", packageName + "JSToolBarSeparatorUI",
+ /**/ "PopupMenuSeparatorUI", packageName + "JSPopupMenuSeparatorUI",
+ "TabbedPaneUI", packageName + "JSTabbedPaneUI",
+ /**/ "TextAreaUI", packageName + "JSTextAreaUI",
+ /**/ "TextFieldUI", packageName + "JSTextFieldUI",
+ /**/ "PasswordFieldUI", packageName + "JSPasswordFieldUI",
+ "TextPaneUI", packageName + "JSTextPaneUI",
+ "EditorPaneUI", packageName + "JSEditorPaneUI",
+ "TreeUI", packageName + "JSTreeUI",
+ /**/ "LabelUI", packageName + "JSLabelUI",
+ "ListUI", packageName + "JSListUI",
+ "ToolBarUI", packageName + "JSToolBarUI",
+ "ToolTipUI", packageName + "JSToolTipUI",
+ /**/ "ComboBoxUI", packageName + "JSComboBoxUI",
+ "TableUI", packageName + "JSTableUI",
+ "TableHeaderUI", packageName + "JSTableHeaderUI",
+ "InternalFrameUI", packageName + "JSInternalFrameUI",
+ "DesktopPaneUI", packageName + "JSDesktopPaneUI",
+ "DesktopIconUI", packageName + "JSDesktopIconUI",
+ "OptionPaneUI", packageName + "JSOptionPaneUI",
+ /**/ "PanelUI", packageName + "JSPanelUI",
+ /**/ "ViewportUI", packageName + "JSViewportUI",
+ /**/ "RootPaneUI", packageName + "JSRootPaneUI"
+ };
+
+ table.putDefaults(uiDefaults);
+ }
+
+ /**
+ * Populates {@code table} with system colors. This creates an array of
+ * {@code name-color} pairs and invokes {@code loadSystemColors}.
+ * <p>
+ * The name is a {@code String} that corresponds to the name of one of the
+ * static {@code SystemColor} fields in the {@code SystemColor} class. A
+ * name-color pair is created for every such {@code SystemColor} field.
+ * <p>
+ * The {@code color} corresponds to a hex {@code String} as understood by
+ * {@code Color.decode}. For example, one of the {@code name-color} pairs is
+ * {@code "desktop"-"#005C5C"}. This corresponds to the {@code SystemColor}
+ * field {@code desktop}, with a color value of {@code new Color(0x005C5C)}.
+ * <p>
+ * The following shows two of the {@code name-color} pairs:
+ *
+ * <pre>
+ * String[] nameColorPairs = new String[] { "desktop", "#005C5C", "activeCaption",
+ * "#000080" };
+ * loadSystemColors(table, nameColorPairs, isNativeLookAndFeel());
+ * </pre>
+ *
+ * As previously stated, this invokes {@code loadSystemColors} with the
+ * supplied {@code table} and {@code name-color} pair array. The last argument
+ * to {@code loadSystemColors} indicates whether the value of the field in
+ * {@code SystemColor} should be used. This method passes the value of
+ * {@code isNativeLookAndFeel()} as the last argument to
+ * {@code loadSystemColors}.
+ *
+ * @param table
+ * the {@code UIDefaults} object the values are added to
+ * @throws NullPointerException
+ * if {@code table} is {@code null}
+ *
+ * @see jsjava.awt.SystemColor
+ * @see #getDefaults
+ * @see #loadSystemColors
+ */
+ protected void initSystemColorDefaults(UIDefaults table) {
+ String[] defaultSystemColors = {
+
+
+// "desktop", "#005C5C", /*
+// * Color of the
+// * desktop
+// * background
+// */
+// "activeCaption", "#000080", /*
+// * Color for captions (title bars) when they are
+// * active.
+// */
+// "activeCaptionText", "#FFFFFF", /*
+// * Text color for text in captions (title
+// * bars).
+// */
+// "activeCaptionBorder", "#C0C0C0", /*
+// * Border color for caption (title bar)
+// * window borders.
+// */
+// "inactiveCaption", "#808080", /*
+// * Color for captions (title bars) when not
+// * active.
+// */
+// "inactiveCaptionText", "#C0C0C0", /*
+// * Text color for text in inactive
+// * captions (title bars).
+// */
+// "inactiveCaptionBorder", "#C0C0C0", /*
+// * Border color for inactive caption
+// * (title bar) window borders.
+// */
+ // plaf.metal.OceanTheme
+ "window", "#FFFFFF", /* Default color for the interior of windows */
+// "windowBorder", "#000000", /* ??? */
+ "windowText", "#333333", /* ??? */
+ "menu", "#C0C0C0", /* Background color for menus */
+ "menuText", "#333333", /* Text color for menus */
+ "text", "#C0C0C0", /* Text background color */
+ "textText", "#333333", /* Text foreground color */
+// "textHighlight", "#000080", /* Text background color when selected */
+// "textHighlightText", "#FFFFFF", /* Text color when selected */
+// "textInactiveText", "#808080", /* Text color when disabled */
+ "control", "#EEEEEE", // SECONDARY3 Default color for controls (buttons, sliders, etc)
+ "controlText", "#333333", // Default color for text in controls
+// "controlHighlight", "#C0C0C0", /*
+// * Specular highlight (opposite of the
+// * shadow)
+// */
+// "controlLtHighlight", "#FFFFFF", /* Highlight color for controls */
+// "controlShadow", "#808080", /* Shadow color for controls */
+// "controlDkShadow", "#000000", /* Dark shadow color for controls */
+ "scrollbar", "#E0E0E0", /* Scrollbar background (usually the "track") */
+ "info", "#FFFFE1", /* ??? */
+ "infoText", "#000000" /* ??? */
+ };
+
+ loadSystemColors(table, defaultSystemColors, isNativeLookAndFeel());
+ }
+
+ /**
+ * Populates {@code table} with the {@code name-color} pairs in
+ * {@code systemColors}. Refer to {@link #initSystemColorDefaults(UIDefaults)}
+ * for details on the format of {@code systemColors}.
+ * <p>
+ * An entry is added to {@code table} for each of the {@code name-color} pairs
+ * in {@code systemColors}. The entry key is the {@code name} of the
+ * {@code name-color} pair.
+ * <p>
+ * The value of the entry corresponds to the {@code color} of the
+ * {@code name-color} pair. The value of the entry is calculated in one of two
+ * ways. With either approach the value is always a {@code ColorUIResource}.
+ * <p>
+ * If {@code useNative} is {@code false}, the {@code color} is created by
+ * using {@code Color.decode} to convert the {@code String} into a
+ * {@code Color}. If {@code decode} can not convert the {@code String} into a
+ * {@code Color} ({@code NumberFormatException} is thrown) then a
+ * {@code ColorUIResource} of black is used.
+ * <p>
+ * If {@code useNative} is {@code true}, the {@code color} is the value of the
+ * field in {@code SystemColor} with the same name as the {@code name} of the
+ * {@code name-color} pair. If the field is not valid, a
+ * {@code ColorUIResource} of black is used.
+ *
+ * @param table
+ * the {@code UIDefaults} object the values are added to
+ * @param systemColors
+ * array of {@code name-color} pairs as described in
+ * {@link #initSystemColorDefaults(UIDefaults)}
+ * @param useNative
+ * whether the color is obtained from {@code SystemColor} or
+ * {@code Color.decode}
+ * @throws NullPointerException
+ * if {@code systemColors} is {@code null}; or {@code systemColors}
+ * is not empty, and {@code table} is {@code null}; or one of the
+ * names of the {@code name-color} pairs is {@code null}; or
+ * {@code useNative} is {@code false} and one of the {@code colors}
+ * of the {@code name-color} pairs is {@code null}
+ * @throws ArrayIndexOutOfBoundsException
+ * if {@code useNative} is {@code false} and
+ * {@code systemColors.length} is odd
+ *
+ * @see #initSystemColorDefaults(jsjavax.swing.UIDefaults)
+ * @see jsjava.awt.SystemColor
+ * @see jsjava.awt.Color#decode(String)
+ */
+ protected void loadSystemColors(UIDefaults table, String[] systemColors,
+ boolean useNative) {
+ /*
+ * PENDING(hmuller) We don't load the system colors below because they're
+ * not reliable. Hopefully we'll be able to do better in a future version of
+ * AWT.
+ */
+// if (useNative) {
+// for (int i = 0; i < systemColors.length; i += 2) {
+// Color color = Color.black;
+// // try {
+// // String name = systemColors[i];
+// // color = (Color)(SystemColor.class.getField(name).get(null));
+// // } catch (Exception e) {
+// // }
+// table.put(systemColors[i], new ColorUIResource(color));
+// }
+// } else {
+ for (int i = 0; i < systemColors.length; i += 2) {
+ Color color = Color.black;
+ try {
+ color = Color.decode(systemColors[i + 1]);
+ } catch (NumberFormatException e) {
+ e.printStackTrace();
+ }
+ table.put(systemColors[i], new ColorUIResource(color));
+ }
+// }
+ }
+
+ /**
+ * Initialize the defaults table with the name of the ResourceBundle used for
+ * getting localized defaults. Also initialize the default locale used when no
+ * locale is passed into UIDefaults.get(). The default locale should generally
+ * not be relied upon. It is here for compatability with releases prior to
+ * 1.4.
+ */
+ private void initResourceBundle(UIDefaults table) {
+ // table.setDefaultLocale( Locale.getDefault() );
+ // table.addResourceBundle(
+ // "com.sun.swing.internal.plaf.basic.resources.basic" );
+ }
+
+ /**
+ * Populates {@code table} with the defaults for the basic look and feel.
+ *
+ * @param table
+ * the {@code UIDefaults} to add the values to
+ * @throws NullPointerException
+ * if {@code table} is {@code null}
+ */
+ protected void initComponentDefaults(UIDefaults table) {
+
+ initResourceBundle(table);
+
+ // // *** Shared Integers
+ // Integer fiveHundred = new Integer(500);
+
+ // *** Shared Longs
+ Long oneThousand = new Long(1000);
+
+ // *** Shared Fonts
+ Integer twelve = new Integer(12);
+ Integer fontPlain = new Integer(Font.PLAIN);
+ // Integer fontBold = new Integer(Font.BOLD);
+ // Object dialogPlain12 = new SwingLazyValue(
+ // "jsjavax.swing.plaf.FontUIResource",
+ // null,
+ // new Object[] {Font.DIALOG, fontPlain, twelve});
+ Object serifPlain12 = new FontUIResource(Font.SERIF, Font.PLAIN, 12);
+ Object sansSerifPlain12 = new FontUIResource(Font.SANS_SERIF, Font.PLAIN,
+ 12);
+ Object dialogPlain12 = new FontUIResource(Font.DIALOG, Font.PLAIN, 12);
+ Object monospacedPlain12 = new FontUIResource(Font.MONOSPACED, Font.PLAIN, 12);
+ // Object dialogBold12 = new SwingLazyValue(
+ // "jsjavax.swing.plaf.FontUIResource",
+ // null,
+ // new Object[] {Font.DIALOG, fontBold, twelve});
+ //
+
+ // *** Shared Colors
+ // ColorUIResource red = new ColorUIResource(Color.red);
+ ColorUIResource black = new ColorUIResource(Color.black);
+ ColorUIResource white = new ColorUIResource(Color.white);
+ // ColorUIResource yellow = new ColorUIResource(Color.yellow);
+ ColorUIResource gray = new ColorUIResource(Color.gray);
+ // ColorUIResource lightGray = new ColorUIResource(Color.lightGray);
+ ColorUIResource darkGray = new ColorUIResource(Color.darkGray);
+ // ColorUIResource scrollBarTrack = new ColorUIResource(224, 224, 224);
+
+ Color control = table.getColor("control");
+ // Color controlDkShadow = table.getColor("controlDkShadow");
+ // Color controlHighlight = table.getColor("controlHighlight");
+ // Color controlLtHighlight = table.getColor("controlLtHighlight");
+ // Color controlShadow = table.getColor("controlShadow");
+ Color controlText = table.getColor("controlText");
+ Color menu = table.getColor("menu");
+ Color menuText = table.getColor("menuText");
+ // Color textHighlight = table.getColor("textHighlight");
+ // Color textHighlightText = table.getColor("textHighlightText");
+ // Color textInactiveText = table.getColor("textInactiveText");
+ Color textText = table.getColor("textText");
+ Color window = table.getColor("window");
+
+ // *** Shared Insets
+ InsetsUIResource zeroInsets = new InsetsUIResource(0, 0, 0, 0);
+ InsetsUIResource twoInsets = new InsetsUIResource(2, 2, 2, 2);
+ InsetsUIResource threeInsets = new InsetsUIResource(3, 3, 3, 3);
+
+ // // *** Shared Borders
+ // Object marginBorder = new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicBorders$MarginBorder");
+ // Object etchedBorder = new SwingLazyValue(
+ // "jsjavax.swing.plaf.BorderUIResource",
+ // "getEtchedBorderUIResource");
+ // Object loweredBevelBorder = new SwingLazyValue(
+ // "jsjavax.swing.plaf.BorderUIResource",
+ // "getLoweredBevelBorderUIResource");
+ //
+ // Object popupMenuBorder = new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicBorders",
+ // "getInternalFrameBorder");
+ //
+ // Object blackLineBorder = new SwingLazyValue(
+ // "jsjavax.swing.plaf.BorderUIResource",
+ // "getBlackLineBorderUIResource");
+ // Object focusCellHighlightBorder = new SwingLazyValue(
+ // "jsjavax.swing.plaf.BorderUIResource$LineBorderUIResource",
+ // null,
+ // new Object[] {yellow});
+ //
+ // Object noFocusBorder = new
+ // BorderUIResource.EmptyBorderUIResource(1,1,1,1);
+ //
+ // Object tableHeaderBorder = new SwingLazyValue(
+ // "jsjavax.swing.plaf.BorderUIResource$BevelBorderUIResource",
+ // null,
+ // new Object[] { new Integer(BevelBorder.RAISED),
+ // controlLtHighlight,
+ // control,
+ // controlDkShadow,
+ // controlShadow });
+ //
+ //
+ // // *** Button value objects
+ //
+ // Object buttonBorder =
+ // new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicBorders",
+ // "getButtonBorder");
+ //
+ // Object buttonToggleBorder =
+ // new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicBorders",
+ // "getToggleButtonBorder");
+ //
+ // Object radioButtonBorder =
+ // new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicBorders",
+ // "getRadioButtonBorder");
+ //
+ // // *** FileChooser / FileView value objects
+ //
+ // Object newFolderIcon = SwingUtilities2.makeIcon(getClass(),
+ // BasicLookAndFeel.class,
+ // "icons/NewFolder.gif");
+ // Object upFolderIcon = SwingUtilities2.makeIcon(getClass(),
+ // BasicLookAndFeel.class,
+ // "icons/UpFolder.gif");
+ // Object homeFolderIcon = SwingUtilities2.makeIcon(getClass(),
+ // BasicLookAndFeel.class,
+ // "icons/HomeFolder.gif");
+ // Object detailsViewIcon = SwingUtilities2.makeIcon(getClass(),
+ // BasicLookAndFeel.class,
+ // "icons/DetailsView.gif");
+ // Object listViewIcon = SwingUtilities2.makeIcon(getClass(),
+ // BasicLookAndFeel.class,
+ // "icons/ListView.gif");
+ // Object directoryIcon = SwingUtilities2.makeIcon(getClass(),
+ // BasicLookAndFeel.class,
+ // "icons/Directory.gif");
+ // Object fileIcon = SwingUtilities2.makeIcon(getClass(),
+ // BasicLookAndFeel.class,
+ // "icons/File.gif");
+ // Object computerIcon = SwingUtilities2.makeIcon(getClass(),
+ // BasicLookAndFeel.class,
+ // "icons/Computer.gif");
+ // Object hardDriveIcon = SwingUtilities2.makeIcon(getClass(),
+ // BasicLookAndFeel.class,
+ // "icons/HardDrive.gif");
+ // Object floppyDriveIcon = SwingUtilities2.makeIcon(getClass(),
+ // BasicLookAndFeel.class,
+ // "icons/FloppyDrive.gif");
+ //
+ //
+ // // *** InternalFrame value objects
+ //
+ // Object internalFrameBorder = new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicBorders",
+ // "getInternalFrameBorder");
+ //
+ // // *** List value objects
+ //
+ Object listCellRendererActiveValue = new UIDefaults.ActiveValue() {
+ public Object createValue(UIDefaults table) {
+ return new DefaultListCellRenderer.UIResource();
+ }
+ };
+
+ //
+ // // *** Menus value objects
+ //
+ // Object menuBarBorder =
+ // new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicBorders",
+ // "getMenuBarBorder");
+ //
+ // Object menuItemCheckIcon =
+ // new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicIconFactory",
+ // "getMenuItemCheckIcon");
+ //
+ // Object menuItemArrowIcon =
+ // new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicIconFactory",
+ // "getMenuItemArrowIcon");
+ //
+ //
+ // Object menuArrowIcon =
+ // new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicIconFactory",
+ // "getMenuArrowIcon");
+ //
+ // Object checkBoxIcon =
+ // new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicIconFactory",
+ // "getCheckBoxIcon");
+ //
+ // Object radioButtonIcon =
+ // new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicIconFactory",
+ // "getRadioButtonIcon");
+ //
+ // Object checkBoxMenuItemIcon =
+ // new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicIconFactory",
+ // "getCheckBoxMenuItemIcon");
+ //
+ // Object radioButtonMenuItemIcon =
+ // new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicIconFactory",
+ // "getRadioButtonMenuItemIcon");
+ //
+ // Object menuItemAcceleratorDelimiter = new String("+");
+ //
+ // // *** OptionPane value objects
+ //
+ // Object optionPaneMinimumSize = new DimensionUIResource(262, 90);
+ //
+ Integer zero = new Integer(0);
+ // Object zeroBorder = new SwingLazyValue(
+ // "jsjavax.swing.plaf.BorderUIResource$EmptyBorderUIResource",
+ // new Object[] {zero, zero, zero, zero});
+ //
+ // Integer ten = new Integer(10);
+ // Object optionPaneBorder = new SwingLazyValue(
+ // "jsjavax.swing.plaf.BorderUIResource$EmptyBorderUIResource",
+ // new Object[] {ten, ten, twelve, ten});
+ //
+ // Object optionPaneButtonAreaBorder = new SwingLazyValue(
+ // "jsjavax.swing.plaf.BorderUIResource$EmptyBorderUIResource",
+ // new Object[] {new Integer(6), zero, zero, zero});
+ //
+ //
+ // // *** ProgessBar value objects
+ //
+ // Object progressBarBorder =
+ // new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicBorders",
+ // "getProgressBarBorder");
+ //
+ // // ** ScrollBar value objects
+ //
+ // Object minimumThumbSize = new DimensionUIResource(8,8);
+ // Object maximumThumbSize = new DimensionUIResource(4096,4096);
+ //
+ // // ** Slider value objects
+ //
+ // Object sliderFocusInsets = twoInsets;
+ //
+ // Object toolBarSeparatorSize = new DimensionUIResource( 10, 10 );
+ //
+ //
+ // // *** SplitPane value objects
+ //
+ // Object splitPaneBorder =
+ // new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicBorders",
+ // "getSplitPaneBorder");
+ // Object splitPaneDividerBorder =
+ // new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicBorders",
+ // "getSplitPaneDividerBorder");
+ //
+ // ** TabbedBane value objects
+
+ Object tabbedPaneTabInsets = new InsetsUIResource(0, 4, 1, 4);
+
+ Object tabbedPaneTabPadInsets = new InsetsUIResource(2, 2, 2, 1);
+
+ Object tabbedPaneTabAreaInsets = new InsetsUIResource(3, 2, 0, 2);
+
+ Object tabbedPaneContentBorderInsets = new InsetsUIResource(2, 2, 3, 3);
+
+ // *** Text value objects
+
+ // Object textFieldBorder =
+ // new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicBorders",
+ // "getTextFieldBorder");
+ //
+ Object editorMargin = threeInsets;
+
+ // Object caretBlinkRate = fiveHundred;
+ Integer four = new Integer(4);
+ //
+ // Object[] allAuditoryCues = new Object[] {
+ // "CheckBoxMenuItem.commandSound",
+ // "InternalFrame.closeSound",
+ // "InternalFrame.maximizeSound",
+ // "InternalFrame.minimizeSound",
+ // "InternalFrame.restoreDownSound",
+ // "InternalFrame.restoreUpSound",
+ // "MenuItem.commandSound",
+ // "OptionPane.errorSound",
+ // "OptionPane.informationSound",
+ // "OptionPane.questionSound",
+ // "OptionPane.warningSound",
+ // "PopupMenu.popupSound",
+ // "RadioButtonMenuItem.commandSound"};
+ //
+ // Object[] noAuditoryCues = new Object[] {"mute"};
+ //
+ // // *** Component Defaults
+ //
+ Object[] defaults = {
+ "*.font",
+ dialogPlain12,
+ "*.background",
+ control,
+ "*.foreground",
+ controlText,
+ // *** Auditory Feedback
+ // "AuditoryCues.cueList", allAuditoryCues,
+ // "AuditoryCues.allAuditoryCues", allAuditoryCues,
+ // "AuditoryCues.noAuditoryCues", noAuditoryCues,
+ // // this key defines which of the various cues to render.
+ // // L&Fs that want auditory feedback NEED to override playList.
+ // "AuditoryCues.playList", null,
+
+ // *** Buttons
+ // "Button.defaultButtonFollowsFocus", Boolean.TRUE,
+ // "Button.font", dialogPlain12,
+ // "Button.background", control,
+ // "Button.foreground", controlText,
+ // "Button.shadow", controlShadow,
+ // "Button.darkShadow", controlDkShadow,
+ // "Button.light", controlHighlight,
+ // "Button.highlight", controlLtHighlight,
+ // "Button.border", buttonBorder,
+ "Button.margin",
+ new InsetsUIResource(2, 14, 2, 14),
+ // "Button.textIconGap", four,
+ // "Button.textShiftOffset", zero,
+ // "Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
+ // "SPACE", "pressed",
+ // "released SPACE", "released",
+ // "ENTER", "pressed",
+ // "released ENTER", "released"
+ // }),
+ //
+ // "ToggleButton.font", dialogPlain12,
+ // "ToggleButton.background", control,
+ // "ToggleButton.foreground", controlText,
+ // "ToggleButton.shadow", controlShadow,
+ // "ToggleButton.darkShadow", controlDkShadow,
+ // "ToggleButton.light", controlHighlight,
+ // "ToggleButton.highlight", controlLtHighlight,
+ // "ToggleButton.border", buttonToggleBorder,
+ "ToggleButton.margin",
+ new InsetsUIResource(2, 14, 2, 14),
+ "ToggleButton.textIconGap",
+ four,
+ "ToggleButton.textShiftOffset",
+ zero,
+ // "ToggleButton.focusInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "SPACE", "pressed",
+ // "released SPACE", "released"
+ // }),
+ //
+ // "RadioButton.font", dialogPlain12,
+ // "RadioButton.background", control,
+ // "RadioButton.foreground", controlText,
+ // "RadioButton.shadow", controlShadow,
+ // "RadioButton.darkShadow", controlDkShadow,
+ // "RadioButton.light", controlHighlight,
+ // "RadioButton.highlight", controlLtHighlight,
+ // "RadioButton.border", radioButtonBorder,
+ "RadioButton.margin",
+ twoInsets,
+ "RadioButton.textIconGap",
+ four,
+ "RadioButton.textShiftOffset",
+ zero,
+ // "RadioButton.icon", radioButtonIcon,
+ // "RadioButton.focusInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "SPACE", "pressed",
+ // "released SPACE", "released",
+ // "RETURN", "pressed"
+ // }),
+ //
+ // "CheckBox.font", dialogPlain12,
+ // "CheckBox.background", control,
+ // "CheckBox.foreground", controlText,
+ // "CheckBox.border", radioButtonBorder,
+ "CheckBox.margin",
+ twoInsets,
+ "CheckBox.textIconGap",
+ four,
+ "CheckBox.textShiftOffset",
+ zero,
+ // "CheckBox.icon", checkBoxIcon,
+ // "CheckBox.focusInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "SPACE", "pressed",
+ // "released SPACE", "released"
+ // }),
+ // "FileChooser.useSystemExtensionHiding", Boolean.FALSE,
+
+ // *** ColorChooser
+ // "ColorChooser.font", dialogPlain12,
+ // "ColorChooser.background", control,
+ // "ColorChooser.foreground", controlText,
+ //
+ "ColorChooser.swatchesSwatchSize",
+ new Dimension(10, 10),
+ "ColorChooser.swatchesRecentSwatchSize",
+ new Dimension(10, 10),
+ "ColorChooser.swatchesDefaultRecentColor",
+ control,
+
+ // *** ComboBox
+ "ComboBox.font",
+ sansSerifPlain12,
+ "ComboBox.background",
+ window,
+ "ComboBox.foreground",
+ textText,
+ // "ComboBox.buttonBackground", control,
+ // "ComboBox.buttonShadow", controlShadow,
+ // "ComboBox.buttonDarkShadow", controlDkShadow,
+ // "ComboBox.buttonHighlight", controlLtHighlight,
+ // "ComboBox.selectionBackground", textHighlight,
+ // "ComboBox.selectionForeground", textHighlightText,
+ // "ComboBox.disabledBackground", control,
+ // "ComboBox.disabledForeground", textInactiveText,
+ "ComboBox.timeFactor",
+ oneThousand,
+ "ComboBox.isEnterSelectablePopup",
+ Boolean.FALSE,
+ // "ComboBox.ancestorInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "ESCAPE", "hidePopup",
+ // "PAGE_UP", "pageUpPassThrough",
+ // "PAGE_DOWN", "pageDownPassThrough",
+ // "HOME", "homePassThrough",
+ // "END", "endPassThrough",
+ // "ENTER", "enterPressed"
+ // }),
+ //
+ // *** FileChooser
+
+ // "FileChooser.newFolderIcon", newFolderIcon,
+ // "FileChooser.upFolderIcon", upFolderIcon,
+ // "FileChooser.homeFolderIcon", homeFolderIcon,
+ // "FileChooser.detailsViewIcon", detailsViewIcon,
+ // "FileChooser.listViewIcon", listViewIcon,
+ "FileChooser.readOnly",
+ Boolean.FALSE,
+ // "FileChooser.usesSingleFilePane", Boolean.FALSE,
+ // "FileChooser.ancestorInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "ESCAPE", "cancelSelection",
+ // "F5", "refresh",
+ // }),
+ //
+ // "FileView.directoryIcon", directoryIcon,
+ // "FileView.fileIcon", fileIcon,
+ // "FileView.computerIcon", computerIcon,
+ // "FileView.hardDriveIcon", hardDriveIcon,
+ // "FileView.floppyDriveIcon", floppyDriveIcon,
+
+ // *** InternalFrame
+ // "InternalFrame.titleFont", dialogBold12,
+ // "InternalFrame.borderColor", control,
+ // "InternalFrame.borderShadow", controlShadow,
+ // "InternalFrame.borderDarkShadow", controlDkShadow,
+ // "InternalFrame.borderHighlight", controlLtHighlight,
+ // "InternalFrame.borderLight", controlHighlight,
+ // "InternalFrame.border", internalFrameBorder,
+ // "InternalFrame.icon", SwingUtilities2.makeIcon(getClass(),
+ // BasicLookAndFeel.class,
+ // "icons/JavaCup16.png"),
+ //
+ // /* Default frame icons are undefined for Basic. */
+ // "InternalFrame.maximizeIcon",
+ // new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicIconFactory",
+ // "createEmptyFrameIcon"),
+ // "InternalFrame.minimizeIcon",
+ // new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicIconFactory",
+ // "createEmptyFrameIcon"),
+ // "InternalFrame.iconifyIcon",
+ // new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicIconFactory",
+ // "createEmptyFrameIcon"),
+ // "InternalFrame.closeIcon",
+ // new SwingLazyValue(
+ // "jsjavax.swing.plaf.basic.BasicIconFactory",
+ // "createEmptyFrameIcon"),
+ // // InternalFrame Auditory Cue Mappings
+ // "InternalFrame.closeSound", null,
+ // "InternalFrame.maximizeSound", null,
+ // "InternalFrame.minimizeSound", null,
+ // "InternalFrame.restoreDownSound", null,
+ // "InternalFrame.restoreUpSound", null,
+ //
+ // "InternalFrame.activeTitleBackground", table.get("activeCaption"),
+ // "InternalFrame.activeTitleForeground",
+ // table.get("activeCaptionText"),
+ // "InternalFrame.inactiveTitleBackground",
+ // table.get("inactiveCaption"),
+ // "InternalFrame.inactiveTitleForeground",
+ // table.get("inactiveCaptionText"),
+ // "InternalFrame.windowBindings", new Object[] {
+ // "shift ESCAPE", "showSystemMenu",
+ // "ctrl SPACE", "showSystemMenu",
+ // "ESCAPE", "hideSystemMenu"},
+ //
+ // "InternalFrameTitlePane.iconifyButtonOpacity", Boolean.TRUE,
+ // "InternalFrameTitlePane.maximizeButtonOpacity", Boolean.TRUE,
+ // "InternalFrameTitlePane.closeButtonOpacity", Boolean.TRUE,
+
+ // "DesktopIcon.border", internalFrameBorder,
+ //
+ // "Desktop.minOnScreenInsets", threeInsets,
+ // "Desktop.background", table.get("desktop"),
+ // "Desktop.ancestorInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "ctrl F5", "restore",
+ // "ctrl F4", "close",
+ // "ctrl F7", "move",
+ // "ctrl F8", "resize",
+ // "RIGHT", "right",
+ // "KP_RIGHT", "right",
+ // "shift RIGHT", "shrinkRight",
+ // "shift KP_RIGHT", "shrinkRight",
+ // "LEFT", "left",
+ // "KP_LEFT", "left",
+ // "shift LEFT", "shrinkLeft",
+ // "shift KP_LEFT", "shrinkLeft",
+ // "UP", "up",
+ // "KP_UP", "up",
+ // "shift UP", "shrinkUp",
+ // "shift KP_UP", "shrinkUp",
+ // "DOWN", "down",
+ // "KP_DOWN", "down",
+ // "shift DOWN", "shrinkDown",
+ // "shift KP_DOWN", "shrinkDown",
+ // "ESCAPE", "escape",
+ // "ctrl F9", "minimize",
+ // "ctrl F10", "maximize",
+ // "ctrl F6", "selectNextFrame",
+ // "ctrl TAB", "selectNextFrame",
+ // "ctrl alt F6", "selectNextFrame",
+ // "shift ctrl alt F6", "selectPreviousFrame",
+ // "ctrl F12", "navigateNext",
+ // "shift ctrl F12", "navigatePrevious"
+ // }),
+
+ // *** Label
+ // "Label.font", dialogPlain12,
+ // "Label.background", control,
+ // "Label.foreground", controlText,
+ // "Label.disabledForeground", white,
+ // "Label.disabledShadow", controlShadow,
+ "Label.border",
+ null,
+
+ // *** List
+ // "List.font", dialogPlain12,
+ "List.background",
+ window,
+ "List.foreground",
+ textText,
+ // "List.selectionBackground", textHighlight,
+ // "List.selectionForeground", textHighlightText,
+ // "List.noFocusBorder", noFocusBorder,
+ // "List.focusCellHighlightBorder", focusCellHighlightBorder,
+ // "List.dropLineColor", controlShadow,
+ // "List.border", null,
+ "List.cellRenderer",
+ listCellRendererActiveValue,
+ "List.timeFactor",
+ oneThousand,
+ // "List.focusInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "ctrl C", "copy",
+ // "ctrl V", "paste",
+ // "ctrl X", "cut",
+ // "COPY", "copy",
+ // "PASTE", "paste",
+ // "CUT", "cut",
+ // "control INSERT", "copy",
+ // "shift INSERT", "paste",
+ // "shift DELETE", "cut",
+ // "UP", "selectPreviousRow",
+ // "KP_UP", "selectPreviousRow",
+ // "shift UP", "selectPreviousRowExtendSelection",
+ // "shift KP_UP", "selectPreviousRowExtendSelection",
+ // "ctrl shift UP", "selectPreviousRowExtendSelection",
+ // "ctrl shift KP_UP", "selectPreviousRowExtendSelection",
+ // "ctrl UP", "selectPreviousRowChangeLead",
+ // "ctrl KP_UP", "selectPreviousRowChangeLead",
+ // "DOWN", "selectNextRow",
+ // "KP_DOWN", "selectNextRow",
+ // "shift DOWN", "selectNextRowExtendSelection",
+ // "shift KP_DOWN", "selectNextRowExtendSelection",
+ // "ctrl shift DOWN", "selectNextRowExtendSelection",
+ // "ctrl shift KP_DOWN", "selectNextRowExtendSelection",
+ // "ctrl DOWN", "selectNextRowChangeLead",
+ // "ctrl KP_DOWN", "selectNextRowChangeLead",
+ // "LEFT", "selectPreviousColumn",
+ // "KP_LEFT", "selectPreviousColumn",
+ // "shift LEFT", "selectPreviousColumnExtendSelection",
+ // "shift KP_LEFT", "selectPreviousColumnExtendSelection",
+ // "ctrl shift LEFT", "selectPreviousColumnExtendSelection",
+ // "ctrl shift KP_LEFT", "selectPreviousColumnExtendSelection",
+ // "ctrl LEFT", "selectPreviousColumnChangeLead",
+ // "ctrl KP_LEFT", "selectPreviousColumnChangeLead",
+ // "RIGHT", "selectNextColumn",
+ // "KP_RIGHT", "selectNextColumn",
+ // "shift RIGHT", "selectNextColumnExtendSelection",
+ // "shift KP_RIGHT", "selectNextColumnExtendSelection",
+ // "ctrl shift RIGHT", "selectNextColumnExtendSelection",
+ // "ctrl shift KP_RIGHT", "selectNextColumnExtendSelection",
+ // "ctrl RIGHT", "selectNextColumnChangeLead",
+ // "ctrl KP_RIGHT", "selectNextColumnChangeLead",
+ // "HOME", "selectFirstRow",
+ // "shift HOME", "selectFirstRowExtendSelection",
+ // "ctrl shift HOME", "selectFirstRowExtendSelection",
+ // "ctrl HOME", "selectFirstRowChangeLead",
+ // "END", "selectLastRow",
+ // "shift END", "selectLastRowExtendSelection",
+ // "ctrl shift END", "selectLastRowExtendSelection",
+ // "ctrl END", "selectLastRowChangeLead",
+ // "PAGE_UP", "scrollUp",
+ // "shift PAGE_UP", "scrollUpExtendSelection",
+ // "ctrl shift PAGE_UP", "scrollUpExtendSelection",
+ // "ctrl PAGE_UP", "scrollUpChangeLead",
+ // "PAGE_DOWN", "scrollDown",
+ // "shift PAGE_DOWN", "scrollDownExtendSelection",
+ // "ctrl shift PAGE_DOWN", "scrollDownExtendSelection",
+ // "ctrl PAGE_DOWN", "scrollDownChangeLead",
+ // "ctrl A", "selectAll",
+ // "ctrl SLASH", "selectAll",
+ // "ctrl BACK_SLASH", "clearSelection",
+ // "SPACE", "addToSelection",
+ // "ctrl SPACE", "toggleAndAnchor",
+ // "shift SPACE", "extendTo",
+ // "ctrl shift SPACE", "moveSelectionTo"
+ // }),
+ // "List.focusInputMap.RightToLeft",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "LEFT", "selectNextColumn",
+ // "KP_LEFT", "selectNextColumn",
+ // "shift LEFT", "selectNextColumnExtendSelection",
+ // "shift KP_LEFT", "selectNextColumnExtendSelection",
+ // "ctrl shift LEFT", "selectNextColumnExtendSelection",
+ // "ctrl shift KP_LEFT", "selectNextColumnExtendSelection",
+ // "ctrl LEFT", "selectNextColumnChangeLead",
+ // "ctrl KP_LEFT", "selectNextColumnChangeLead",
+ // "RIGHT", "selectPreviousColumn",
+ // "KP_RIGHT", "selectPreviousColumn",
+ // "shift RIGHT", "selectPreviousColumnExtendSelection",
+ // "shift KP_RIGHT", "selectPreviousColumnExtendSelection",
+ // "ctrl shift RIGHT", "selectPreviousColumnExtendSelection",
+ // "ctrl shift KP_RIGHT", "selectPreviousColumnExtendSelection",
+ // "ctrl RIGHT", "selectPreviousColumnChangeLead",
+ // "ctrl KP_RIGHT", "selectPreviousColumnChangeLead",
+ // }),
+ //
+ // *** Menus
+ "MenuBar.font",
+ dialogPlain12,
+ "MenuBar.background",
+ menu,
+ "MenuBar.foreground",
+ menuText,
+ // "MenuBar.shadow", controlShadow,
+ // "MenuBar.highlight", controlLtHighlight,
+ // "MenuBar.border", menuBarBorder,
+ // "MenuBar.windowBindings", new Object[] {
+ // "F10", "takeFocus" },
+ //
+ "MenuItem.font", dialogPlain12,
+ //"MenuItem.acceleratorFont", dialogPlain12,
+ "MenuItem.background",
+ menu,
+ "MenuItem.foreground",
+ menuText,
+ // "MenuItem.selectionForeground", textHighlightText,
+ // "MenuItem.selectionBackground", textHighlight,
+ // "MenuItem.disabledForeground", null,
+ // "MenuItem.acceleratorForeground", menuText,
+ // "MenuItem.acceleratorSelectionForeground", textHighlightText,
+ // "MenuItem.acceleratorDelimiter", menuItemAcceleratorDelimiter,
+ // "MenuItem.border", marginBorder,
+ // "MenuItem.borderPainted", Boolean.FALSE,
+ "MenuItem.margin",
+ twoInsets,
+ // "MenuItem.checkIcon", menuItemCheckIcon,
+ // "MenuItem.arrowIcon", menuItemArrowIcon,
+ // "MenuItem.commandSound", null,
+ //
+ "RadioButtonMenuItem.font", dialogPlain12,
+ // "RadioButtonMenuItem.acceleratorFont", dialogPlain12,
+ "RadioButtonMenuItem.background",
+ menu,
+ "RadioButtonMenuItem.foreground",
+ menuText,
+ // "RadioButtonMenuItem.selectionForeground", textHighlightText,
+ // "RadioButtonMenuItem.selectionBackground", textHighlight,
+ // "RadioButtonMenuItem.disabledForeground", null,
+ // "RadioButtonMenuItem.acceleratorForeground", menuText,
+ // "RadioButtonMenuItem.acceleratorSelectionForeground",
+ // textHighlightText,
+ // "RadioButtonMenuItem.border", marginBorder,
+ // "RadioButtonMenuItem.borderPainted", Boolean.FALSE,
+ "RadioButtonMenuItem.margin",
+ twoInsets,
+ // "RadioButtonMenuItem.checkIcon", radioButtonMenuItemIcon,
+ // "RadioButtonMenuItem.arrowIcon", menuItemArrowIcon,
+ // "RadioButtonMenuItem.commandSound", null,
+
+ "CheckBoxMenuItem.font", dialogPlain12,
+ // "CheckBoxMenuItem.acceleratorFont", dialogPlain12,
+ "CheckBoxMenuItem.background",
+ menu,
+ "CheckBoxMenuItem.foreground",
+ menuText,
+ // "CheckBoxMenuItem.selectionForeground", textHighlightText,
+ // "CheckBoxMenuItem.selectionBackground", textHighlight,
+ // "CheckBoxMenuItem.disabledForeground", null,
+ // "CheckBoxMenuItem.acceleratorForeground", menuText,
+ // "CheckBoxMenuItem.acceleratorSelectionForeground", textHighlightText,
+ // "CheckBoxMenuItem.border", marginBorder,
+ // "CheckBoxMenuItem.borderPainted", Boolean.FALSE,
+ "CheckBoxMenuItem.margin",
+ twoInsets,
+ // "CheckBoxMenuItem.checkIcon", checkBoxMenuItemIcon,
+ // "CheckBoxMenuItem.arrowIcon", menuItemArrowIcon,
+ // "CheckBoxMenuItem.commandSound", null,
+
+ // "Menu.font", dialogPlain12,
+ // "Menu.acceleratorFont", dialogPlain12,
+ "Menu.background",
+ menu,
+ "Menu.foreground",
+ menuText,
+ // "Menu.selectionForeground", textHighlightText,
+ // "Menu.selectionBackground", textHighlight,
+ // "Menu.disabledForeground", null,
+ // "Menu.acceleratorForeground", menuText,
+ // "Menu.acceleratorSelectionForeground", textHighlightText,
+ // "Menu.border", marginBorder,
+ // "Menu.borderPainted", Boolean.FALSE,
+ "Menu.margin",
+ twoInsets,
+ // "Menu.checkIcon", menuItemCheckIcon,
+ // "Menu.arrowIcon", menuArrowIcon,
+ // "Menu.menuPopupOffsetX", new Integer(0),
+ // "Menu.menuPopupOffsetY", new Integer(0),
+ // "Menu.submenuPopupOffsetX", new Integer(0),
+ // "Menu.submenuPopupOffsetY", new Integer(0),
+ // "Menu.shortcutKeys", new int[] {KeyEvent.ALT_MASK},
+ // "Menu.crossMenuMnemonic", Boolean.TRUE,
+ // Menu.cancelMode affects the cancel menu action behaviour;
+ // currently supports:
+ // "hideLastSubmenu" (default)
+ // hides the last open submenu,
+ // and move selection one step back
+ // "hideMenuTree"
+ // resets selection and
+ // hide the entire structure of open menu and its submenus
+ // "Menu.cancelMode", "hideLastSubmenu",
+
+ // Menu.preserveTopLevelSelection affects
+ // the cancel menu action behaviour
+ // if set to true then top level menu selection
+ // will be preserved when the last popup was cancelled;
+ // the menu itself will be unselect with the next cancel action
+ // "Menu.preserveTopLevelSelection", Boolean.FALSE,
+
+ // PopupMenu
+ // "PopupMenu.font", dialogPlain12,
+ "PopupMenu.background",
+ menu,
+ "PopupMenu.foreground",
+ menuText,
+ // "PopupMenu.border", popupMenuBorder,
+ // Internal Frame Auditory Cue Mappings
+ // "PopupMenu.popupSound", null,
+ // // These window InputMap bindings are used when the Menu is
+ // // selected.
+ // "PopupMenu.selectedWindowInputMapBindings", new Object[] {
+ // "ESCAPE", "cancel",
+ // "DOWN", "selectNext",
+ // "KP_DOWN", "selectNext",
+ // "UP", "selectPrevious",
+ // "KP_UP", "selectPrevious",
+ // "LEFT", "selectParent",
+ // "KP_LEFT", "selectParent",
+ // "RIGHT", "selectChild",
+ // "KP_RIGHT", "selectChild",
+ // "ENTER", "return",
+ // "ctrl ENTER", "return",
+ // "SPACE", "return"
+ // },
+ // "PopupMenu.selectedWindowInputMapBindings.RightToLeft", new Object[]
+ // {
+ // "LEFT", "selectChild",
+ // "KP_LEFT", "selectChild",
+ // "RIGHT", "selectParent",
+ // "KP_RIGHT", "selectParent",
+ // },
+ "PopupMenu.consumeEventOnClose",
+ Boolean.FALSE,
+
+ // *** OptionPane
+ // You can additionaly define OptionPane.messageFont which will
+ // dictate the fonts used for the message, and
+ // OptionPane.buttonFont, which defines the font for the buttons.
+ // "OptionPane.font", dialogPlain12,
+ // "OptionPane.background", control,
+ // "OptionPane.foreground", controlText,
+ "OptionPane.messageForeground",
+ controlText,
+ // "OptionPane.border", optionPaneBorder,
+ // "OptionPane.messageAreaBorder", zeroBorder,
+ // "OptionPane.buttonAreaBorder", optionPaneButtonAreaBorder,
+ // "OptionPane.minimumSize", optionPaneMinimumSize,
+ // "OptionPane.errorIcon", SwingUtilities2.makeIcon(getClass(),
+ // BasicLookAndFeel.class,
+ // "icons/Error.gif"),
+ // "OptionPane.informationIcon", SwingUtilities2.makeIcon(getClass(),
+ // BasicLookAndFeel.class,
+ // "icons/Inform.gif"),
+ // "OptionPane.warningIcon", SwingUtilities2.makeIcon(getClass(),
+ // BasicLookAndFeel.class,
+ // "icons/Warn.gif"),
+ // "OptionPane.questionIcon", SwingUtilities2.makeIcon(getClass(),
+ // BasicLookAndFeel.class,
+ // "icons/Question.gif"),
+ // "OptionPane.windowBindings", new Object[] {
+ // "ESCAPE", "close" },
+ // // OptionPane Auditory Cue Mappings
+ // "OptionPane.errorSound", null,
+ // "OptionPane.informationSound", null, // Info and Plain
+ // "OptionPane.questionSound", null,
+ // "OptionPane.warningSound", null,
+ // "OptionPane.buttonClickThreshhold", fiveHundred,
+
+ // *** Panel
+ "Panel.font",
+ dialogPlain12,
+ "Panel.background",
+ control,
+ "Panel.foreground",
+ textText,
+
+ // *** ProgressBar
+ // "ProgressBar.font", dialogPlain12,
+ // "ProgressBar.foreground", textHighlight,
+ // "ProgressBar.background", control,
+ // "ProgressBar.selectionForeground", control,
+ // "ProgressBar.selectionBackground", textHighlight,
+ // "ProgressBar.border", progressBarBorder,
+ "ProgressBar.cellLength",
+ new Integer(1),
+ "ProgressBar.cellSpacing",
+ zero,
+ "ProgressBar.repaintInterval",
+ new Integer(50),
+ "ProgressBar.cycleTime",
+ new Integer(3000),
+ "ProgressBar.horizontalSize",
+ new DimensionUIResource(146, 12),
+ "ProgressBar.verticalSize",
+ new DimensionUIResource(12, 146),
+
+ // *** Separator
+ // "Separator.shadow", controlShadow, // DEPRECATED - DO NOT USE!
+ // "Separator.highlight", controlLtHighlight, // DEPRECATED - DO NOT
+ // USE!
+ //
+ // "Separator.background", controlLtHighlight,
+ // "Separator.foreground", controlShadow,
+
+ // *** ScrollBar/ScrollPane/Viewport
+ // "ScrollBar.background", scrollBarTrack,
+ "ScrollBar.foreground",
+ control,
+ // "ScrollBar.track", table.get("scrollbar"),
+ // "ScrollBar.trackHighlight", controlDkShadow,
+ // "ScrollBar.thumb", control,
+ // "ScrollBar.thumbHighlight", controlLtHighlight,
+ // "ScrollBar.thumbDarkShadow", controlDkShadow,
+ // "ScrollBar.thumbShadow", controlShadow,
+ // "ScrollBar.border", null,
+ // "ScrollBar.minimumThumbSize", minimumThumbSize,
+ // "ScrollBar.maximumThumbSize", maximumThumbSize,
+ // "ScrollBar.ancestorInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "RIGHT", "positiveUnitIncrement",
+ // "KP_RIGHT", "positiveUnitIncrement",
+ // "DOWN", "positiveUnitIncrement",
+ // "KP_DOWN", "positiveUnitIncrement",
+ // "PAGE_DOWN", "positiveBlockIncrement",
+ // "LEFT", "negativeUnitIncrement",
+ // "KP_LEFT", "negativeUnitIncrement",
+ // "UP", "negativeUnitIncrement",
+ // "KP_UP", "negativeUnitIncrement",
+ // "PAGE_UP", "negativeBlockIncrement",
+ // "HOME", "minScroll",
+ // "END", "maxScroll"
+ // }),
+ // "ScrollBar.ancestorInputMap.RightToLeft",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "RIGHT", "negativeUnitIncrement",
+ // "KP_RIGHT", "negativeUnitIncrement",
+ // "LEFT", "positiveUnitIncrement",
+ // "KP_LEFT", "positiveUnitIncrement",
+ // }),
+ "ScrollBar.width",
+ new Integer(16),
+
+ // "ScrollPane.font", dialogPlain12,
+ // "ScrollPane.background", control,
+ // "ScrollPane.foreground", controlText,
+ // "ScrollPane.border", textFieldBorder,
+ // "ScrollPane.viewportBorder", null,
+ // "ScrollPane.ancestorInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "RIGHT", "unitScrollRight",
+ // "KP_RIGHT", "unitScrollRight",
+ // "DOWN", "unitScrollDown",
+ // "KP_DOWN", "unitScrollDown",
+ // "LEFT", "unitScrollLeft",
+ // "KP_LEFT", "unitScrollLeft",
+ // "UP", "unitScrollUp",
+ // "KP_UP", "unitScrollUp",
+ // "PAGE_UP", "scrollUp",
+ // "PAGE_DOWN", "scrollDown",
+ // "ctrl PAGE_UP", "scrollLeft",
+ // "ctrl PAGE_DOWN", "scrollRight",
+ // "ctrl HOME", "scrollHome",
+ // "ctrl END", "scrollEnd"
+ // }),
+ // "ScrollPane.ancestorInputMap.RightToLeft",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "ctrl PAGE_UP", "scrollRight",
+ // "ctrl PAGE_DOWN", "scrollLeft",
+ // }),
+ //
+ // "Viewport.font", dialogPlain12,
+ // "Viewport.background", control,
+ "Viewport.foreground",
+ textText,
+
+ // *** Slider
+ // "Slider.font", dialogPlain12,
+ // "Slider.foreground", control,
+ // "Slider.background", control,
+ // "Slider.highlight", controlLtHighlight,
+ // "Slider.tickColor", Color.black,
+ // "Slider.shadow", controlShadow,
+ // "Slider.focus", controlDkShadow,
+ // "Slider.border", null,
+ "Slider.horizontalSize",
+ new Dimension(200, 21),
+ "Slider.verticalSize",
+ new Dimension(21, 200),
+ "Slider.minimumHorizontalSize",
+ new Dimension(36, 21),
+ "Slider.minimumVerticalSize",
+ new Dimension(21, 36),
+ // "Slider.focusInsets", sliderFocusInsets,
+ // "Slider.focusInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "RIGHT", "positiveUnitIncrement",
+ // "KP_RIGHT", "positiveUnitIncrement",
+ // "DOWN", "negativeUnitIncrement",
+ // "KP_DOWN", "negativeUnitIncrement",
+ // "PAGE_DOWN", "negativeBlockIncrement",
+ // "LEFT", "negativeUnitIncrement",
+ // "KP_LEFT", "negativeUnitIncrement",
+ // "UP", "positiveUnitIncrement",
+ // "KP_UP", "positiveUnitIncrement",
+ // "PAGE_UP", "positiveBlockIncrement",
+ // "HOME", "minScroll",
+ // "END", "maxScroll"
+ // }),
+ // "Slider.focusInputMap.RightToLeft",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "RIGHT", "negativeUnitIncrement",
+ // "KP_RIGHT", "negativeUnitIncrement",
+ // "LEFT", "positiveUnitIncrement",
+ // "KP_LEFT", "positiveUnitIncrement",
+ // }),
+ //
+ // *** Spinner
+ "Spinner.font",
+ monospacedPlain12,
+ // "Spinner.background", control,
+ // "Spinner.foreground", control,
+ // "Spinner.border", textFieldBorder,
+ // "Spinner.arrowButtonBorder", null,
+ // "Spinner.arrowButtonInsets", null,
+ "Spinner.arrowButtonSize",
+ new Dimension(16, 5),
+ // "Spinner.ancestorInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "UP", "increment",
+ // "KP_UP", "increment",
+ // "DOWN", "decrement",
+ // "KP_DOWN", "decrement",
+ // }),
+ // "Spinner.editorBorderPainted", Boolean.FALSE,
+ "Spinner.editorAlignment",
+ JTextField.TRAILING,
+
+ // *** SplitPane
+ "SplitPane.background",
+ control,
+ // "SplitPane.highlight", controlLtHighlight,
+ // "SplitPane.shadow", controlShadow,
+ // "SplitPane.darkShadow", controlDkShadow,
+ // "SplitPane.border", splitPaneBorder,
+ "SplitPane.dividerSize",
+ new Integer(7),
+ // "SplitPaneDivider.border", splitPaneDividerBorder,
+ "SplitPaneDivider.draggingColor",
+ darkGray,
+ // "SplitPane.ancestorInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "UP", "negativeIncrement",
+ // "DOWN", "positiveIncrement",
+ // "LEFT", "negativeIncrement",
+ // "RIGHT", "positiveIncrement",
+ // "KP_UP", "negativeIncrement",
+ // "KP_DOWN", "positiveIncrement",
+ // "KP_LEFT", "negativeIncrement",
+ // "KP_RIGHT", "positiveIncrement",
+ // "HOME", "selectMin",
+ // "END", "selectMax",
+ // "F8", "startResize",
+ // "F6", "toggleFocus",
+ // "ctrl TAB", "focusOutForward",
+ // "ctrl shift TAB", "focusOutBackward"
+ // }),
+ //
+ // *** TabbedPane
+ // "TabbedPane.font", dialogPlain12,
+ // "TabbedPane.background", control,
+ // "TabbedPane.foreground", controlText,
+ // "TabbedPane.highlight", controlLtHighlight,
+ // "TabbedPane.light", controlHighlight,
+ // "TabbedPane.shadow", controlShadow,
+ // "TabbedPane.darkShadow", controlDkShadow,
+ "TabbedPane.selected",
+ null,
+ // "TabbedPane.focus", controlText,
+ "TabbedPane.textIconGap",
+ four,
+
+ // Causes tabs to be painted on top of the content area border.
+ // The amount of overlap is then controlled by tabAreaInsets.bottom,
+ // which is zero by default
+ "TabbedPane.tabsOverlapBorder",
+ Boolean.FALSE,
+ // "TabbedPane.selectionFollowsFocus", Boolean.TRUE,
+
+ "TabbedPane.labelShift",
+ 1,
+ "TabbedPane.selectedLabelShift",
+ -1,
+ "TabbedPane.tabInsets",
+ tabbedPaneTabInsets,
+ "TabbedPane.selectedTabPadInsets",
+ tabbedPaneTabPadInsets,
+ "TabbedPane.tabAreaInsets",
+ tabbedPaneTabAreaInsets,
+ "TabbedPane.contentBorderInsets",
+ tabbedPaneContentBorderInsets,
+ "TabbedPane.tabRunOverlay",
+ new Integer(2),
+ // "TabbedPane.tabsOpaque", Boolean.TRUE,
+ // "TabbedPane.contentOpaque", Boolean.TRUE,
+ // "TabbedPane.focusInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "RIGHT", "navigateRight",
+ // "KP_RIGHT", "navigateRight",
+ // "LEFT", "navigateLeft",
+ // "KP_LEFT", "navigateLeft",
+ // "UP", "navigateUp",
+ // "KP_UP", "navigateUp",
+ // "DOWN", "navigateDown",
+ // "KP_DOWN", "navigateDown",
+ // "ctrl DOWN", "requestFocusForVisibleComponent",
+ // "ctrl KP_DOWN", "requestFocusForVisibleComponent",
+ // }),
+ // "TabbedPane.ancestorInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "ctrl PAGE_DOWN", "navigatePageDown",
+ // "ctrl PAGE_UP", "navigatePageUp",
+ // "ctrl UP", "requestFocus",
+ // "ctrl KP_UP", "requestFocus",
+ // }),
+ //
+ //
+ // *** Table
+ // "Table.font", dialogPlain12,
+ // "Table.foreground", controlText, // cell text color
+ "Table.background",
+ window, // cell background color
+ // "Table.selectionForeground", textHighlightText,
+ // "Table.selectionBackground", textHighlight,
+ // "Table.dropLineColor", controlShadow,
+ "Table.dropLineShortColor",
+ black,
+ "Table.gridColor",
+ gray, // grid line color
+ "Table.focusCellBackground",
+ window,
+ "Table.focusCellForeground",
+ controlText,
+ // "Table.focusCellHighlightBorder", focusCellHighlightBorder,
+ // "Table.scrollPaneBorder", loweredBevelBorder,
+ // "Table.ancestorInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "ctrl C", "copy",
+ // "ctrl V", "paste",
+ // "ctrl X", "cut",
+ // "COPY", "copy",
+ // "PASTE", "paste",
+ // "CUT", "cut",
+ // "control INSERT", "copy",
+ // "shift INSERT", "paste",
+ // "shift DELETE", "cut",
+ // "RIGHT", "selectNextColumn",
+ // "KP_RIGHT", "selectNextColumn",
+ // "shift RIGHT", "selectNextColumnExtendSelection",
+ // "shift KP_RIGHT", "selectNextColumnExtendSelection",
+ // "ctrl shift RIGHT", "selectNextColumnExtendSelection",
+ // "ctrl shift KP_RIGHT", "selectNextColumnExtendSelection",
+ // "ctrl RIGHT", "selectNextColumnChangeLead",
+ // "ctrl KP_RIGHT", "selectNextColumnChangeLead",
+ // "LEFT", "selectPreviousColumn",
+ // "KP_LEFT", "selectPreviousColumn",
+ // "shift LEFT", "selectPreviousColumnExtendSelection",
+ // "shift KP_LEFT", "selectPreviousColumnExtendSelection",
+ // "ctrl shift LEFT", "selectPreviousColumnExtendSelection",
+ // "ctrl shift KP_LEFT", "selectPreviousColumnExtendSelection",
+ // "ctrl LEFT", "selectPreviousColumnChangeLead",
+ // "ctrl KP_LEFT", "selectPreviousColumnChangeLead",
+ // "DOWN", "selectNextRow",
+ // "KP_DOWN", "selectNextRow",
+ // "shift DOWN", "selectNextRowExtendSelection",
+ // "shift KP_DOWN", "selectNextRowExtendSelection",
+ // "ctrl shift DOWN", "selectNextRowExtendSelection",
+ // "ctrl shift KP_DOWN", "selectNextRowExtendSelection",
+ // "ctrl DOWN", "selectNextRowChangeLead",
+ // "ctrl KP_DOWN", "selectNextRowChangeLead",
+ // "UP", "selectPreviousRow",
+ // "KP_UP", "selectPreviousRow",
+ // "shift UP", "selectPreviousRowExtendSelection",
+ // "shift KP_UP", "selectPreviousRowExtendSelection",
+ // "ctrl shift UP", "selectPreviousRowExtendSelection",
+ // "ctrl shift KP_UP", "selectPreviousRowExtendSelection",
+ // "ctrl UP", "selectPreviousRowChangeLead",
+ // "ctrl KP_UP", "selectPreviousRowChangeLead",
+ // "HOME", "selectFirstColumn",
+ // "shift HOME", "selectFirstColumnExtendSelection",
+ // "ctrl shift HOME", "selectFirstRowExtendSelection",
+ // "ctrl HOME", "selectFirstRow",
+ // "END", "selectLastColumn",
+ // "shift END", "selectLastColumnExtendSelection",
+ // "ctrl shift END", "selectLastRowExtendSelection",
+ // "ctrl END", "selectLastRow",
+ // "PAGE_UP", "scrollUpChangeSelection",
+ // "shift PAGE_UP", "scrollUpExtendSelection",
+ // "ctrl shift PAGE_UP", "scrollLeftExtendSelection",
+ // "ctrl PAGE_UP", "scrollLeftChangeSelection",
+ // "PAGE_DOWN", "scrollDownChangeSelection",
+ // "shift PAGE_DOWN", "scrollDownExtendSelection",
+ // "ctrl shift PAGE_DOWN", "scrollRightExtendSelection",
+ // "ctrl PAGE_DOWN", "scrollRightChangeSelection",
+ // "TAB", "selectNextColumnCell",
+ // "shift TAB", "selectPreviousColumnCell",
+ // "ENTER", "selectNextRowCell",
+ // "shift ENTER", "selectPreviousRowCell",
+ // "ctrl A", "selectAll",
+ // "ctrl SLASH", "selectAll",
+ // "ctrl BACK_SLASH", "clearSelection",
+ // "ESCAPE", "cancel",
+ // "F2", "startEditing",
+ // "SPACE", "addToSelection",
+ // "ctrl SPACE", "toggleAndAnchor",
+ // "shift SPACE", "extendTo",
+ // "ctrl shift SPACE", "moveSelectionTo",
+ // "F8", "focusHeader"
+ // }),
+ // "Table.ancestorInputMap.RightToLeft",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "RIGHT", "selectPreviousColumn",
+ // "KP_RIGHT", "selectPreviousColumn",
+ // "shift RIGHT", "selectPreviousColumnExtendSelection",
+ // "shift KP_RIGHT", "selectPreviousColumnExtendSelection",
+ // "ctrl shift RIGHT", "selectPreviousColumnExtendSelection",
+ // "ctrl shift KP_RIGHT", "selectPreviousColumnExtendSelection",
+ // "ctrl RIGHT", "selectPreviousColumnChangeLead",
+ // "ctrl KP_RIGHT", "selectPreviousColumnChangeLead",
+ // "LEFT", "selectNextColumn",
+ // "KP_LEFT", "selectNextColumn",
+ // "shift LEFT", "selectNextColumnExtendSelection",
+ // "shift KP_LEFT", "selectNextColumnExtendSelection",
+ // "ctrl shift LEFT", "selectNextColumnExtendSelection",
+ // "ctrl shift KP_LEFT", "selectNextColumnExtendSelection",
+ // "ctrl LEFT", "selectNextColumnChangeLead",
+ // "ctrl KP_LEFT", "selectNextColumnChangeLead",
+ // "ctrl PAGE_UP", "scrollRightChangeSelection",
+ // "ctrl PAGE_DOWN", "scrollLeftChangeSelection",
+ // "ctrl shift PAGE_UP", "scrollRightExtendSelection",
+ // "ctrl shift PAGE_DOWN", "scrollLeftExtendSelection",
+ // }),
+ // "Table.ascendingSortIcon", new SwingLazyValue(
+ // "sun.swing.icon.SortArrowIcon",
+ // null, new Object[] { Boolean.TRUE,
+ // "Table.sortIconColor" }),
+ // "Table.descendingSortIcon", new SwingLazyValue(
+ // "sun.swing.icon.SortArrowIcon",
+ // null, new Object[] { Boolean.FALSE,
+ // "Table.sortIconColor" }),
+ // "Table.sortIconColor", controlShadow,
+ //
+ // "TableHeader.font", dialogPlain12,
+ // "TableHeader.foreground", controlText, // header text color
+ // "TableHeader.background", control, // header background
+ // "TableHeader.cellBorder", tableHeaderBorder,
+
+ // Support for changing the background/border of the currently
+ // selected header column when the header has the keyboard focus.
+ // "TableHeader.focusCellBackground", table.getColor("text"), // like
+ // text component bg
+ // "TableHeader.focusCellForeground", null,
+ // "TableHeader.focusCellBorder", null,
+ // "TableHeader.ancestorInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "SPACE", "toggleSortOrder",
+ // "LEFT", "selectColumnToLeft",
+ // "KP_LEFT", "selectColumnToLeft",
+ // "RIGHT", "selectColumnToRight",
+ // "KP_RIGHT", "selectColumnToRight",
+ // "alt LEFT", "moveColumnLeft",
+ // "alt KP_LEFT", "moveColumnLeft",
+ // "alt RIGHT", "moveColumnRight",
+ // "alt KP_RIGHT", "moveColumnRight",
+ // "alt shift LEFT", "resizeLeft",
+ // "alt shift KP_LEFT", "resizeLeft",
+ // "alt shift RIGHT", "resizeRight",
+ // "alt shift KP_RIGHT", "resizeRight",
+ // "ESCAPE", "focusTable",
+ // }),
+ //
+ // *** Text
+ "TextField.font",
+ sansSerifPlain12,
+ "TextField.background",
+ window,
+ "TextField.foreground",
+ textText,
+ // "TextField.shadow", controlShadow,
+ // "TextField.darkShadow", controlDkShadow,
+ // "TextField.light", controlHighlight,
+ // "TextField.highlight", controlLtHighlight,
+ // "TextField.inactiveForeground", textInactiveText,
+ // "TextField.inactiveBackground", control,
+ // "TextField.selectionBackground", textHighlight,
+ // "TextField.selectionForeground", textHighlightText,
+ // "TextField.caretForeground", textText,
+ // "TextField.caretBlinkRate", caretBlinkRate,
+ // "TextField.border", textFieldBorder,
+ "TextField.margin",
+ zeroInsets,
+
+ "FormattedTextField.font",
+ sansSerifPlain12,
+ "FormattedTextField.background",
+ window,
+ "FormattedTextField.foreground",
+ textText,
+ // "FormattedTextField.inactiveForeground", textInactiveText,
+ // "FormattedTextField.inactiveBackground", control,
+ // "FormattedTextField.selectionBackground", textHighlight,
+ // "FormattedTextField.selectionForeground", textHighlightText,
+ "FormattedTextField.caretForeground",
+ textText,
+ // "FormattedTextField.caretBlinkRate", caretBlinkRate,
+ // "FormattedTextField.border", textFieldBorder,
+ "FormattedTextField.margin",
+ zeroInsets,
+ // "FormattedTextField.focusInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "ctrl C", DefaultEditorKit.copyAction,
+ // "ctrl V", DefaultEditorKit.pasteAction,
+ // "ctrl X", DefaultEditorKit.cutAction,
+ // "COPY", DefaultEditorKit.copyAction,
+ // "PASTE", DefaultEditorKit.pasteAction,
+ // "CUT", DefaultEditorKit.cutAction,
+ // "control INSERT", DefaultEditorKit.copyAction,
+ // "shift INSERT", DefaultEditorKit.pasteAction,
+ // "shift DELETE", DefaultEditorKit.cutAction,
+ // "shift LEFT", DefaultEditorKit.selectionBackwardAction,
+ // "shift KP_LEFT", DefaultEditorKit.selectionBackwardAction,
+ // "shift RIGHT", DefaultEditorKit.selectionForwardAction,
+ // "shift KP_RIGHT", DefaultEditorKit.selectionForwardAction,
+ // "ctrl LEFT", DefaultEditorKit.previousWordAction,
+ // "ctrl KP_LEFT", DefaultEditorKit.previousWordAction,
+ // "ctrl RIGHT", DefaultEditorKit.nextWordAction,
+ // "ctrl KP_RIGHT", DefaultEditorKit.nextWordAction,
+ // "ctrl shift LEFT", DefaultEditorKit.selectionPreviousWordAction,
+ // "ctrl shift KP_LEFT", DefaultEditorKit.selectionPreviousWordAction,
+ // "ctrl shift RIGHT", DefaultEditorKit.selectionNextWordAction,
+ // "ctrl shift KP_RIGHT", DefaultEditorKit.selectionNextWordAction,
+ // "ctrl A", DefaultEditorKit.selectAllAction,
+ // "HOME", DefaultEditorKit.beginLineAction,
+ // "END", DefaultEditorKit.endLineAction,
+ // "shift HOME", DefaultEditorKit.selectionBeginLineAction,
+ // "shift END", DefaultEditorKit.selectionEndLineAction,
+ // "BACK_SPACE", DefaultEditorKit.deletePrevCharAction,
+ // "shift BACK_SPACE", DefaultEditorKit.deletePrevCharAction,
+ // "ctrl H", DefaultEditorKit.deletePrevCharAction,
+ // "DELETE", DefaultEditorKit.deleteNextCharAction,
+ // "ctrl DELETE", DefaultEditorKit.deleteNextWordAction,
+ // "ctrl BACK_SPACE", DefaultEditorKit.deletePrevWordAction,
+ // "RIGHT", DefaultEditorKit.forwardAction,
+ // "LEFT", DefaultEditorKit.backwardAction,
+ // "KP_RIGHT", DefaultEditorKit.forwardAction,
+ // "KP_LEFT", DefaultEditorKit.backwardAction,
+ // "ENTER", JTextField.notifyAction,
+ // "ctrl BACK_SLASH", "unselect",
+ // "control shift O", "toggle-componentOrientation",
+ // "ESCAPE", "reset-field-edit",
+ // "UP", "increment",
+ // "KP_UP", "increment",
+ // "DOWN", "decrement",
+ // "KP_DOWN", "decrement",
+ // }),
+ //
+ "PasswordField.font",
+ monospacedPlain12,
+ "PasswordField.background",
+ window,
+ "PasswordField.foreground",
+ textText,
+ // "PasswordField.inactiveForeground", textInactiveText,
+ // "PasswordField.inactiveBackground", control,
+ // "PasswordField.selectionBackground", textHighlight,
+ // "PasswordField.selectionForeground", textHighlightText,
+ // "PasswordField.caretForeground", textText,
+ // "PasswordField.caretBlinkRate", caretBlinkRate,
+ // "PasswordField.border", textFieldBorder,
+ "PasswordField.margin",
+ zeroInsets,
+ "PasswordField.echoChar",
+ '*',
+
+ "TextArea.font",
+ monospacedPlain12,
+ "TextArea.background",
+ window,
+ "TextArea.foreground",
+ textText,
+ // "TextArea.inactiveForeground", textInactiveText,
+ // "TextArea.selectionBackground", textHighlight,
+ // "TextArea.selectionForeground", textHighlightText,
+ // "TextArea.caretForeground", textText,
+ // "TextArea.caretBlinkRate", caretBlinkRate,
+ // "TextArea.border", marginBorder,
+ "TextArea.margin",
+ zeroInsets,
+
+ "TextPane.font",
+ serifPlain12,
+ "TextPane.background",
+ white,
+ "TextPane.foreground",
+ textText,
+ // "TextPane.selectionBackground", textHighlight,
+ // "TextPane.selectionForeground", textHighlightText,
+ // "TextPane.caretForeground", textText,
+ // "TextPane.caretBlinkRate", caretBlinkRate,
+ // "TextPane.inactiveForeground", textInactiveText,
+ // "TextPane.border", marginBorder,
+ "TextPane.margin",
+ editorMargin,
+
+ "EditorPane.font",
+ serifPlain12,
+ "EditorPane.background",
+ white,
+ "EditorPane.foreground",
+ textText,
+ // "EditorPane.selectionBackground", textHighlight,
+ // "EditorPane.selectionForeground", textHighlightText,
+ // "EditorPane.caretForeground", textText,
+ // "EditorPane.caretBlinkRate", caretBlinkRate,
+ // "EditorPane.inactiveForeground", textInactiveText,
+ // "EditorPane.border", marginBorder,
+ "EditorPane.margin",
+ editorMargin,
+ //
+ // "html.pendingImage", SwingUtilities2.makeIcon(getClass(),
+ // BasicLookAndFeel.class,
+ // "icons/image-delayed.png"),
+ // "html.missingImage", SwingUtilities2.makeIcon(getClass(),
+ // BasicLookAndFeel.class,
+ // "icons/image-failed.png"),
+ // *** TitledBorder
+ // "TitledBorder.font", dialogPlain12,
+ "TitledBorder.titleColor",
+ controlText,
+ // "TitledBorder.border", etchedBorder,
+
+ // *** ToolBar
+ // "ToolBar.font", dialogPlain12,
+ // "ToolBar.background", control,
+ // "ToolBar.foreground", controlText,
+ // "ToolBar.shadow", controlShadow,
+ // "ToolBar.darkShadow", controlDkShadow,
+ // "ToolBar.light", controlHighlight,
+ // "ToolBar.highlight", controlLtHighlight,
+ // "ToolBar.dockingBackground", control,
+ // "ToolBar.dockingForeground", red,
+ // "ToolBar.floatingBackground", control,
+ // "ToolBar.floatingForeground", darkGray,
+ // "ToolBar.border", etchedBorder,
+ // "ToolBar.separatorSize", toolBarSeparatorSize,
+ // "ToolBar.ancestorInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "UP", "navigateUp",
+ // "KP_UP", "navigateUp",
+ // "DOWN", "navigateDown",
+ // "KP_DOWN", "navigateDown",
+ // "LEFT", "navigateLeft",
+ // "KP_LEFT", "navigateLeft",
+ // "RIGHT", "navigateRight",
+ // "KP_RIGHT", "navigateRight"
+ // }),
+
+ // *** ToolTips
+ // "ToolTip.font", sansSerifPlain12,
+ // "ToolTip.background", table.get("info"),
+ // "ToolTip.foreground", table.get("infoText"),
+ // "ToolTip.border", blackLineBorder,
+ // ToolTips also support backgroundInactive, borderInactive,
+ // and foregroundInactive
+
+ // *** ToolTipManager
+ // ToolTipManager.enableToolTipMode currently supports:
+ // "allWindows" (default):
+ // enables tool tips for all windows of all java applications,
+ // whether the windows are active or inactive
+ // "activeApplication"
+ // enables tool tips for windows of an application only when
+ // the application has an active window
+ // "ToolTipManager.enableToolTipMode", "allWindows",
+
+ // *** Tree
+ "Tree.paintLines",
+ Boolean.TRUE,
+ "Tree.lineTypeDashed",
+ Boolean.FALSE,
+ // "Tree.font", dialogPlain12,
+ "Tree.background",
+ window,
+ "Tree.foreground",
+ textText,
+ "Tree.hash",
+ gray,
+ "Tree.textForeground",
+ textText,
+ "Tree.textBackground",
+ table.get("text"),
+ // "Tree.selectionForeground", textHighlightText,
+ // "Tree.selectionBackground", textHighlight,
+ // "Tree.selectionBorderColor", black,
+ // "Tree.dropLineColor", controlShadow,
+ // "Tree.editorBorder", blackLineBorder,
+ "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent",
+ new Integer(13), "Tree.rowHeight", new Integer(16),
+ "Tree.scrollsOnExpand", Boolean.TRUE,
+ // "Tree.openIcon", SwingUtilities2.makeIcon(getClass(),
+ // BasicLookAndFeel.class,
+ // "icons/TreeOpen.gif"),
+ // "Tree.closedIcon", SwingUtilities2.makeIcon(getClass(),
+ // BasicLookAndFeel.class,
+ // "icons/TreeClosed.gif"),
+ // "Tree.leafIcon", SwingUtilities2.makeIcon(getClass(),
+ // BasicLookAndFeel.class,
+ // "icons/TreeLeaf.gif"),
+ // "Tree.expandedIcon", null,
+ // "Tree.collapsedIcon", null,
+ // "Tree.changeSelectionWithFocus", Boolean.TRUE,
+ // "Tree.drawsFocusBorderAroundIcon", Boolean.FALSE,
+ "Tree.timeFactor", oneThousand,
+ // "Tree.focusInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "ctrl C", "copy",
+ // "ctrl V", "paste",
+ // "ctrl X", "cut",
+ // "COPY", "copy",
+ // "PASTE", "paste",
+ // "CUT", "cut",
+ // "control INSERT", "copy",
+ // "shift INSERT", "paste",
+ // "shift DELETE", "cut",
+ // "UP", "selectPrevious",
+ // "KP_UP", "selectPrevious",
+ // "shift UP", "selectPreviousExtendSelection",
+ // "shift KP_UP", "selectPreviousExtendSelection",
+ // "ctrl shift UP", "selectPreviousExtendSelection",
+ // "ctrl shift KP_UP", "selectPreviousExtendSelection",
+ // "ctrl UP", "selectPreviousChangeLead",
+ // "ctrl KP_UP", "selectPreviousChangeLead",
+ // "DOWN", "selectNext",
+ // "KP_DOWN", "selectNext",
+ // "shift DOWN", "selectNextExtendSelection",
+ // "shift KP_DOWN", "selectNextExtendSelection",
+ // "ctrl shift DOWN", "selectNextExtendSelection",
+ // "ctrl shift KP_DOWN", "selectNextExtendSelection",
+ // "ctrl DOWN", "selectNextChangeLead",
+ // "ctrl KP_DOWN", "selectNextChangeLead",
+ // "RIGHT", "selectChild",
+ // "KP_RIGHT", "selectChild",
+ // "LEFT", "selectParent",
+ // "KP_LEFT", "selectParent",
+ // "PAGE_UP", "scrollUpChangeSelection",
+ // "shift PAGE_UP", "scrollUpExtendSelection",
+ // "ctrl shift PAGE_UP", "scrollUpExtendSelection",
+ // "ctrl PAGE_UP", "scrollUpChangeLead",
+ // "PAGE_DOWN", "scrollDownChangeSelection",
+ // "shift PAGE_DOWN", "scrollDownExtendSelection",
+ // "ctrl shift PAGE_DOWN", "scrollDownExtendSelection",
+ // "ctrl PAGE_DOWN", "scrollDownChangeLead",
+ // "HOME", "selectFirst",
+ // "shift HOME", "selectFirstExtendSelection",
+ // "ctrl shift HOME", "selectFirstExtendSelection",
+ // "ctrl HOME", "selectFirstChangeLead",
+ // "END", "selectLast",
+ // "shift END", "selectLastExtendSelection",
+ // "ctrl shift END", "selectLastExtendSelection",
+ // "ctrl END", "selectLastChangeLead",
+ // "F2", "startEditing",
+ // "ctrl A", "selectAll",
+ // "ctrl SLASH", "selectAll",
+ // "ctrl BACK_SLASH", "clearSelection",
+ // "ctrl LEFT", "scrollLeft",
+ // "ctrl KP_LEFT", "scrollLeft",
+ // "ctrl RIGHT", "scrollRight",
+ // "ctrl KP_RIGHT", "scrollRight",
+ // "SPACE", "addToSelection",
+ // "ctrl SPACE", "toggleAndAnchor",
+ // "shift SPACE", "extendTo",
+ // "ctrl shift SPACE", "moveSelectionTo"
+ // }),
+ // "Tree.focusInputMap.RightToLeft",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "RIGHT", "selectParent",
+ // "KP_RIGHT", "selectParent",
+ // "LEFT", "selectChild",
+ // "KP_LEFT", "selectChild",
+ // }),
+ // "Tree.ancestorInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "ESCAPE", "cancel"
+ // }),
+ // // Bind specific keys that can invoke popup on currently
+ // // focused JComponent
+ // "RootPane.ancestorInputMap",
+ // new UIDefaults.LazyInputMap(new Object[] {
+ // "shift F10", "postPopup",
+ // "CONTEXT_MENU", "postPopup"
+ // }),
+ //
+ // // These bindings are only enabled when there is a default
+ // // button set on the rootpane.
+ // "RootPane.defaultButtonWindowKeyBindings", new Object[] {
+ // "ENTER", "press",
+ // "released ENTER", "release",
+ // "ctrl ENTER", "press",
+ // "ctrl released ENTER", "release"
+ // },
+ };
+
+ table.putDefaults(defaults);
+ }
+
+ // /**
+ // * Returns the ui that is of type <code>klass</code>, or null if
+ // * one can not be found.
+ // */
+ // static Object getUIOfType(ComponentUI ui, Class klass) {
+ // if (klass.isInstance(ui)) {
+ // return ui;
+ // }
+ // return null;
+ // }
+ //
+ // // ********* Auditory Cue support methods and objects *********
+ // // also see the "AuditoryCues" section of the defaults table
+ //
+ // /**
+ // * Returns an <code>ActionMap</code> containing the audio actions
+ // * for this look and feel.
+ // * <P>
+ // * The returned <code>ActionMap</code> contains <code>Actions</code> that
+ // * embody the ability to render an auditory cue. These auditory
+ // * cues map onto user and system activities that may be useful
+ // * for an end user to know about (such as a dialog box appearing).
+ // * <P>
+ // * At the appropriate time,
+ // * the {@code ComponentUI} is responsible for obtaining an
+ // * <code>Action</code> out of the <code>ActionMap</code> and passing
+ // * it to <code>playSound</code>.
+ // * <P>
+ // * This method first looks up the {@code ActionMap} from the
+ // * defaults using the key {@code "AuditoryCues.actionMap"}.
+ // * <p>
+ // * If the value is {@code non-null}, it is returned. If the value
+ // * of the default {@code "AuditoryCues.actionMap"} is {@code null}
+ // * and the value of the default {@code "AuditoryCues.cueList"} is
+ // * {@code non-null}, an {@code ActionMapUIResource} is created and
+ // * populated. Population is done by iterating over each of the
+ // * elements of the {@code "AuditoryCues.cueList"} array, and
+ // * invoking {@code createAudioAction()} to create an {@code
+ // * Action} for each element. The resulting {@code Action} is
+ // * placed in the {@code ActionMapUIResource}, using the array
+ // * element as the key. For example, if the {@code
+ // * "AuditoryCues.cueList"} array contains a single-element, {@code
+ // * "audioKey"}, the {@code ActionMapUIResource} is created, then
+ // * populated by way of {@code actionMap.put(cueList[0],
+ // * createAudioAction(cueList[0]))}.
+ // * <p>
+ // * If the value of the default {@code "AuditoryCues.actionMap"} is
+ // * {@code null} and the value of the default
+ // * {@code "AuditoryCues.cueList"} is {@code null}, an empty
+ // * {@code ActionMapUIResource} is created.
+ // *
+ // *
+ // * @return an ActionMap containing {@code Actions}
+ // * responsible for playing auditory cues
+ // * @throws ClassCastException if the value of the
+ // * default {@code "AuditoryCues.actionMap"} is not an
+ // * {@code ActionMap}, or the value of the default
+ // * {@code "AuditoryCues.cueList"} is not an {@code Object[]}
+ // * @see #createAudioAction
+ // * @see #playSound(Action)
+ // * @since 1.4
+ // */
+ // protected ActionMap getAudioActionMap() {
+ // ActionMap audioActionMap = (ActionMap)UIManager.get(
+ // "AuditoryCues.actionMap");
+ // if (audioActionMap == null) {
+ // Object[] acList = (Object[])UIManager.get("AuditoryCues.cueList");
+ // if (acList != null) {
+ // audioActionMap = new ActionMapUIResource();
+ // for(int counter = acList.length-1; counter >= 0; counter--) {
+ // audioActionMap.put(acList[counter],
+ // createAudioAction(acList[counter]));
+ // }
+ // }
+ // UIManager.getLookAndFeelDefaults().put("AuditoryCues.actionMap",
+ // audioActionMap);
+ // }
+ // return audioActionMap;
+ // }
+ //
+ // /**
+ // * Creates and returns an {@code Action} used to play a sound.
+ // * <p>
+ // * If {@code key} is {@code non-null}, an {@code Action} is created
+ // * using the value from the defaults with key {@code key}. The value
+ // * identifies the sound resource to load when
+ // * {@code actionPerformed} is invoked on the {@code Action}. The
+ // * sound resource is loaded into a {@code byte[]} by way of
+ // * {@code getClass().getResourceAsStream()}.
+ // *
+ // * @param key the key identifying the audio action
+ // * @return an {@code Action} used to play the source, or {@code null}
+ // * if {@code key} is {@code null}
+ // * @see #playSound(Action)
+ // * @since 1.4
+ // */
+ // protected Action createAudioAction(Object key) {
+ // if (key != null) {
+ // String audioKey = (String)key;
+ // String audioValue = (String)UIManager.get(key);
+ // return new AudioAction(audioKey, audioValue);
+ // } else {
+ // return null;
+ // }
+ // }
+ //
+ // /**
+ // * Pass the name String to the super constructor. This is used
+ // * later to identify the Action and decide whether to play it or
+ // * not. Store the resource String. I is used to get the audio
+ // * resource. In this case, the resource is an audio file.
+ // *
+ // * @since 1.4
+ // */
+ // private class AudioAction extends AbstractAction implements LineListener {
+ // // We strive to only play one sound at a time (other platforms
+ // // appear to do this). This is done by maintaining the field
+ // // clipPlaying. Every time a sound is to be played,
+ // // cancelCurrentSound is invoked to cancel any sound that may be
+ // // playing.
+ // private String audioResource;
+ // private byte[] audioBuffer;
+ //
+ // /**
+ // * The String is the name of the Action and
+ // * points to the audio resource.
+ // * The byte[] is a buffer of the audio bits.
+ // */
+ // public AudioAction(String name, String resource) {
+ // super(name);
+ // audioResource = resource;
+ // }
+ //
+ // public void actionPerformed(ActionEvent e) {
+ // if (audioBuffer == null) {
+ // audioBuffer = loadAudioData(audioResource);
+ // }
+ // if (audioBuffer != null) {
+ // cancelCurrentSound(null);
+ // try {
+ // AudioInputStream soundStream =
+ // AudioSystem.getAudioInputStream(
+ // new ByteArrayInputStream(audioBuffer));
+ // DataLine.Info info =
+ // new DataLine.Info(Clip.class, soundStream.getFormat());
+ // Clip clip = (Clip) AudioSystem.getLine(info);
+ // clip.open(soundStream);
+ // clip.addLineListener(this);
+ //
+ // synchronized(audioLock) {
+ // clipPlaying = clip;
+ // }
+ //
+ // clip.start();
+ // } catch (Exception ex) {}
+ // }
+ // }
+ //
+ // public void update(LineEvent event) {
+ // if (event.getType() == LineEvent.Type.STOP) {
+ // cancelCurrentSound((Clip)event.getLine());
+ // }
+ // }
+ //
+ // /**
+ // * If the parameter is null, or equal to the currently
+ // * playing sound, then cancel the currently playing sound.
+ // */
+ // private void cancelCurrentSound(Clip clip) {
+ // Clip lastClip = null;
+ //
+ // synchronized(audioLock) {
+ // if (clip == null || clip == clipPlaying) {
+ // lastClip = clipPlaying;
+ // clipPlaying = null;
+ // }
+ // }
+ //
+ // if (lastClip != null) {
+ // lastClip.removeLineListener(this);
+ // lastClip.close();
+ // }
+ // }
+ // }
+ //
+ // /**
+ // * Utility method that loads audio bits for the specified
+ // * <code>soundFile</code> filename. If this method is unable to
+ // * build a viable path name from the <code>baseClass</code> and
+ // * <code>soundFile</code> passed into this method, it will
+ // * return <code>null</code>.
+ // *
+ // * @param baseClass used as the root class/location to get the
+ // * soundFile from
+ // * @param soundFile the name of the audio file to be retrieved
+ // * from disk
+ // * @return A byte[] with audio data or null
+ // * @since 1.4
+ // */
+ // private byte[] loadAudioData(final String soundFile){
+ // if (soundFile == null) {
+ // return null;
+ // }
+ // /* Copy resource into a byte array. This is
+ // * necessary because several browsers consider
+ // * Class.getResource a security risk since it
+ // * can be used to load additional classes.
+ // * Class.getResourceAsStream just returns raw
+ // * bytes, which we can convert to a sound.
+ // */
+ // byte[] buffer = (byte[])AccessController.doPrivileged(
+ // new PrivilegedAction() {
+ // public Object run() {
+ // try {
+ // InputStream resource = BasicLookAndFeel.this.
+ // getClass().getResourceAsStream(soundFile);
+ // if (resource == null) {
+ // return null;
+ // }
+ // BufferedInputStream in =
+ // new BufferedInputStream(resource);
+ // ByteArrayOutputStream out =
+ // new ByteArrayOutputStream(1024);
+ // byte[] buffer = new byte[1024];
+ // int n;
+ // while ((n = in.read(buffer)) > 0) {
+ // out.write(buffer, 0, n);
+ // }
+ // in.close();
+ // out.flush();
+ // buffer = out.toByteArray();
+ // return buffer;
+ // } catch (IOException ioe) {
+ // System.err.println(ioe.toString());
+ // return null;
+ // }
+ // }
+ // });
+ // if (buffer == null) {
+ // System.err.println(getClass().getName() + "/" +
+ // soundFile + " not found.");
+ // return null;
+ // }
+ // if (buffer.length == 0) {
+ // System.err.println("warning: " + soundFile +
+ // " is zero-length");
+ // return null;
+ // }
+ // return buffer;
+ // }
+ //
+ // /**
+ // * If necessary, invokes {@code actionPerformed} on
+ // * {@code audioAction} to play a sound.
+ // * The {@code actionPerformed} method is invoked if the value of
+ // * the {@code "AuditoryCues.playList"} default is a {@code
+ // * non-null} {@code Object[]} containing a {@code String} entry
+ // * equal to the name of the {@code audioAction}.
+ // *
+ // * @param audioAction an Action that knows how to render the audio
+ // * associated with the system or user activity
+ // * that is occurring; a value of {@code null}, is
+ // * ignored
+ // * @throws ClassCastException if {@code audioAction} is {@code non-null}
+ // * and the value of the default {@code "AuditoryCues.playList"}
+ // * is not an {@code Object[]}
+ // * @since 1.4
+ // */
+ // protected void playSound(Action audioAction) {
+ // if (audioAction != null) {
+ // Object[] audioStrings = (Object[])
+ // UIManager.get("AuditoryCues.playList");
+ // if (audioStrings != null) {
+ // // create a HashSet to help us decide to play or not
+ // HashSet audioCues = new HashSet();
+ // for (int i = 0; i < audioStrings.length; i++) {
+ // audioCues.add(audioStrings[i]);
+ // }
+ // // get the name of the Action
+ // String actionName = (String)audioAction.getValue(Action.NAME);
+ // // if the actionName is in the audioCues HashSet, play it.
+ // if (audioCues.contains(actionName)) {
+ // audioAction.actionPerformed(new
+ // ActionEvent(this, ActionEvent.ACTION_PERFORMED,
+ // actionName));
+ // }
+ // }
+ // }
+ // }
+ //
+ //
+ // /**
+ // * Sets the parent of the passed in ActionMap to be the audio action
+ // * map.
+ // */
+ // static void installAudioActionMap(ActionMap map) {
+ // LookAndFeel laf = UIManager.getLookAndFeel();
+ // if (laf instanceof BasicLookAndFeel) {
+ // map.setParent(((BasicLookAndFeel)laf).getAudioActionMap());
+ // }
+ // }
+ //
+ //
+ // /**
+ // * Helper method to play a named sound.
+ // *
+ // * @param c JComponent to play the sound for.
+ // * @param actionKey Key for the sound.
+ // */
+ // static void playSound(JComponent c, Object actionKey) {
+ // LookAndFeel laf = UIManager.getLookAndFeel();
+ // if (laf instanceof BasicLookAndFeel) {
+ // ActionMap map = c.getActionMap();
+ // if (map != null) {
+ // Action audioAction = map.get(actionKey);
+ // if (audioAction != null) {
+ // // pass off firing the Action to a utility method
+ // ((BasicLookAndFeel)laf).playSound(audioAction);
+ // }
+ // }
+ // }
+ // }
+ //
+ // /**
+ // * This class contains listener that watches for all the mouse
+ // * events that can possibly invoke popup on the component
+ // */
+ // class AWTEventHelper implements AWTEventListener,PrivilegedAction {
+ // AWTEventHelper() {
+ // super();
+ // AccessController.doPrivileged(this);
+ // }
+ //
+ // public Object run() {
+ // Toolkit tk = Toolkit.getDefaultToolkit();
+ // if(invocator == null) {
+ // tk.addAWTEventListener(this, AWTEvent.MOUSE_EVENT_MASK);
+ // } else {
+ // tk.removeAWTEventListener(invocator);
+ // }
+ // // Return value not used.
+ // return null;
+ // }
+ //
+ // public void eventDispatched(AWTEvent ev) {
+ // int eventID = ev.getID();
+ // if((eventID & AWTEvent.MOUSE_EVENT_MASK) != 0) {
+ // MouseEvent me = (MouseEvent) ev;
+ // if(me.isPopupTrigger()) {
+ // MenuElement[] elems = MenuSelectionManager
+ // .defaultManager()
+ // .getSelectedPath();
+ // if(elems != null && elems.length != 0) {
+ // return;
+ // // We shall not interfere with already opened menu
+ // }
+ // Object c = me.getSource();
+ // JComponent src = null;
+ // if(c instanceof JComponent) {
+ // src = (JComponent) c;
+ // } else if(c instanceof BasicSplitPaneDivider) {
+ // // Special case - if user clicks on divider we must
+ // // invoke popup from the SplitPane
+ // src = (JComponent)
+ // ((BasicSplitPaneDivider)c).getParent();
+ // }
+ // if(src != null) {
+ // if(src.getComponentPopupMenu() != null) {
+ // Point pt = src.getPopupLocation(me);
+ // if(pt == null) {
+ // pt = me.getPoint();
+ // pt = SwingUtilities.convertPoint((Component)c,
+ // pt, src);
+ // }
+ // src.getComponentPopupMenu().show(src, pt.x, pt.y);
+ // me.consume();
+ // }
+ // }
+ // }
+ // }
+ // /* Activate a JInternalFrame if necessary. */
+ // if (eventID == MouseEvent.MOUSE_PRESSED) {
+ // Object object = ev.getSource();
+ // if (!(object instanceof Component)) {
+ // return;
+ // }
+ // Component component = (Component)object;
+ // if (component != null) {
+ // Component parent = component;
+ // while (parent != null && !(parent instanceof Window)) {
+ // if (parent instanceof JInternalFrame) {
+ // // Activate the frame.
+ // try { ((JInternalFrame)parent).setSelected(true); }
+ // catch (PropertyVetoException e1) { }
+ // }
+ // parent = parent.getParent();
+ // }
+ // }
+ // }
+ // }
+ // }
+ //
+ @Override
+ public String getName() {
+ return "SwingJS";
+ }
+
+ @Override
+ public String getID() {
+ return "SwingJS";
+ }
+
+ @Override
+ public String getDescription() {
+ return "SwingJS L&F";
+ }
+
+ @Override
+ public boolean isNativeLookAndFeel() {
+ return true;
+ }
+
+ @Override
+ public boolean isSupportedLookAndFeel() {
+ return true;
+ }
+}