Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/macosx/classes/com/apple/laf/AquaLookAndFeel.java
38831 views
/*1* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package com.apple.laf;2627import java.awt.*;28import java.security.PrivilegedAction;29import java.util.*;3031import javax.swing.*;32import javax.swing.border.Border;33import javax.swing.plaf.*;34import javax.swing.plaf.basic.BasicLookAndFeel;3536import sun.swing.*;37import apple.laf.*;3839public class AquaLookAndFeel extends BasicLookAndFeel {40static final String sOldPropertyPrefix = "com.apple.macos."; // old prefix for things like 'useScreenMenuBar'41static final String sPropertyPrefix = "apple.laf."; // new prefix for things like 'useScreenMenuBar'4243// for lazy initalizers. Following the pattern from metal.44private static final String PKG_PREFIX = "com.apple.laf.";45private static final String kAquaImageFactoryName = PKG_PREFIX + "AquaImageFactory";46private static final String kAquaFontsName = PKG_PREFIX + "AquaFonts";4748/**49* Return a short string that identifies this look and feel, e.g.50* "CDE/Motif". This string should be appropriate for a menu item.51* Distinct look and feels should have different names, e.g.52* a subclass of MotifLookAndFeel that changes the way a few components53* are rendered should be called "CDE/Motif My Way"; something54* that would be useful to a user trying to select a L&F from a list55* of names.56*/57public String getName() {58return "Mac OS X";59}6061/**62* Return a string that identifies this look and feel. This string63* will be used by applications/services that want to recognize64* well known look and feel implementations. Presently65* the well known names are "Motif", "Windows", "Mac", "Metal". Note66* that a LookAndFeel derived from a well known superclass67* that doesn't make any fundamental changes to the look or feel68* shouldn't override this method.69*/70public String getID() {71return "Aqua";72}7374/**75* Return a one line description of this look and feel implementation,76* e.g. "The CDE/Motif Look and Feel". This string is intended for77* the user, e.g. in the title of a window or in a ToolTip message.78*/79public String getDescription() {80return "Aqua Look and Feel for Mac OS X";81}8283/**84* Returns true if the <code>LookAndFeel</code> returned85* <code>RootPaneUI</code> instances support providing Window decorations86* in a <code>JRootPane</code>.87* <p>88* The default implementation returns false, subclasses that support89* Window decorations should override this and return true.90*91* @return True if the RootPaneUI instances created support client side92* decorations93* @see JDialog#setDefaultLookAndFeelDecorated94* @see JFrame#setDefaultLookAndFeelDecorated95* @see JRootPane#setWindowDecorationStyle96* @since 1.497*/98public boolean getSupportsWindowDecorations() {99return false;100}101102/**103* If the underlying platform has a "native" look and feel, and this104* is an implementation of it, return true.105*/106public boolean isNativeLookAndFeel() {107return true;108}109110/**111* Return true if the underlying platform supports and or permits112* this look and feel. This method returns false if the look113* and feel depends on special resources or legal agreements that114* aren't defined for the current platform.115*116* @see UIManager#setLookAndFeel117*/118public boolean isSupportedLookAndFeel() {119return true;120}121122/**123* UIManager.setLookAndFeel calls this method before the first124* call (and typically the only call) to getDefaults(). Subclasses125* should do any one-time setup they need here, rather than126* in a static initializer, because look and feel class objects127* may be loaded just to discover that isSupportedLookAndFeel()128* returns false.129*130* @see #uninitialize131* @see UIManager#setLookAndFeel132*/133public void initialize() {134java.security.AccessController.doPrivileged(new PrivilegedAction<Void>() {135public Void run() {136System.loadLibrary("osxui");137return null;138}139});140141java.security.AccessController.doPrivileged(new PrivilegedAction<Void>(){142@Override143public Void run() {144JRSUIControl.initJRSUI();145return null;146}147});148149super.initialize();150final ScreenPopupFactory spf = new ScreenPopupFactory();151spf.setActive(true);152PopupFactory.setSharedInstance(spf);153154KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventPostProcessor(AquaMnemonicHandler.getInstance());155}156157/**158* UIManager.setLookAndFeel calls this method just before we're159* replaced by a new default look and feel. Subclasses may160* choose to free up some resources here.161*162* @see #initialize163*/164public void uninitialize() {165KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventPostProcessor(AquaMnemonicHandler.getInstance());166167final PopupFactory popupFactory = PopupFactory.getSharedInstance();168if (popupFactory != null && popupFactory instanceof ScreenPopupFactory) {169((ScreenPopupFactory)popupFactory).setActive(false);170}171172super.uninitialize();173}174175/**176* Returns an <code>ActionMap</code>.177* <P>178* This <code>ActionMap</code> contains <code>Actions</code> that179* embody the ability to render an auditory cue. These auditory180* cues map onto user and system activities that may be useful181* for an end user to know about (such as a dialog box appearing).182* <P>183* At the appropriate time in a <code>JComponent</code> UI's lifecycle,184* the ComponentUI is responsible for getting the appropriate185* <code>Action</code> out of the <code>ActionMap</code> and passing186* it on to <code>playSound</code>.187* <P>188* The <code>Actions</code> in this <code>ActionMap</code> are189* created by the <code>createAudioAction</code> method.190*191* @return an ActionMap containing Actions192* responsible for rendering auditory cues193* @see #createAudioAction194* @see #playSound(Action)195* @since 1.4196*/197protected ActionMap getAudioActionMap() {198ActionMap audioActionMap = (ActionMap)UIManager.get("AuditoryCues.actionMap");199if (audioActionMap != null) return audioActionMap;200201final Object[] acList = (Object[])UIManager.get("AuditoryCues.cueList");202if (acList != null) {203audioActionMap = new ActionMapUIResource();204for (int counter = acList.length - 1; counter >= 0; counter--) {205audioActionMap.put(acList[counter], createAudioAction(acList[counter]));206}207}208UIManager.getLookAndFeelDefaults().put("AuditoryCues.actionMap", audioActionMap);209210return audioActionMap;211}212213/**214* We override getDefaults() so we can install our own debug defaults215* if needed for testing216*/217public UIDefaults getDefaults() {218final UIDefaults table = new UIDefaults();219// use debug defaults if you want to see every query into the defaults object.220//UIDefaults table = new DebugDefaults();221try {222// PopupFactory.getSharedInstance().setPopupType(2);223initClassDefaults(table);224225// Here we install all the Basic defaults in case we missed some in our System color226// or component defaults that follow. Eventually we will take this out.227// This is a big negative to performance so we want to get it out as soon228// as we are comfortable with the Aqua defaults.229super.initSystemColorDefaults(table);230super.initComponentDefaults(table);231232// Because the last elements added win in precedence we add all of our aqua elements here.233initSystemColorDefaults(table);234initComponentDefaults(table);235} catch(final Exception e) {236e.printStackTrace();237}238return table;239}240241/**242* Initialize the defaults table with the name of the ResourceBundle243* used for getting localized defaults. Also initialize the default244* locale used when no locale is passed into UIDefaults.get(). The245* default locale should generally not be relied upon. It is here for246* compatibility with releases prior to 1.4.247*/248private void initResourceBundle(final UIDefaults table) {249table.setDefaultLocale(Locale.getDefault());250table.addResourceBundle(PKG_PREFIX + "resources.aqua");251try {252final ResourceBundle aquaProperties = ResourceBundle.getBundle(PKG_PREFIX + "resources.aqua");253final Enumeration<String> propertyKeys = aquaProperties.getKeys();254255while (propertyKeys.hasMoreElements()) {256final String key = propertyKeys.nextElement();257table.put(key, aquaProperties.getString(key));258}259} catch (final Exception e) {260}261}262263/**264* This is the last step in the getDefaults routine usually called from our superclass265*/266protected void initComponentDefaults(final UIDefaults table) {267initResourceBundle(table);268269final InsetsUIResource zeroInsets = new InsetsUIResource(0, 0, 0, 0);270final InsetsUIResource menuItemMargin = zeroInsets;271272// <rdar://problem/5189013> Entire Java application window refreshes when moving off Shortcut menu item273final Boolean useOpaqueComponents = Boolean.TRUE;274275final Boolean buttonShouldBeOpaque = AquaUtils.shouldUseOpaqueButtons() ? Boolean.TRUE : Boolean.FALSE;276277// *** List value objects278final Object listCellRendererActiveValue = new UIDefaults.ActiveValue(){279public Object createValue(UIDefaults defaultsTable) {280return new DefaultListCellRenderer.UIResource();281}282};283284// SJA - I'm basing this on what is in the MetalLookAndFeel class, but285// without being based on BasicLookAndFeel. We want more flexibility.286// The key to doing this well is to use Lazy initializing classes as287// much as possible.288289// Here I want to go to native and get all the values we'd need for colors etc.290final Border toolTipBorder = new BorderUIResource.EmptyBorderUIResource(2, 0, 2, 0);291final ColorUIResource toolTipBackground = new ColorUIResource(255, 255, (int)(255.0 * 0.80));292final ColorUIResource black = new ColorUIResource(Color.black);293final ColorUIResource white = new ColorUIResource(Color.white);294final ColorUIResource smokyGlass = new ColorUIResource(new Color(0, 0, 0, 152));295final ColorUIResource dockIconRim = new ColorUIResource(new Color(192, 192, 192, 192));296final ColorUIResource mediumTranslucentBlack = new ColorUIResource(new Color(0, 0, 0, 100));297final ColorUIResource translucentWhite = new ColorUIResource(new Color(255, 255, 255, 254));298// final ColorUIResource lightGray = new ColorUIResource(232, 232, 232);299final ColorUIResource disabled = new ColorUIResource(0.5f, 0.5f, 0.5f);300final ColorUIResource disabledShadow = new ColorUIResource(0.25f, 0.25f, 0.25f);301final ColorUIResource selected = new ColorUIResource(1.0f, 0.4f, 0.4f);302303// Contrast tab UI colors304305final ColorUIResource selectedTabTitlePressedColor = new ColorUIResource(240, 240, 240);306final ColorUIResource selectedTabTitleDisabledColor = new ColorUIResource(new Color(1, 1, 1, 0.55f));307final ColorUIResource selectedTabTitleNormalColor = white;308final ColorUIResource selectedTabTitleShadowDisabledColor = new ColorUIResource(new Color(0, 0, 0, 0.25f));309final ColorUIResource selectedTabTitleShadowNormalColor = mediumTranslucentBlack;310final ColorUIResource nonSelectedTabTitleNormalColor = black;311312final ColorUIResource toolbarDragHandleColor = new ColorUIResource(140, 140, 140);313314// sja todo Make these lazy values so we only get them when required - if we deem it necessary315// it may be the case that we think the overhead of a proxy lazy value is not worth delaying316// creating the object if we think that most swing apps will use this.317// the lazy value is useful for delaying initialization until this default value is actually318// accessed by the LAF instead of at init time, so making it lazy should speed up319// our launch times of Swing apps.320321// *** Text value objects322final Object marginBorder = new SwingLazyValue("javax.swing.plaf.basic.BasicBorders$MarginBorder");323324final Object zero = new Integer(0);325final Object editorMargin = zeroInsets; // this is not correct - look at TextEdit to determine the right margin326final Object textCaretBlinkRate = new Integer(500);327final Object textFieldBorder = new SwingLazyValue(PKG_PREFIX + "AquaTextFieldBorder", "getTextFieldBorder");328final Object textAreaBorder = marginBorder; // text areas have no real border - radar 311073329330final Object scollListBorder = new SwingLazyValue(PKG_PREFIX + "AquaScrollRegionBorder", "getScrollRegionBorder");331final Object aquaTitledBorder = new SwingLazyValue(PKG_PREFIX + "AquaGroupBorder", "getBorderForTitledBorder");332final Object aquaInsetBorder = new SwingLazyValue(PKG_PREFIX + "AquaGroupBorder", "getTitlelessBorder");333334final Border listHeaderBorder = AquaTableHeaderBorder.getListHeaderBorder();335final Border zeroBorder = new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0);336337// we can't seem to proxy Colors338final Color selectionBackground = AquaImageFactory.getSelectionBackgroundColorUIResource();339final Color selectionForeground = AquaImageFactory.getSelectionForegroundColorUIResource();340final Color selectionInactiveBackground = AquaImageFactory.getSelectionInactiveBackgroundColorUIResource();341final Color selectionInactiveForeground = AquaImageFactory.getSelectionInactiveForegroundColorUIResource();342343final Color textHighlightText = AquaImageFactory.getTextSelectionForegroundColorUIResource();344final Color textHighlight = AquaImageFactory.getTextSelectionBackgroundColorUIResource();345final Color textHighlightInactive = new ColorUIResource(212, 212, 212);346347final Color textInactiveText = disabled;348final Color textForeground = black;349final Color textBackground = white;350final Color textInactiveBackground = white;351352final Color textPasswordFieldCapsLockIconColor = mediumTranslucentBlack;353354final Object internalFrameBorder = new SwingLazyValue("javax.swing.plaf.basic.BasicBorders", "getInternalFrameBorder");355final Color desktopBackgroundColor = new ColorUIResource(new Color(65, 105, 170));//SystemColor.desktop356357final Color focusRingColor = AquaImageFactory.getFocusRingColorUIResource();358final Border focusCellHighlightBorder = new BorderUIResource.LineBorderUIResource(focusRingColor);359360final Color windowBackgroundColor = AquaImageFactory.getWindowBackgroundColorUIResource();361final Color panelBackgroundColor = windowBackgroundColor;362final Color tabBackgroundColor = windowBackgroundColor;363final Color controlBackgroundColor = windowBackgroundColor;364365final Object controlFont = new SwingLazyValue(kAquaFontsName, "getControlTextFont");366final Object controlSmallFont = new SwingLazyValue(kAquaFontsName, "getControlTextSmallFont");367final Object alertHeaderFont = new SwingLazyValue(kAquaFontsName, "getAlertHeaderFont");368final Object menuFont = new SwingLazyValue(kAquaFontsName, "getMenuFont");369final Object viewFont = new SwingLazyValue(kAquaFontsName, "getViewFont");370371final Color menuBackgroundColor = new ColorUIResource(Color.white);372final Color menuForegroundColor = black;373374final Color menuSelectedForegroundColor = white;375final Color menuSelectedBackgroundColor = focusRingColor;376377final Color menuDisabledBackgroundColor = menuBackgroundColor;378final Color menuDisabledForegroundColor = disabled;379380final Color menuAccelForegroundColor = black;381final Color menuAccelSelectionForegroundColor = black;382383final Border menuBorder = new AquaMenuBorder();384385final UIDefaults.LazyInputMap controlFocusInputMap = new UIDefaults.LazyInputMap(new Object[]{386"SPACE", "pressed",387"released SPACE", "released"388});389390// sja testing391final Object confirmIcon = new SwingLazyValue(kAquaImageFactoryName, "getConfirmImageIcon"); // AquaImageFactory.getConfirmImageIcon();392final Object cautionIcon = new SwingLazyValue(kAquaImageFactoryName, "getCautionImageIcon"); // AquaImageFactory.getCautionImageIcon();393final Object stopIcon = new SwingLazyValue(kAquaImageFactoryName, "getStopImageIcon"); // AquaImageFactory.getStopImageIcon();394final Object securityIcon = new SwingLazyValue(kAquaImageFactoryName, "getLockImageIcon"); // AquaImageFactory.getLockImageIcon();395396final AquaKeyBindings aquaKeyBindings = AquaKeyBindings.instance();397398final Object[] defaults = {399"control", windowBackgroundColor, /* Default color for controls (buttons, sliders, etc) */400401// Buttons402"Button.background", controlBackgroundColor,403"Button.foreground", black,404"Button.disabledText", disabled,405"Button.select", selected,406"Button.border", new SwingLazyValue(PKG_PREFIX + "AquaButtonBorder", "getDynamicButtonBorder"),407"Button.font", controlFont,408"Button.textIconGap", new Integer(4),409"Button.textShiftOffset", zero, // radar 3308129 - aqua doesn't move images when pressed.410"Button.focusInputMap", controlFocusInputMap,411"Button.margin", new InsetsUIResource(0, 2, 0, 2),412"Button.opaque", buttonShouldBeOpaque,413414"CheckBox.background", controlBackgroundColor,415"CheckBox.foreground", black,416"CheckBox.disabledText", disabled,417"CheckBox.select", selected,418"CheckBox.icon", new SwingLazyValue(PKG_PREFIX + "AquaButtonCheckBoxUI", "getSizingCheckBoxIcon"),419"CheckBox.font", controlFont,420"CheckBox.border", AquaButtonBorder.getBevelButtonBorder(),421"CheckBox.margin", new InsetsUIResource(1, 1, 0, 1),422// radar 3583849. This property never gets423// used. The border for the Checkbox gets overridden424// by AquaRadiButtonUI.setThemeBorder(). Needs refactoring. (vm)425// why is button focus commented out?426//"CheckBox.focus", getFocusColor(),427"CheckBox.focusInputMap", controlFocusInputMap,428429"CheckBoxMenuItem.font", menuFont,430"CheckBoxMenuItem.acceleratorFont", menuFont,431"CheckBoxMenuItem.background", menuBackgroundColor,432"CheckBoxMenuItem.foreground", menuForegroundColor,433"CheckBoxMenuItem.selectionBackground", menuSelectedBackgroundColor,434"CheckBoxMenuItem.selectionForeground", menuSelectedForegroundColor,435"CheckBoxMenuItem.disabledBackground", menuDisabledBackgroundColor,436"CheckBoxMenuItem.disabledForeground", menuDisabledForegroundColor,437"CheckBoxMenuItem.acceleratorForeground", menuAccelForegroundColor,438"CheckBoxMenuItem.acceleratorSelectionForeground", menuAccelSelectionForegroundColor,439"CheckBoxMenuItem.acceleratorDelimiter", "",440"CheckBoxMenuItem.border", menuBorder, // for inset calculation441"CheckBoxMenuItem.margin", menuItemMargin,442"CheckBoxMenuItem.borderPainted", Boolean.TRUE,443"CheckBoxMenuItem.checkIcon", new SwingLazyValue(kAquaImageFactoryName, "getMenuItemCheckIcon"),444"CheckBoxMenuItem.dashIcon", new SwingLazyValue(kAquaImageFactoryName, "getMenuItemDashIcon"),445//"CheckBoxMenuItem.arrowIcon", null,446447"ColorChooser.background", panelBackgroundColor,448449// *** ComboBox450"ComboBox.font", controlFont,451"ComboBox.background", controlBackgroundColor, //menuBackgroundColor, // "menu" when it has no scrollbar, "listView" when it does452"ComboBox.foreground", menuForegroundColor,453"ComboBox.selectionBackground", menuSelectedBackgroundColor,454"ComboBox.selectionForeground", menuSelectedForegroundColor,455"ComboBox.disabledBackground", menuDisabledBackgroundColor,456"ComboBox.disabledForeground", menuDisabledForegroundColor,457"ComboBox.ancestorInputMap", aquaKeyBindings.getComboBoxInputMap(),458459"DesktopIcon.border", internalFrameBorder,460"DesktopIcon.borderColor", smokyGlass,461"DesktopIcon.borderRimColor", dockIconRim,462"DesktopIcon.labelBackground", mediumTranslucentBlack,463"Desktop.background", desktopBackgroundColor,464465"EditorPane.focusInputMap", aquaKeyBindings.getMultiLineTextInputMap(),466"EditorPane.font", controlFont,467"EditorPane.background", textBackground,468"EditorPane.foreground", textForeground,469"EditorPane.selectionBackground", textHighlight,470"EditorPane.selectionForeground", textHighlightText,471"EditorPane.caretForeground", textForeground,472"EditorPane.caretBlinkRate", textCaretBlinkRate,473"EditorPane.inactiveForeground", textInactiveText,474"EditorPane.inactiveBackground", textInactiveBackground,475"EditorPane.border", textAreaBorder,476"EditorPane.margin", editorMargin,477478"FileChooser.newFolderIcon", AquaIcon.SystemIcon.getFolderIconUIResource(),479"FileChooser.upFolderIcon", AquaIcon.SystemIcon.getFolderIconUIResource(),480"FileChooser.homeFolderIcon", AquaIcon.SystemIcon.getDesktopIconUIResource(),481"FileChooser.detailsViewIcon", AquaIcon.SystemIcon.getComputerIconUIResource(),482"FileChooser.listViewIcon", AquaIcon.SystemIcon.getComputerIconUIResource(),483484"FileView.directoryIcon", AquaIcon.SystemIcon.getFolderIconUIResource(),485"FileView.fileIcon", AquaIcon.SystemIcon.getDocumentIconUIResource(),486"FileView.computerIcon", AquaIcon.SystemIcon.getDesktopIconUIResource(),487"FileView.hardDriveIcon", AquaIcon.SystemIcon.getHardDriveIconUIResource(),488"FileView.floppyDriveIcon", AquaIcon.SystemIcon.getFloppyIconUIResource(),489490// File View491"FileChooser.cancelButtonMnemonic", zero,492"FileChooser.saveButtonMnemonic", zero,493"FileChooser.openButtonMnemonic", zero,494"FileChooser.updateButtonMnemonic", zero,495"FileChooser.helpButtonMnemonic", zero,496"FileChooser.directoryOpenButtonMnemonic", zero,497498"FileChooser.lookInLabelMnemonic", zero,499"FileChooser.fileNameLabelMnemonic", zero,500"FileChooser.filesOfTypeLabelMnemonic", zero,501502"Focus.color", focusRingColor,503504"FormattedTextField.focusInputMap", aquaKeyBindings.getFormattedTextFieldInputMap(),505"FormattedTextField.font", controlFont,506"FormattedTextField.background", textBackground,507"FormattedTextField.foreground", textForeground,508"FormattedTextField.inactiveForeground", textInactiveText,509"FormattedTextField.inactiveBackground", textInactiveBackground,510"FormattedTextField.selectionBackground", textHighlight,511"FormattedTextField.selectionForeground", textHighlightText,512"FormattedTextField.caretForeground", textForeground,513"FormattedTextField.caretBlinkRate", textCaretBlinkRate,514"FormattedTextField.border", textFieldBorder,515"FormattedTextField.margin", zeroInsets,516517"IconButton.font", controlSmallFont,518519"InternalFrame.titleFont", menuFont,520"InternalFrame.background", windowBackgroundColor,521"InternalFrame.borderColor", windowBackgroundColor,522"InternalFrame.borderShadow", Color.red,523"InternalFrame.borderDarkShadow", Color.green,524"InternalFrame.borderHighlight", Color.blue,525"InternalFrame.borderLight", Color.yellow,526"InternalFrame.opaque", Boolean.FALSE,527"InternalFrame.border", null, //internalFrameBorder,528"InternalFrame.icon", null,529530"InternalFrame.paletteBorder", null,//internalFrameBorder,531"InternalFrame.paletteTitleFont", menuFont,532"InternalFrame.paletteBackground", windowBackgroundColor,533534"InternalFrame.optionDialogBorder", null,//internalFrameBorder,535"InternalFrame.optionDialogTitleFont", menuFont,536"InternalFrame.optionDialogBackground", windowBackgroundColor,537538/* Default frame icons are undefined for Basic. */539540"InternalFrame.closeIcon", new SwingLazyValue(PKG_PREFIX + "AquaInternalFrameUI", "exportCloseIcon"),541"InternalFrame.maximizeIcon", new SwingLazyValue(PKG_PREFIX + "AquaInternalFrameUI", "exportZoomIcon"),542"InternalFrame.iconifyIcon", new SwingLazyValue(PKG_PREFIX + "AquaInternalFrameUI", "exportMinimizeIcon"),543"InternalFrame.minimizeIcon", new SwingLazyValue(PKG_PREFIX + "AquaInternalFrameUI", "exportMinimizeIcon"),544// this could be either grow or icon545// we decided to make it icon so that anyone who uses546// these for ui will have different icons for max and min547// these icons are pretty crappy to use in Mac OS X since548// they really are interactive but we have to return a static549// icon for now.550551// InternalFrame Auditory Cue Mappings552"InternalFrame.closeSound", null,553"InternalFrame.maximizeSound", null,554"InternalFrame.minimizeSound", null,555"InternalFrame.restoreDownSound", null,556"InternalFrame.restoreUpSound", null,557558"InternalFrame.activeTitleBackground", windowBackgroundColor,559"InternalFrame.activeTitleForeground", textForeground,560"InternalFrame.inactiveTitleBackground", windowBackgroundColor,561"InternalFrame.inactiveTitleForeground", textInactiveText,562"InternalFrame.windowBindings", new Object[]{563"shift ESCAPE", "showSystemMenu",564"ctrl SPACE", "showSystemMenu",565"ESCAPE", "hideSystemMenu"566},567568// Radar [3543438]. We now define the TitledBorder properties for font and color.569// Aqua HIG doesn't define TitledBorders as Swing does. Eventually, we might want to570// re-think TitledBorder to behave more like a Box (NSBox). (vm)571"TitledBorder.font", controlFont,572"TitledBorder.titleColor", black,573// "TitledBorder.border", -- we inherit this property from BasicLookAndFeel (etched border)574"TitledBorder.aquaVariant", aquaTitledBorder, // this is the border that matches what aqua really looks like575"InsetBorder.aquaVariant", aquaInsetBorder, // this is the title-less variant576577// *** Label578"Label.font", controlFont, // themeLabelFont is for small things like ToolbarButtons579"Label.background", controlBackgroundColor,580"Label.foreground", black,581"Label.disabledForeground", disabled,582"Label.disabledShadow", disabledShadow,583"Label.opaque", useOpaqueComponents,584"Label.border", null,585586"List.font", viewFont, // [3577901] Aqua HIG says "default font of text in lists and tables" should be 12 point (vm).587"List.background", white,588"List.foreground", black,589"List.selectionBackground", selectionBackground,590"List.selectionForeground", selectionForeground,591"List.selectionInactiveBackground", selectionInactiveBackground,592"List.selectionInactiveForeground", selectionInactiveForeground,593"List.focusCellHighlightBorder", focusCellHighlightBorder,594"List.border", null,595"List.cellRenderer", listCellRendererActiveValue,596597"List.sourceListBackgroundPainter", new SwingLazyValue(PKG_PREFIX + "AquaListUI", "getSourceListBackgroundPainter"),598"List.sourceListSelectionBackgroundPainter", new SwingLazyValue(PKG_PREFIX + "AquaListUI", "getSourceListSelectionBackgroundPainter"),599"List.sourceListFocusedSelectionBackgroundPainter", new SwingLazyValue(PKG_PREFIX + "AquaListUI", "getSourceListFocusedSelectionBackgroundPainter"),600"List.evenRowBackgroundPainter", new SwingLazyValue(PKG_PREFIX + "AquaListUI", "getListEvenBackgroundPainter"),601"List.oddRowBackgroundPainter", new SwingLazyValue(PKG_PREFIX + "AquaListUI", "getListOddBackgroundPainter"),602603// <rdar://Problem/3743210> The modifier for the Mac is meta, not control.604"List.focusInputMap", aquaKeyBindings.getListInputMap(),605606//"List.scrollPaneBorder", listBoxBorder, // Not used in Swing1.1607//"ListItem.border", ThemeMenu.listItemBorder(), // for inset calculation608609// *** Menus610"Menu.font", menuFont,611"Menu.acceleratorFont", menuFont,612"Menu.background", menuBackgroundColor,613"Menu.foreground", menuForegroundColor,614"Menu.selectionBackground", menuSelectedBackgroundColor,615"Menu.selectionForeground", menuSelectedForegroundColor,616"Menu.disabledBackground", menuDisabledBackgroundColor,617"Menu.disabledForeground", menuDisabledForegroundColor,618"Menu.acceleratorForeground", menuAccelForegroundColor,619"Menu.acceleratorSelectionForeground", menuAccelSelectionForegroundColor,620//"Menu.border", ThemeMenu.menuItemBorder(), // for inset calculation621"Menu.border", menuBorder,622"Menu.borderPainted", Boolean.FALSE,623"Menu.margin", menuItemMargin,624//"Menu.checkIcon", emptyCheckIcon, // A non-drawing GlyphIcon to make the spacing consistent625"Menu.arrowIcon", new SwingLazyValue(kAquaImageFactoryName, "getMenuArrowIcon"),626"Menu.consumesTabs", Boolean.TRUE,627"Menu.menuPopupOffsetY", new Integer(1),628"Menu.submenuPopupOffsetY", new Integer(-4),629630"MenuBar.font", menuFont,631"MenuBar.background", menuBackgroundColor, // not a menu item, not selected632"MenuBar.foreground", menuForegroundColor,633"MenuBar.border", new AquaMenuBarBorder(), // sja make lazy!634"MenuBar.margin", new InsetsUIResource(0, 8, 0, 8), // sja make lazy!635"MenuBar.selectionBackground", menuSelectedBackgroundColor, // not a menu item, is selected636"MenuBar.selectionForeground", menuSelectedForegroundColor,637"MenuBar.disabledBackground", menuDisabledBackgroundColor, //ThemeBrush.GetThemeBrushForMenu(false, false), // not a menu item, not selected638"MenuBar.disabledForeground", menuDisabledForegroundColor,639"MenuBar.backgroundPainter", new SwingLazyValue(PKG_PREFIX + "AquaMenuPainter", "getMenuBarPainter"),640"MenuBar.selectedBackgroundPainter", new SwingLazyValue(PKG_PREFIX + "AquaMenuPainter", "getSelectedMenuBarItemPainter"),641642"MenuItem.font", menuFont,643"MenuItem.acceleratorFont", menuFont,644"MenuItem.background", menuBackgroundColor,645"MenuItem.foreground", menuForegroundColor,646"MenuItem.selectionBackground", menuSelectedBackgroundColor,647"MenuItem.selectionForeground", menuSelectedForegroundColor,648"MenuItem.disabledBackground", menuDisabledBackgroundColor,649"MenuItem.disabledForeground", menuDisabledForegroundColor,650"MenuItem.acceleratorForeground", menuAccelForegroundColor,651"MenuItem.acceleratorSelectionForeground", menuAccelSelectionForegroundColor,652"MenuItem.acceleratorDelimiter", "",653"MenuItem.border", menuBorder,654"MenuItem.margin", menuItemMargin,655"MenuItem.borderPainted", Boolean.TRUE,656//"MenuItem.checkIcon", emptyCheckIcon, // A non-drawing GlyphIcon to make the spacing consistent657//"MenuItem.arrowIcon", null,658"MenuItem.selectedBackgroundPainter", new SwingLazyValue(PKG_PREFIX + "AquaMenuPainter", "getSelectedMenuItemPainter"),659660// *** OptionPane661// You can additionaly define OptionPane.messageFont which will662// dictate the fonts used for the message, and663// OptionPane.buttonFont, which defines the font for the buttons.664"OptionPane.font", alertHeaderFont,665"OptionPane.messageFont", controlFont,666"OptionPane.buttonFont", controlFont,667"OptionPane.background", windowBackgroundColor,668"OptionPane.foreground", black,669"OptionPane.messageForeground", black,670"OptionPane.border", new BorderUIResource.EmptyBorderUIResource(12, 21, 17, 21),671"OptionPane.messageAreaBorder", zeroBorder,672"OptionPane.buttonAreaBorder", new BorderUIResource.EmptyBorderUIResource(13, 0, 0, 0),673"OptionPane.minimumSize", new DimensionUIResource(262, 90),674675"OptionPane.errorIcon", stopIcon,676"OptionPane.informationIcon", confirmIcon,677"OptionPane.warningIcon", cautionIcon,678"OptionPane.questionIcon", confirmIcon,679"_SecurityDecisionIcon", securityIcon,680"OptionPane.windowBindings", new Object[]{"ESCAPE", "close"},681// OptionPane Auditory Cue Mappings682"OptionPane.errorSound", null,683"OptionPane.informationSound", null, // Info and Plain684"OptionPane.questionSound", null,685"OptionPane.warningSound", null,686"OptionPane.buttonClickThreshhold", new Integer(500),687"OptionPane.yesButtonMnemonic", "",688"OptionPane.noButtonMnemonic", "",689"OptionPane.okButtonMnemonic", "",690"OptionPane.cancelButtonMnemonic", "",691692"Panel.font", controlFont,693"Panel.background", panelBackgroundColor, //new ColorUIResource(0.5647f, 0.9957f, 0.5059f),694"Panel.foreground", black,695"Panel.opaque", useOpaqueComponents,696697"PasswordField.focusInputMap", aquaKeyBindings.getPasswordFieldInputMap(),698"PasswordField.font", controlFont,699"PasswordField.background", textBackground,700"PasswordField.foreground", textForeground,701"PasswordField.inactiveForeground", textInactiveText,702"PasswordField.inactiveBackground", textInactiveBackground,703"PasswordField.selectionBackground", textHighlight,704"PasswordField.selectionForeground", textHighlightText,705"PasswordField.caretForeground", textForeground,706"PasswordField.caretBlinkRate", textCaretBlinkRate,707"PasswordField.border", textFieldBorder,708"PasswordField.margin", zeroInsets,709"PasswordField.echoChar", new Character((char)0x25CF),710"PasswordField.capsLockIconColor", textPasswordFieldCapsLockIconColor,711712"PopupMenu.font", menuFont,713"PopupMenu.background", menuBackgroundColor,714// Fix for 7154516: make popups opaque715"PopupMenu.translucentBackground", white,716"PopupMenu.foreground", menuForegroundColor,717"PopupMenu.selectionBackground", menuSelectedBackgroundColor,718"PopupMenu.selectionForeground", menuSelectedForegroundColor,719"PopupMenu.border", menuBorder,720// "PopupMenu.margin",721722"ProgressBar.font", controlFont,723"ProgressBar.foreground", black,724"ProgressBar.background", controlBackgroundColor,725"ProgressBar.selectionForeground", black,726"ProgressBar.selectionBackground", white,727"ProgressBar.border", new BorderUIResource(BorderFactory.createEmptyBorder()),728"ProgressBar.repaintInterval", new Integer(20),729730"RadioButton.background", controlBackgroundColor,731"RadioButton.foreground", black,732"RadioButton.disabledText", disabled,733"RadioButton.select", selected,734"RadioButton.icon", new SwingLazyValue(PKG_PREFIX + "AquaButtonRadioUI", "getSizingRadioButtonIcon"),735"RadioButton.font", controlFont,736"RadioButton.border", AquaButtonBorder.getBevelButtonBorder(),737"RadioButton.margin", new InsetsUIResource(1, 1, 0, 1),738"RadioButton.focusInputMap", controlFocusInputMap,739740"RadioButtonMenuItem.font", menuFont,741"RadioButtonMenuItem.acceleratorFont", menuFont,742"RadioButtonMenuItem.background", menuBackgroundColor,743"RadioButtonMenuItem.foreground", menuForegroundColor,744"RadioButtonMenuItem.selectionBackground", menuSelectedBackgroundColor,745"RadioButtonMenuItem.selectionForeground", menuSelectedForegroundColor,746"RadioButtonMenuItem.disabledBackground", menuDisabledBackgroundColor,747"RadioButtonMenuItem.disabledForeground", menuDisabledForegroundColor,748"RadioButtonMenuItem.acceleratorForeground", menuAccelForegroundColor,749"RadioButtonMenuItem.acceleratorSelectionForeground", menuAccelSelectionForegroundColor,750"RadioButtonMenuItem.acceleratorDelimiter", "",751"RadioButtonMenuItem.border", menuBorder, // for inset calculation752"RadioButtonMenuItem.margin", menuItemMargin,753"RadioButtonMenuItem.borderPainted", Boolean.TRUE,754"RadioButtonMenuItem.checkIcon", new SwingLazyValue(kAquaImageFactoryName, "getMenuItemCheckIcon"),755"RadioButtonMenuItem.dashIcon", new SwingLazyValue(kAquaImageFactoryName, "getMenuItemDashIcon"),756//"RadioButtonMenuItem.arrowIcon", null,757758"Separator.background", null,759"Separator.foreground", new ColorUIResource(0xD4, 0xD4, 0xD4),760761"ScrollBar.border", null,762"ScrollBar.focusInputMap", aquaKeyBindings.getScrollBarInputMap(),763"ScrollBar.focusInputMap.RightToLeft", aquaKeyBindings.getScrollBarRightToLeftInputMap(),764"ScrollBar.width", new Integer(16),765"ScrollBar.background", white,766"ScrollBar.foreground", black,767768"ScrollPane.font", controlFont,769"ScrollPane.background", white,770"ScrollPane.foreground", black, //$771"ScrollPane.border", scollListBorder,772"ScrollPane.viewportBorder", null,773774"ScrollPane.ancestorInputMap", aquaKeyBindings.getScrollPaneInputMap(),775"ScrollPane.ancestorInputMap.RightToLeft", new UIDefaults.LazyInputMap(new Object[]{}),776777"Viewport.font", controlFont,778"Viewport.background", white, // The background for tables, lists, etc779"Viewport.foreground", black,780781// *** Slider782"Slider.foreground", black, "Slider.background", controlBackgroundColor,783"Slider.font", controlSmallFont,784//"Slider.highlight", table.get("controlLtHighlight"),785//"Slider.shadow", table.get("controlShadow"),786//"Slider.focus", table.get("controlDkShadow"),787"Slider.tickColor", new ColorUIResource(Color.GRAY),788"Slider.border", null,789"Slider.focusInsets", new InsetsUIResource(2, 2, 2, 2),790"Slider.focusInputMap", aquaKeyBindings.getSliderInputMap(),791"Slider.focusInputMap.RightToLeft", aquaKeyBindings.getSliderRightToLeftInputMap(),792793// *** Spinner794"Spinner.font", controlFont,795"Spinner.background", controlBackgroundColor,796"Spinner.foreground", black,797"Spinner.border", null,798"Spinner.arrowButtonSize", new Dimension(16, 5),799"Spinner.ancestorInputMap", aquaKeyBindings.getSpinnerInputMap(),800"Spinner.editorBorderPainted", Boolean.TRUE,801"Spinner.editorAlignment", SwingConstants.TRAILING,802803// *** SplitPane804//"SplitPane.highlight", table.get("controlLtHighlight"),805//"SplitPane.shadow", table.get("controlShadow"),806"SplitPane.background", panelBackgroundColor,807"SplitPane.border", scollListBorder,808"SplitPane.dividerSize", new Integer(9), //$809"SplitPaneDivider.border", null, // AquaSplitPaneDividerUI draws it810"SplitPaneDivider.horizontalGradientVariant", new SwingLazyValue(PKG_PREFIX + "AquaSplitPaneDividerUI", "getHorizontalSplitDividerGradientVariant"),811812// *** TabbedPane813"TabbedPane.font", controlFont,814"TabbedPane.smallFont", controlSmallFont,815"TabbedPane.useSmallLayout", Boolean.FALSE,//sSmallTabs ? Boolean.TRUE : Boolean.FALSE,816"TabbedPane.background", tabBackgroundColor, // for bug [3398277] use a background color so that817// tabs on a custom pane get erased when they are removed.818"TabbedPane.foreground", black, //ThemeTextColor.GetThemeTextColor(AppearanceConstants.kThemeTextColorTabFrontActive),819//"TabbedPane.lightHighlight", table.get("controlLtHighlight"),820//"TabbedPane.highlight", table.get("controlHighlight"),821//"TabbedPane.shadow", table.get("controlShadow"),822//"TabbedPane.darkShadow", table.get("controlDkShadow"),823//"TabbedPane.focus", table.get("controlText"),824"TabbedPane.opaque", useOpaqueComponents,825"TabbedPane.textIconGap", new Integer(4),826"TabbedPane.tabInsets", new InsetsUIResource(0, 10, 3, 10), // Label within tab (top, left, bottom, right)827//"TabbedPane.rightTabInsets", new InsetsUIResource(0, 10, 3, 10), // Label within tab (top, left, bottom, right)828"TabbedPane.leftTabInsets", new InsetsUIResource(0, 10, 3, 10), // Label within tab829"TabbedPane.rightTabInsets", new InsetsUIResource(0, 10, 3, 10), // Label within tab830//"TabbedPane.tabAreaInsets", new InsetsUIResource(3, 9, -1, 9), // Tabs relative to edge of pane (negative value for overlapping)831"TabbedPane.tabAreaInsets", new InsetsUIResource(3, 9, -1, 9), // Tabs relative to edge of pane (negative value for overlapping)832// (top = side opposite pane, left = edge || to pane, bottom = side adjacent to pane, right = left) - see rotateInsets833"TabbedPane.contentBorderInsets", new InsetsUIResource(8, 0, 0, 0), // width of border834//"TabbedPane.selectedTabPadInsets", new InsetsUIResource(0, 0, 1, 0), // Really outsets, this is where we allow for overlap835"TabbedPane.selectedTabPadInsets", new InsetsUIResource(0, 0, 0, 0), // Really outsets, this is where we allow for overlap836"TabbedPane.tabsOverlapBorder", Boolean.TRUE,837"TabbedPane.selectedTabTitlePressedColor", selectedTabTitlePressedColor,838"TabbedPane.selectedTabTitleDisabledColor", selectedTabTitleDisabledColor,839"TabbedPane.selectedTabTitleNormalColor", selectedTabTitleNormalColor,840"TabbedPane.selectedTabTitleShadowDisabledColor", selectedTabTitleShadowDisabledColor,841"TabbedPane.selectedTabTitleShadowNormalColor", selectedTabTitleShadowNormalColor,842"TabbedPane.nonSelectedTabTitleNormalColor", nonSelectedTabTitleNormalColor,843844// *** Table845"Table.font", viewFont, // [3577901] Aqua HIG says "default font of text in lists and tables" should be 12 point (vm).846"Table.foreground", black, // cell text color847"Table.background", white, // cell background color848"Table.selectionForeground", selectionForeground,849"Table.selectionBackground", selectionBackground,850"Table.selectionInactiveBackground", selectionInactiveBackground,851"Table.selectionInactiveForeground", selectionInactiveForeground,852"Table.gridColor", white, // grid line color853"Table.focusCellBackground", textHighlightText,854"Table.focusCellForeground", textHighlight,855"Table.focusCellHighlightBorder", focusCellHighlightBorder,856"Table.scrollPaneBorder", scollListBorder,857858"Table.ancestorInputMap", aquaKeyBindings.getTableInputMap(),859"Table.ancestorInputMap.RightToLeft", aquaKeyBindings.getTableRightToLeftInputMap(),860861"TableHeader.font", controlSmallFont,862"TableHeader.foreground", black,863"TableHeader.background", white, // header background864"TableHeader.cellBorder", listHeaderBorder,865866// *** Text867"TextArea.focusInputMap", aquaKeyBindings.getMultiLineTextInputMap(),868"TextArea.font", controlFont,869"TextArea.background", textBackground,870"TextArea.foreground", textForeground,871"TextArea.inactiveForeground", textInactiveText,872"TextArea.inactiveBackground", textInactiveBackground,873"TextArea.selectionBackground", textHighlight,874"TextArea.selectionForeground", textHighlightText,875"TextArea.caretForeground", textForeground,876"TextArea.caretBlinkRate", textCaretBlinkRate,877"TextArea.border", textAreaBorder,878"TextArea.margin", zeroInsets,879880"TextComponent.selectionBackgroundInactive", textHighlightInactive,881882"TextField.focusInputMap", aquaKeyBindings.getTextFieldInputMap(),883"TextField.font", controlFont,884"TextField.background", textBackground,885"TextField.foreground", textForeground,886"TextField.inactiveForeground", textInactiveText,887"TextField.inactiveBackground", textInactiveBackground,888"TextField.selectionBackground", textHighlight,889"TextField.selectionForeground", textHighlightText,890"TextField.caretForeground", textForeground,891"TextField.caretBlinkRate", textCaretBlinkRate,892"TextField.border", textFieldBorder,893"TextField.margin", zeroInsets,894895"TextPane.focusInputMap", aquaKeyBindings.getMultiLineTextInputMap(),896"TextPane.font", controlFont,897"TextPane.background", textBackground,898"TextPane.foreground", textForeground,899"TextPane.selectionBackground", textHighlight,900"TextPane.selectionForeground", textHighlightText,901"TextPane.caretForeground", textForeground,902"TextPane.caretBlinkRate", textCaretBlinkRate,903"TextPane.inactiveForeground", textInactiveText,904"TextPane.inactiveBackground", textInactiveBackground,905"TextPane.border", textAreaBorder,906"TextPane.margin", editorMargin,907908// *** ToggleButton909"ToggleButton.background", controlBackgroundColor,910"ToggleButton.foreground", black,911"ToggleButton.disabledText", disabled,912// we need to go through and find out if these are used, and if not what to set913// so that subclasses will get good aqua like colors.914// "ToggleButton.select", getControlShadow(),915// "ToggleButton.text", getControl(),916// "ToggleButton.disabledSelectedText", getControlDarkShadow(),917// "ToggleButton.disabledBackground", getControl(),918// "ToggleButton.disabledSelectedBackground", getControlShadow(),919//"ToggleButton.focus", getFocusColor(),920"ToggleButton.border", new SwingLazyValue(PKG_PREFIX + "AquaButtonBorder", "getDynamicButtonBorder"), // sja make this lazy!921"ToggleButton.font", controlFont,922"ToggleButton.focusInputMap", controlFocusInputMap,923"ToggleButton.margin", new InsetsUIResource(2, 2, 2, 2),924925// *** ToolBar926"ToolBar.font", controlFont,927"ToolBar.background", panelBackgroundColor,928"ToolBar.foreground", new ColorUIResource(Color.gray),929"ToolBar.dockingBackground", panelBackgroundColor,930"ToolBar.dockingForeground", selectionBackground,931"ToolBar.floatingBackground", panelBackgroundColor,932"ToolBar.floatingForeground", new ColorUIResource(Color.darkGray),933"ToolBar.border", new SwingLazyValue(PKG_PREFIX + "AquaToolBarUI", "getToolBarBorder"),934"ToolBar.borderHandleColor", toolbarDragHandleColor,935//"ToolBar.separatorSize", new DimensionUIResource( 10, 10 ),936"ToolBar.separatorSize", null,937938// *** ToolBarButton939"ToolBarButton.margin", new InsetsUIResource(3, 3, 3, 3),940"ToolBarButton.insets", new InsetsUIResource(1, 1, 1, 1),941942// *** ToolTips943"ToolTip.font", controlSmallFont,944//$ Tooltips - Same color as help balloons?945"ToolTip.background", toolTipBackground,946"ToolTip.foreground", black,947"ToolTip.border", toolTipBorder,948949// *** Tree950"Tree.font", viewFont, // [3577901] Aqua HIG says "default font of text in lists and tables" should be 12 point (vm).951"Tree.background", white,952"Tree.foreground", black,953// for now no lines954"Tree.hash", white, //disabled, // Line color955"Tree.line", white, //disabled, // Line color956"Tree.textForeground", black,957"Tree.textBackground", white,958"Tree.selectionForeground", selectionForeground,959"Tree.selectionBackground", selectionBackground,960"Tree.selectionInactiveBackground", selectionInactiveBackground,961"Tree.selectionInactiveForeground", selectionInactiveForeground,962"Tree.selectionBorderColor", selectionBackground, // match the background so it looks like we don't draw anything963"Tree.editorBorderSelectionColor", null, // The EditTextFrame provides its own border964// "Tree.editorBorder", textFieldBorder, // If you still have Sun bug 4376328 in DefaultTreeCellEditor, it has to have the same insets as TextField.border965"Tree.leftChildIndent", new Integer(7),//$966"Tree.rightChildIndent", new Integer(13),//$967"Tree.rowHeight", new Integer(19),// iconHeight + 3, to match finder - a zero would have the renderer decide, except that leaves the icons touching968"Tree.scrollsOnExpand", Boolean.FALSE,969"Tree.openIcon", new SwingLazyValue(kAquaImageFactoryName, "getTreeOpenFolderIcon"), // Open folder icon970"Tree.closedIcon", new SwingLazyValue(kAquaImageFactoryName, "getTreeFolderIcon"), // Closed folder icon971"Tree.leafIcon", new SwingLazyValue(kAquaImageFactoryName, "getTreeDocumentIcon"), // Document icon972"Tree.expandedIcon", new SwingLazyValue(kAquaImageFactoryName, "getTreeExpandedIcon"),973"Tree.collapsedIcon", new SwingLazyValue(kAquaImageFactoryName, "getTreeCollapsedIcon"),974"Tree.rightToLeftCollapsedIcon", new SwingLazyValue(kAquaImageFactoryName, "getTreeRightToLeftCollapsedIcon"),975"Tree.changeSelectionWithFocus", Boolean.TRUE,976"Tree.drawsFocusBorderAroundIcon", Boolean.FALSE,977978"Tree.focusInputMap", aquaKeyBindings.getTreeInputMap(),979"Tree.focusInputMap.RightToLeft", aquaKeyBindings.getTreeRightToLeftInputMap(),980"Tree.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[]{"ESCAPE", "cancel"}),};981982table.putDefaults(defaults);983984Object aaTextInfo = SwingUtilities2.AATextInfo.getAATextInfo(true);985table.put(SwingUtilities2.AA_TEXT_PROPERTY_KEY, aaTextInfo);986}987988protected void initSystemColorDefaults(final UIDefaults table) {989// String[] defaultSystemColors = {990// "desktop", "#005C5C", /* Color of the desktop background */991// "activeCaption", "#000080", /* Color for captions (title bars) when they are active. */992// "activeCaptionText", "#FFFFFF", /* Text color for text in captions (title bars). */993// "activeCaptionBorder", "#C0C0C0", /* Border color for caption (title bar) window borders. */994// "inactiveCaption", "#808080", /* Color for captions (title bars) when not active. */995// "inactiveCaptionText", "#C0C0C0", /* Text color for text in inactive captions (title bars). */996// "inactiveCaptionBorder", "#C0C0C0", /* Border color for inactive caption (title bar) window borders. */997// "window", "#FFFFFF", /* Default color for the interior of windows */998// "windowBorder", "#000000", /* ??? */999// "windowText", "#000000", /* ??? */1000// "menu", "#C0C0C0", /* Background color for menus */1001// "menuText", "#000000", /* Text color for menus */1002// "text", "#C0C0C0", /* Text background color */1003// "textText", "#000000", /* Text foreground color */1004// "textHighlight", "#000080", /* Text background color when selected */1005// "textHighlightText", "#FFFFFF", /* Text color when selected */1006// "textInactiveText", "#808080", /* Text color when disabled */1007// "control", "#C0C0C0", /* Default color for controls (buttons, sliders, etc) */1008// "controlText", "#000000", /* Default color for text in controls */1009// "controlHighlight", "#C0C0C0", /* Specular highlight (opposite of the shadow) */1010// "controlLtHighlight", "#FFFFFF", /* Highlight color for controls */1011// "controlShadow", "#808080", /* Shadow color for controls */1012// "controlDkShadow", "#000000", /* Dark shadow color for controls */1013// "scrollbar", "#E0E0E0", /* Scrollbar background (usually the "track") */1014// "info", "#FFFFE1", /* ??? */1015// "infoText", "#000000" /* ??? */1016// };1017//1018// loadSystemColors(table, defaultSystemColors, isNativeLookAndFeel());1019}10201021/**1022* Initialize the uiClassID to AquaComponentUI mapping.1023* The JComponent classes define their own uiClassID constants1024* (see AbstractComponent.getUIClassID). This table must1025* map those constants to a BasicComponentUI class of the1026* appropriate type.1027*1028* @see #getDefaults1029*/1030protected void initClassDefaults(final UIDefaults table) {1031final String basicPackageName = "javax.swing.plaf.basic.";10321033final Object[] uiDefaults = {1034"ButtonUI", PKG_PREFIX + "AquaButtonUI",1035"CheckBoxUI", PKG_PREFIX + "AquaButtonCheckBoxUI",1036"CheckBoxMenuItemUI", PKG_PREFIX + "AquaMenuItemUI",1037"LabelUI", PKG_PREFIX + "AquaLabelUI",1038"ListUI", PKG_PREFIX + "AquaListUI",1039"MenuUI", PKG_PREFIX + "AquaMenuUI",1040"MenuItemUI", PKG_PREFIX + "AquaMenuItemUI",1041"OptionPaneUI", PKG_PREFIX + "AquaOptionPaneUI",1042"PanelUI", PKG_PREFIX + "AquaPanelUI",1043"RadioButtonMenuItemUI", PKG_PREFIX + "AquaMenuItemUI",1044"RadioButtonUI", PKG_PREFIX + "AquaButtonRadioUI",1045"ProgressBarUI", PKG_PREFIX + "AquaProgressBarUI",1046"RootPaneUI", PKG_PREFIX + "AquaRootPaneUI",1047"SliderUI", PKG_PREFIX + "AquaSliderUI",1048"ScrollBarUI", PKG_PREFIX + "AquaScrollBarUI",1049"TabbedPaneUI", PKG_PREFIX + (JRSUIUtils.TabbedPane.shouldUseTabbedPaneContrastUI() ? "AquaTabbedPaneContrastUI" : "AquaTabbedPaneUI"),1050"TableUI", PKG_PREFIX + "AquaTableUI",1051"ToggleButtonUI", PKG_PREFIX + "AquaButtonToggleUI",1052"ToolBarUI", PKG_PREFIX + "AquaToolBarUI",1053"ToolTipUI", PKG_PREFIX + "AquaToolTipUI",1054"TreeUI", PKG_PREFIX + "AquaTreeUI",10551056"InternalFrameUI", PKG_PREFIX + "AquaInternalFrameUI",1057"DesktopIconUI", PKG_PREFIX + "AquaInternalFrameDockIconUI",1058"DesktopPaneUI", PKG_PREFIX + "AquaInternalFramePaneUI",1059"EditorPaneUI", PKG_PREFIX + "AquaEditorPaneUI",1060"TextFieldUI", PKG_PREFIX + "AquaTextFieldUI",1061"TextPaneUI", PKG_PREFIX + "AquaTextPaneUI",1062"ComboBoxUI", PKG_PREFIX + "AquaComboBoxUI",1063"PopupMenuUI", PKG_PREFIX + "AquaPopupMenuUI",1064"TextAreaUI", PKG_PREFIX + "AquaTextAreaUI",1065"MenuBarUI", PKG_PREFIX + "AquaMenuBarUI",1066"FileChooserUI", PKG_PREFIX + "AquaFileChooserUI",1067"PasswordFieldUI", PKG_PREFIX + "AquaTextPasswordFieldUI",1068"TableHeaderUI", PKG_PREFIX + "AquaTableHeaderUI",10691070"FormattedTextFieldUI", PKG_PREFIX + "AquaTextFieldFormattedUI",10711072"SpinnerUI", PKG_PREFIX + "AquaSpinnerUI",1073"SplitPaneUI", PKG_PREFIX + "AquaSplitPaneUI",1074"ScrollPaneUI", PKG_PREFIX + "AquaScrollPaneUI",10751076"PopupMenuSeparatorUI", PKG_PREFIX + "AquaPopupMenuSeparatorUI",1077"SeparatorUI", PKG_PREFIX + "AquaPopupMenuSeparatorUI",1078"ToolBarSeparatorUI", PKG_PREFIX + "AquaToolBarSeparatorUI",10791080// as we implement aqua versions of the swing elements1081// we will aad the com.apple.laf.FooUI classes to this table.10821083"ColorChooserUI", basicPackageName + "BasicColorChooserUI",10841085// text UIs1086"ViewportUI", basicPackageName + "BasicViewportUI",1087};1088table.putDefaults(uiDefaults);1089}1090}109110921093