author | alexp |
Thu, 24 Jan 2013 15:26:40 +0400 | |
changeset 15326 | e0b5489e29a6 |
parent 14649 | 0f8154876c6a |
child 20833 | a6aa4123f21b |
permissions | -rw-r--r-- |
12047 | 1 |
/* |
2 |
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. Oracle designates this |
|
8 |
* particular file as subject to the "Classpath" exception as provided |
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
|
10 |
* |
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
24 |
*/ |
|
25 |
||
26 |
package com.apple.laf; |
|
27 |
||
28 |
import java.awt.*; |
|
29 |
import java.security.PrivilegedAction; |
|
30 |
import java.util.*; |
|
31 |
||
32 |
import javax.swing.*; |
|
33 |
import javax.swing.border.Border; |
|
34 |
import javax.swing.plaf.*; |
|
35 |
import javax.swing.plaf.basic.BasicLookAndFeel; |
|
36 |
||
37 |
import sun.swing.*; |
|
38 |
import apple.laf.*; |
|
39 |
||
40 |
import com.apple.resources.MacOSXResourceBundle; |
|
41 |
||
42 |
public class AquaLookAndFeel extends BasicLookAndFeel { |
|
43 |
static final String sOldPropertyPrefix = "com.apple.macos."; // old prefix for things like 'useScreenMenuBar' |
|
44 |
static final String sPropertyPrefix = "apple.laf."; // new prefix for things like 'useScreenMenuBar' |
|
45 |
||
46 |
// for lazy initalizers. Following the pattern from metal. |
|
47 |
private static final String PKG_PREFIX = "com.apple.laf."; |
|
48 |
private static final String kAquaImageFactoryName = PKG_PREFIX + "AquaImageFactory"; |
|
49 |
private static final String kAquaFontsName = PKG_PREFIX + "AquaFonts"; |
|
50 |
||
51 |
/** |
|
52 |
* Return a short string that identifies this look and feel, e.g. |
|
53 |
* "CDE/Motif". This string should be appropriate for a menu item. |
|
54 |
* Distinct look and feels should have different names, e.g. |
|
55 |
* a subclass of MotifLookAndFeel that changes the way a few components |
|
56 |
* are rendered should be called "CDE/Motif My Way"; something |
|
57 |
* that would be useful to a user trying to select a L&F from a list |
|
58 |
* of names. |
|
59 |
*/ |
|
60 |
public String getName() { |
|
61 |
return "Mac OS X"; |
|
62 |
} |
|
63 |
||
64 |
/** |
|
65 |
* Return a string that identifies this look and feel. This string |
|
66 |
* will be used by applications/services that want to recognize |
|
67 |
* well known look and feel implementations. Presently |
|
68 |
* the well known names are "Motif", "Windows", "Mac", "Metal". Note |
|
69 |
* that a LookAndFeel derived from a well known superclass |
|
70 |
* that doesn't make any fundamental changes to the look or feel |
|
71 |
* shouldn't override this method. |
|
72 |
*/ |
|
73 |
public String getID() { |
|
74 |
return "Aqua"; |
|
75 |
} |
|
76 |
||
77 |
/** |
|
78 |
* Return a one line description of this look and feel implementation, |
|
79 |
* e.g. "The CDE/Motif Look and Feel". This string is intended for |
|
80 |
* the user, e.g. in the title of a window or in a ToolTip message. |
|
81 |
*/ |
|
82 |
public String getDescription() { |
|
83 |
return "Aqua Look and Feel for Mac OS X"; |
|
84 |
} |
|
85 |
||
86 |
/** |
|
87 |
* Returns true if the <code>LookAndFeel</code> returned |
|
88 |
* <code>RootPaneUI</code> instances support providing Window decorations |
|
89 |
* in a <code>JRootPane</code>. |
|
90 |
* <p> |
|
91 |
* The default implementation returns false, subclasses that support |
|
92 |
* Window decorations should override this and return true. |
|
93 |
* |
|
94 |
* @return True if the RootPaneUI instances created support client side |
|
95 |
* decorations |
|
96 |
* @see JDialog#setDefaultLookAndFeelDecorated |
|
97 |
* @see JFrame#setDefaultLookAndFeelDecorated |
|
98 |
* @see JRootPane#setWindowDecorationStyle |
|
99 |
* @since 1.4 |
|
100 |
*/ |
|
101 |
public boolean getSupportsWindowDecorations() { |
|
102 |
return false; |
|
103 |
} |
|
104 |
||
105 |
/** |
|
106 |
* If the underlying platform has a "native" look and feel, and this |
|
107 |
* is an implementation of it, return true. |
|
108 |
*/ |
|
109 |
public boolean isNativeLookAndFeel() { |
|
110 |
return true; |
|
111 |
} |
|
112 |
||
113 |
/** |
|
114 |
* Return true if the underlying platform supports and or permits |
|
115 |
* this look and feel. This method returns false if the look |
|
116 |
* and feel depends on special resources or legal agreements that |
|
117 |
* aren't defined for the current platform. |
|
118 |
* |
|
119 |
* @see UIManager#setLookAndFeel |
|
120 |
*/ |
|
121 |
public boolean isSupportedLookAndFeel() { |
|
122 |
return true; |
|
123 |
} |
|
124 |
||
125 |
/** |
|
126 |
* UIManager.setLookAndFeel calls this method before the first |
|
127 |
* call (and typically the only call) to getDefaults(). Subclasses |
|
128 |
* should do any one-time setup they need here, rather than |
|
129 |
* in a static initializer, because look and feel class objects |
|
130 |
* may be loaded just to discover that isSupportedLookAndFeel() |
|
131 |
* returns false. |
|
132 |
* |
|
133 |
* @see #uninitialize |
|
134 |
* @see UIManager#setLookAndFeel |
|
135 |
*/ |
|
136 |
public void initialize() { |
|
12559
9456ceada8b1
7164376: Replace use of sun.security.action.LoadLibraryAction with System.loadLibrary
mchung
parents:
12047
diff
changeset
|
137 |
java.security.AccessController.doPrivileged(new PrivilegedAction<Void>() { |
9456ceada8b1
7164376: Replace use of sun.security.action.LoadLibraryAction with System.loadLibrary
mchung
parents:
12047
diff
changeset
|
138 |
public Void run() { |
9456ceada8b1
7164376: Replace use of sun.security.action.LoadLibraryAction with System.loadLibrary
mchung
parents:
12047
diff
changeset
|
139 |
System.loadLibrary("osxui"); |
9456ceada8b1
7164376: Replace use of sun.security.action.LoadLibraryAction with System.loadLibrary
mchung
parents:
12047
diff
changeset
|
140 |
return null; |
9456ceada8b1
7164376: Replace use of sun.security.action.LoadLibraryAction with System.loadLibrary
mchung
parents:
12047
diff
changeset
|
141 |
} |
9456ceada8b1
7164376: Replace use of sun.security.action.LoadLibraryAction with System.loadLibrary
mchung
parents:
12047
diff
changeset
|
142 |
}); |
9456ceada8b1
7164376: Replace use of sun.security.action.LoadLibraryAction with System.loadLibrary
mchung
parents:
12047
diff
changeset
|
143 |
|
9456ceada8b1
7164376: Replace use of sun.security.action.LoadLibraryAction with System.loadLibrary
mchung
parents:
12047
diff
changeset
|
144 |
java.security.AccessController.doPrivileged(new PrivilegedAction<Void>(){ |
12047 | 145 |
@Override |
12559
9456ceada8b1
7164376: Replace use of sun.security.action.LoadLibraryAction with System.loadLibrary
mchung
parents:
12047
diff
changeset
|
146 |
public Void run() { |
12047 | 147 |
JRSUIControl.initJRSUI(); |
148 |
return null; |
|
149 |
} |
|
150 |
}); |
|
151 |
||
152 |
super.initialize(); |
|
153 |
final ScreenPopupFactory spf = new ScreenPopupFactory(); |
|
154 |
spf.setActive(true); |
|
155 |
PopupFactory.setSharedInstance(spf); |
|
156 |
||
157 |
KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventPostProcessor(AquaMnemonicHandler.getInstance()); |
|
158 |
} |
|
159 |
||
160 |
/** |
|
161 |
* UIManager.setLookAndFeel calls this method just before we're |
|
162 |
* replaced by a new default look and feel. Subclasses may |
|
163 |
* choose to free up some resources here. |
|
164 |
* |
|
165 |
* @see #initialize |
|
166 |
*/ |
|
167 |
public void uninitialize() { |
|
168 |
KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventPostProcessor(AquaMnemonicHandler.getInstance()); |
|
169 |
||
170 |
final PopupFactory popupFactory = PopupFactory.getSharedInstance(); |
|
171 |
if (popupFactory != null && popupFactory instanceof ScreenPopupFactory) { |
|
172 |
((ScreenPopupFactory)popupFactory).setActive(false); |
|
173 |
} |
|
174 |
||
175 |
super.uninitialize(); |
|
176 |
} |
|
177 |
||
178 |
/** |
|
179 |
* Returns an <code>ActionMap</code>. |
|
180 |
* <P> |
|
181 |
* This <code>ActionMap</code> contains <code>Actions</code> that |
|
182 |
* embody the ability to render an auditory cue. These auditory |
|
183 |
* cues map onto user and system activities that may be useful |
|
184 |
* for an end user to know about (such as a dialog box appearing). |
|
185 |
* <P> |
|
186 |
* At the appropriate time in a <code>JComponent</code> UI's lifecycle, |
|
187 |
* the ComponentUI is responsible for getting the appropriate |
|
188 |
* <code>Action</code> out of the <code>ActionMap</code> and passing |
|
189 |
* it on to <code>playSound</code>. |
|
190 |
* <P> |
|
191 |
* The <code>Actions</code> in this <code>ActionMap</code> are |
|
192 |
* created by the <code>createAudioAction</code> method. |
|
193 |
* |
|
194 |
* @return an ActionMap containing Actions |
|
195 |
* responsible for rendering auditory cues |
|
196 |
* @see #createAudioAction |
|
197 |
* @see #playSound(Action) |
|
198 |
* @since 1.4 |
|
199 |
*/ |
|
200 |
protected ActionMap getAudioActionMap() { |
|
201 |
ActionMap audioActionMap = (ActionMap)UIManager.get("AuditoryCues.actionMap"); |
|
202 |
if (audioActionMap != null) return audioActionMap; |
|
203 |
||
204 |
final Object[] acList = (Object[])UIManager.get("AuditoryCues.cueList"); |
|
205 |
if (acList != null) { |
|
206 |
audioActionMap = new ActionMapUIResource(); |
|
207 |
for (int counter = acList.length - 1; counter >= 0; counter--) { |
|
208 |
audioActionMap.put(acList[counter], createAudioAction(acList[counter])); |
|
209 |
} |
|
210 |
} |
|
211 |
UIManager.getLookAndFeelDefaults().put("AuditoryCues.actionMap", audioActionMap); |
|
212 |
||
213 |
return audioActionMap; |
|
214 |
} |
|
215 |
||
216 |
/** |
|
217 |
* We override getDefaults() so we can install our own debug defaults |
|
218 |
* if needed for testing |
|
219 |
*/ |
|
220 |
public UIDefaults getDefaults() { |
|
221 |
final UIDefaults table = new UIDefaults(); |
|
222 |
// use debug defaults if you want to see every query into the defaults object. |
|
223 |
//UIDefaults table = new DebugDefaults(); |
|
224 |
try { |
|
225 |
// PopupFactory.getSharedInstance().setPopupType(2); |
|
226 |
initClassDefaults(table); |
|
227 |
||
228 |
// Here we install all the Basic defaults in case we missed some in our System color |
|
229 |
// or component defaults that follow. Eventually we will take this out. |
|
230 |
// This is a big negative to performance so we want to get it out as soon |
|
231 |
// as we are comfortable with the Aqua defaults. |
|
232 |
super.initSystemColorDefaults(table); |
|
233 |
super.initComponentDefaults(table); |
|
234 |
||
235 |
// Because the last elements added win in precedence we add all of our aqua elements here. |
|
236 |
initSystemColorDefaults(table); |
|
237 |
initComponentDefaults(table); |
|
238 |
} catch(final Exception e) { |
|
239 |
e.printStackTrace(); |
|
240 |
} |
|
241 |
return table; |
|
242 |
} |
|
243 |
||
244 |
/** |
|
245 |
* Initialize the defaults table with the name of the ResourceBundle |
|
246 |
* used for getting localized defaults. Also initialize the default |
|
247 |
* locale used when no locale is passed into UIDefaults.get(). The |
|
248 |
* default locale should generally not be relied upon. It is here for |
|
249 |
* compatability with releases prior to 1.4. |
|
250 |
*/ |
|
251 |
private void initResourceBundle(final UIDefaults table) { |
|
252 |
table.setDefaultLocale(Locale.getDefault()); |
|
12656
6028fff5b8f7
7158928: [macosx] NLS: Please change the mnemonic assignment system
alexsch
parents:
12559
diff
changeset
|
253 |
table.addResourceBundle(PKG_PREFIX + "resources.aqua"); |
12047 | 254 |
try { |
255 |
final ResourceBundle aquaProperties = MacOSXResourceBundle.getMacResourceBundle(PKG_PREFIX + "resources.aqua"); |
|
256 |
final Enumeration<String> propertyKeys = aquaProperties.getKeys(); |
|
257 |
||
258 |
while (propertyKeys.hasMoreElements()) { |
|
259 |
final String key = propertyKeys.nextElement(); |
|
260 |
table.put(key, aquaProperties.getString(key)); |
|
261 |
} |
|
262 |
} catch (final Exception e) { |
|
263 |
} |
|
264 |
} |
|
265 |
||
266 |
/** |
|
267 |
* This is the last step in the getDefaults routine usually called from our superclass |
|
268 |
*/ |
|
269 |
protected void initComponentDefaults(final UIDefaults table) { |
|
270 |
initResourceBundle(table); |
|
271 |
||
272 |
final InsetsUIResource zeroInsets = new InsetsUIResource(0, 0, 0, 0); |
|
273 |
final InsetsUIResource menuItemMargin = zeroInsets; |
|
274 |
||
275 |
// <rdar://problem/5189013> Entire Java application window refreshes when moving off Shortcut menu item |
|
276 |
final Boolean useOpaqueComponents = Boolean.TRUE; |
|
277 |
||
278 |
final Boolean buttonShouldBeOpaque = AquaUtils.shouldUseOpaqueButtons() ? Boolean.TRUE : Boolean.FALSE; |
|
279 |
||
280 |
// *** List value objects |
|
281 |
final Object listCellRendererActiveValue = new UIDefaults.ActiveValue(){ |
|
282 |
public Object createValue(UIDefaults defaultsTable) { |
|
283 |
return new DefaultListCellRenderer.UIResource(); |
|
284 |
} |
|
285 |
}; |
|
286 |
||
287 |
// SJA - I'm basing this on what is in the MetalLookAndFeel class, but |
|
288 |
// without being based on BasicLookAndFeel. We want more flexibility. |
|
289 |
// The key to doing this well is to use Lazy initializing classes as |
|
290 |
// much as possible. |
|
291 |
||
292 |
// Here I want to go to native and get all the values we'd need for colors etc. |
|
293 |
final Border toolTipBorder = new BorderUIResource.EmptyBorderUIResource(2, 0, 2, 0); |
|
294 |
final ColorUIResource toolTipBackground = new ColorUIResource(255, 255, (int)(255.0 * 0.80)); |
|
295 |
final ColorUIResource black = new ColorUIResource(Color.black); |
|
296 |
final ColorUIResource white = new ColorUIResource(Color.white); |
|
297 |
final ColorUIResource smokyGlass = new ColorUIResource(new Color(0, 0, 0, 152)); |
|
298 |
final ColorUIResource dockIconRim = new ColorUIResource(new Color(192, 192, 192, 192)); |
|
299 |
final ColorUIResource mediumTranslucentBlack = new ColorUIResource(new Color(0, 0, 0, 100)); |
|
300 |
final ColorUIResource translucentWhite = new ColorUIResource(new Color(255, 255, 255, 254)); |
|
301 |
// final ColorUIResource lightGray = new ColorUIResource(232, 232, 232); |
|
302 |
final ColorUIResource disabled = new ColorUIResource(0.5f, 0.5f, 0.5f); |
|
303 |
final ColorUIResource disabledShadow = new ColorUIResource(0.25f, 0.25f, 0.25f); |
|
304 |
final ColorUIResource selected = new ColorUIResource(1.0f, 0.4f, 0.4f); |
|
305 |
||
306 |
// Contrast tab UI colors |
|
307 |
||
308 |
final ColorUIResource selectedTabTitlePressedColor = new ColorUIResource(240, 240, 240); |
|
309 |
final ColorUIResource selectedTabTitleDisabledColor = new ColorUIResource(new Color(1, 1, 1, 0.55f)); |
|
310 |
final ColorUIResource selectedTabTitleNormalColor = white; |
|
311 |
final ColorUIResource selectedTabTitleShadowDisabledColor = new ColorUIResource(new Color(0, 0, 0, 0.25f)); |
|
312 |
final ColorUIResource selectedTabTitleShadowNormalColor = mediumTranslucentBlack; |
|
313 |
final ColorUIResource nonSelectedTabTitleNormalColor = black; |
|
314 |
||
315 |
final ColorUIResource toolbarDragHandleColor = new ColorUIResource(140, 140, 140); |
|
316 |
||
317 |
// sja todo Make these lazy values so we only get them when required - if we deem it necessary |
|
318 |
// it may be the case that we think the overhead of a proxy lazy value is not worth delaying |
|
319 |
// creating the object if we think that most swing apps will use this. |
|
320 |
// the lazy value is useful for delaying initialization until this default value is actually |
|
321 |
// accessed by the LAF instead of at init time, so making it lazy should speed up |
|
322 |
// our launch times of Swing apps. |
|
323 |
||
324 |
// *** Text value objects |
|
325 |
final Object marginBorder = new SwingLazyValue("javax.swing.plaf.basic.BasicBorders$MarginBorder"); |
|
326 |
||
327 |
final Object zero = new Integer(0); |
|
328 |
final Object editorMargin = zeroInsets; // this is not correct - look at TextEdit to determine the right margin |
|
329 |
final Object textCaretBlinkRate = new Integer(500); |
|
330 |
final Object textFieldBorder = new SwingLazyValue(PKG_PREFIX + "AquaTextFieldBorder", "getTextFieldBorder"); |
|
331 |
final Object textAreaBorder = marginBorder; // text areas have no real border - radar 311073 |
|
332 |
||
333 |
final Object scollListBorder = new SwingLazyValue(PKG_PREFIX + "AquaScrollRegionBorder", "getScrollRegionBorder"); |
|
334 |
final Object aquaTitledBorder = new SwingLazyValue(PKG_PREFIX + "AquaGroupBorder", "getBorderForTitledBorder"); |
|
335 |
final Object aquaInsetBorder = new SwingLazyValue(PKG_PREFIX + "AquaGroupBorder", "getTitlelessBorder"); |
|
336 |
||
337 |
final Border listHeaderBorder = AquaTableHeaderBorder.getListHeaderBorder(); |
|
338 |
final Border zeroBorder = new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0); |
|
339 |
||
340 |
// we can't seem to proxy Colors |
|
341 |
final Color selectionBackground = AquaImageFactory.getSelectionBackgroundColorUIResource(); |
|
342 |
final Color selectionForeground = AquaImageFactory.getSelectionForegroundColorUIResource(); |
|
343 |
final Color selectionInactiveBackground = AquaImageFactory.getSelectionInactiveBackgroundColorUIResource(); |
|
344 |
final Color selectionInactiveForeground = AquaImageFactory.getSelectionInactiveForegroundColorUIResource(); |
|
345 |
||
346 |
final Color textHighlightText = AquaImageFactory.getTextSelectionForegroundColorUIResource(); |
|
347 |
final Color textHighlight = AquaImageFactory.getTextSelectionBackgroundColorUIResource(); |
|
348 |
final Color textHighlightInactive = new ColorUIResource(212, 212, 212); |
|
349 |
||
350 |
final Color textInactiveText = disabled; |
|
351 |
final Color textForeground = black; |
|
352 |
final Color textBackground = white; |
|
353 |
final Color textInactiveBackground = white; |
|
354 |
||
355 |
final Color textPasswordFieldCapsLockIconColor = mediumTranslucentBlack; |
|
356 |
||
357 |
final Object internalFrameBorder = new SwingLazyValue("javax.swing.plaf.basic.BasicBorders", "getInternalFrameBorder"); |
|
358 |
final Color desktopBackgroundColor = new ColorUIResource(new Color(65, 105, 170));//SystemColor.desktop |
|
359 |
||
360 |
final Color focusRingColor = AquaImageFactory.getFocusRingColorUIResource(); |
|
361 |
final Border focusCellHighlightBorder = new BorderUIResource.LineBorderUIResource(focusRingColor); |
|
362 |
||
363 |
final Color windowBackgroundColor = AquaImageFactory.getWindowBackgroundColorUIResource(); |
|
364 |
final Color panelBackgroundColor = windowBackgroundColor; |
|
365 |
final Color tabBackgroundColor = windowBackgroundColor; |
|
366 |
final Color controlBackgroundColor = windowBackgroundColor; |
|
367 |
||
368 |
final Object controlFont = new SwingLazyValue(kAquaFontsName, "getControlTextFont"); |
|
369 |
final Object controlSmallFont = new SwingLazyValue(kAquaFontsName, "getControlTextSmallFont"); |
|
370 |
final Object alertHeaderFont = new SwingLazyValue(kAquaFontsName, "getAlertHeaderFont"); |
|
371 |
final Object menuFont = new SwingLazyValue(kAquaFontsName, "getMenuFont"); |
|
372 |
final Object viewFont = new SwingLazyValue(kAquaFontsName, "getViewFont"); |
|
373 |
||
374 |
final Color menuBackgroundColor = new ColorUIResource(Color.white); |
|
375 |
final Color menuForegroundColor = black; |
|
376 |
||
377 |
final Color menuSelectedForegroundColor = white; |
|
378 |
final Color menuSelectedBackgroundColor = focusRingColor; |
|
379 |
||
380 |
final Color menuDisabledBackgroundColor = menuBackgroundColor; |
|
381 |
final Color menuDisabledForegroundColor = disabled; |
|
382 |
||
383 |
final Color menuAccelForegroundColor = black; |
|
384 |
final Color menuAccelSelectionForegroundColor = black; |
|
385 |
||
386 |
final Border menuBorder = new AquaMenuBorder(); |
|
387 |
||
388 |
final UIDefaults.LazyInputMap controlFocusInputMap = new UIDefaults.LazyInputMap(new Object[]{ |
|
389 |
"SPACE", "pressed", |
|
390 |
"released SPACE", "released" |
|
391 |
}); |
|
392 |
||
393 |
// sja testing |
|
394 |
final Object confirmIcon = new SwingLazyValue(kAquaImageFactoryName, "getConfirmImageIcon"); // AquaImageFactory.getConfirmImageIcon(); |
|
395 |
final Object cautionIcon = new SwingLazyValue(kAquaImageFactoryName, "getCautionImageIcon"); // AquaImageFactory.getCautionImageIcon(); |
|
396 |
final Object stopIcon = new SwingLazyValue(kAquaImageFactoryName, "getStopImageIcon"); // AquaImageFactory.getStopImageIcon(); |
|
397 |
final Object securityIcon = new SwingLazyValue(kAquaImageFactoryName, "getLockImageIcon"); // AquaImageFactory.getLockImageIcon(); |
|
398 |
||
399 |
final AquaKeyBindings aquaKeyBindings = AquaKeyBindings.instance(); |
|
400 |
||
401 |
final Object[] defaults = { |
|
402 |
"control", windowBackgroundColor, /* Default color for controls (buttons, sliders, etc) */ |
|
403 |
||
404 |
// Buttons |
|
405 |
"Button.background", controlBackgroundColor, |
|
406 |
"Button.foreground", black, |
|
407 |
"Button.disabledText", disabled, |
|
408 |
"Button.select", selected, |
|
409 |
"Button.border", new SwingLazyValue(PKG_PREFIX + "AquaButtonBorder", "getDynamicButtonBorder"), |
|
410 |
"Button.font", controlFont, |
|
411 |
"Button.textIconGap", new Integer(4), |
|
412 |
"Button.textShiftOffset", zero, // radar 3308129 - aqua doesn't move images when pressed. |
|
413 |
"Button.focusInputMap", controlFocusInputMap, |
|
414 |
"Button.margin", new InsetsUIResource(0, 2, 0, 2), |
|
415 |
"Button.opaque", buttonShouldBeOpaque, |
|
416 |
||
417 |
"CheckBox.background", controlBackgroundColor, |
|
418 |
"CheckBox.foreground", black, |
|
419 |
"CheckBox.disabledText", disabled, |
|
420 |
"CheckBox.select", selected, |
|
421 |
"CheckBox.icon", new SwingLazyValue(PKG_PREFIX + "AquaButtonCheckBoxUI", "getSizingCheckBoxIcon"), |
|
422 |
"CheckBox.font", controlFont, |
|
423 |
"CheckBox.border", AquaButtonBorder.getBevelButtonBorder(), |
|
424 |
"CheckBox.margin", new InsetsUIResource(1, 1, 0, 1), |
|
425 |
// radar 3583849. This property never gets |
|
426 |
// used. The border for the Checkbox gets overridden |
|
427 |
// by AquaRadiButtonUI.setThemeBorder(). Needs refactoring. (vm) |
|
428 |
// why is button focus commented out? |
|
429 |
//"CheckBox.focus", getFocusColor(), |
|
430 |
"CheckBox.focusInputMap", controlFocusInputMap, |
|
431 |
||
432 |
"CheckBoxMenuItem.font", menuFont, |
|
433 |
"CheckBoxMenuItem.acceleratorFont", menuFont, |
|
434 |
"CheckBoxMenuItem.background", menuBackgroundColor, |
|
435 |
"CheckBoxMenuItem.foreground", menuForegroundColor, |
|
436 |
"CheckBoxMenuItem.selectionBackground", menuSelectedBackgroundColor, |
|
437 |
"CheckBoxMenuItem.selectionForeground", menuSelectedForegroundColor, |
|
438 |
"CheckBoxMenuItem.disabledBackground", menuDisabledBackgroundColor, |
|
439 |
"CheckBoxMenuItem.disabledForeground", menuDisabledForegroundColor, |
|
440 |
"CheckBoxMenuItem.acceleratorForeground", menuAccelForegroundColor, |
|
441 |
"CheckBoxMenuItem.acceleratorSelectionForeground", menuAccelSelectionForegroundColor, |
|
442 |
"CheckBoxMenuItem.acceleratorDelimiter", "", |
|
443 |
"CheckBoxMenuItem.border", menuBorder, // for inset calculation |
|
444 |
"CheckBoxMenuItem.margin", menuItemMargin, |
|
445 |
"CheckBoxMenuItem.borderPainted", Boolean.TRUE, |
|
446 |
"CheckBoxMenuItem.checkIcon", new SwingLazyValue(kAquaImageFactoryName, "getMenuItemCheckIcon"), |
|
447 |
"CheckBoxMenuItem.dashIcon", new SwingLazyValue(kAquaImageFactoryName, "getMenuItemDashIcon"), |
|
448 |
//"CheckBoxMenuItem.arrowIcon", null, |
|
449 |
||
450 |
"ColorChooser.background", panelBackgroundColor, |
|
451 |
||
452 |
// *** ComboBox |
|
453 |
"ComboBox.font", controlFont, |
|
454 |
"ComboBox.background", controlBackgroundColor, //menuBackgroundColor, // "menu" when it has no scrollbar, "listView" when it does |
|
455 |
"ComboBox.foreground", menuForegroundColor, |
|
456 |
"ComboBox.selectionBackground", menuSelectedBackgroundColor, |
|
457 |
"ComboBox.selectionForeground", menuSelectedForegroundColor, |
|
458 |
"ComboBox.disabledBackground", menuDisabledBackgroundColor, |
|
459 |
"ComboBox.disabledForeground", menuDisabledForegroundColor, |
|
460 |
"ComboBox.ancestorInputMap", aquaKeyBindings.getComboBoxInputMap(), |
|
461 |
||
462 |
"DesktopIcon.border", internalFrameBorder, |
|
463 |
"DesktopIcon.borderColor", smokyGlass, |
|
464 |
"DesktopIcon.borderRimColor", dockIconRim, |
|
465 |
"DesktopIcon.labelBackground", mediumTranslucentBlack, |
|
466 |
"Desktop.background", desktopBackgroundColor, |
|
467 |
||
468 |
"EditorPane.focusInputMap", aquaKeyBindings.getMultiLineTextInputMap(), |
|
469 |
"EditorPane.font", controlFont, |
|
470 |
"EditorPane.background", textBackground, |
|
471 |
"EditorPane.foreground", textForeground, |
|
472 |
"EditorPane.selectionBackground", textHighlight, |
|
473 |
"EditorPane.selectionForeground", textHighlightText, |
|
474 |
"EditorPane.caretForeground", textForeground, |
|
475 |
"EditorPane.caretBlinkRate", textCaretBlinkRate, |
|
476 |
"EditorPane.inactiveForeground", textInactiveText, |
|
477 |
"EditorPane.inactiveBackground", textInactiveBackground, |
|
478 |
"EditorPane.border", textAreaBorder, |
|
479 |
"EditorPane.margin", editorMargin, |
|
480 |
||
481 |
"FileChooser.newFolderIcon", AquaIcon.SystemIcon.getFolderIconUIResource(), |
|
482 |
"FileChooser.upFolderIcon", AquaIcon.SystemIcon.getFolderIconUIResource(), |
|
483 |
"FileChooser.homeFolderIcon", AquaIcon.SystemIcon.getDesktopIconUIResource(), |
|
484 |
"FileChooser.detailsViewIcon", AquaIcon.SystemIcon.getComputerIconUIResource(), |
|
485 |
"FileChooser.listViewIcon", AquaIcon.SystemIcon.getComputerIconUIResource(), |
|
486 |
||
487 |
"FileView.directoryIcon", AquaIcon.SystemIcon.getFolderIconUIResource(), |
|
488 |
"FileView.fileIcon", AquaIcon.SystemIcon.getDocumentIconUIResource(), |
|
489 |
"FileView.computerIcon", AquaIcon.SystemIcon.getDesktopIconUIResource(), |
|
490 |
"FileView.hardDriveIcon", AquaIcon.SystemIcon.getHardDriveIconUIResource(), |
|
491 |
"FileView.floppyDriveIcon", AquaIcon.SystemIcon.getFloppyIconUIResource(), |
|
492 |
||
493 |
// File View |
|
494 |
"FileChooser.cancelButtonMnemonic", zero, |
|
495 |
"FileChooser.saveButtonMnemonic", zero, |
|
496 |
"FileChooser.openButtonMnemonic", zero, |
|
497 |
"FileChooser.updateButtonMnemonic", zero, |
|
498 |
"FileChooser.helpButtonMnemonic", zero, |
|
499 |
"FileChooser.directoryOpenButtonMnemonic", zero, |
|
500 |
||
501 |
"FileChooser.lookInLabelMnemonic", zero, |
|
502 |
"FileChooser.fileNameLabelMnemonic", zero, |
|
503 |
"FileChooser.filesOfTypeLabelMnemonic", zero, |
|
504 |
||
505 |
"Focus.color", focusRingColor, |
|
506 |
||
507 |
"FormattedTextField.focusInputMap", aquaKeyBindings.getFormattedTextFieldInputMap(), |
|
508 |
"FormattedTextField.font", controlFont, |
|
509 |
"FormattedTextField.background", textBackground, |
|
510 |
"FormattedTextField.foreground", textForeground, |
|
511 |
"FormattedTextField.inactiveForeground", textInactiveText, |
|
512 |
"FormattedTextField.inactiveBackground", textInactiveBackground, |
|
513 |
"FormattedTextField.selectionBackground", textHighlight, |
|
514 |
"FormattedTextField.selectionForeground", textHighlightText, |
|
515 |
"FormattedTextField.caretForeground", textForeground, |
|
516 |
"FormattedTextField.caretBlinkRate", textCaretBlinkRate, |
|
517 |
"FormattedTextField.border", textFieldBorder, |
|
518 |
"FormattedTextField.margin", zeroInsets, |
|
519 |
||
520 |
"IconButton.font", controlSmallFont, |
|
521 |
||
522 |
"InternalFrame.titleFont", menuFont, |
|
523 |
"InternalFrame.background", windowBackgroundColor, |
|
524 |
"InternalFrame.borderColor", windowBackgroundColor, |
|
525 |
"InternalFrame.borderShadow", Color.red, |
|
526 |
"InternalFrame.borderDarkShadow", Color.green, |
|
527 |
"InternalFrame.borderHighlight", Color.blue, |
|
528 |
"InternalFrame.borderLight", Color.yellow, |
|
529 |
"InternalFrame.opaque", Boolean.FALSE, |
|
530 |
"InternalFrame.border", null, //internalFrameBorder, |
|
531 |
"InternalFrame.icon", null, |
|
532 |
||
533 |
"InternalFrame.paletteBorder", null,//internalFrameBorder, |
|
534 |
"InternalFrame.paletteTitleFont", menuFont, |
|
535 |
"InternalFrame.paletteBackground", windowBackgroundColor, |
|
536 |
||
537 |
"InternalFrame.optionDialogBorder", null,//internalFrameBorder, |
|
538 |
"InternalFrame.optionDialogTitleFont", menuFont, |
|
539 |
"InternalFrame.optionDialogBackground", windowBackgroundColor, |
|
540 |
||
541 |
/* Default frame icons are undefined for Basic. */ |
|
542 |
||
543 |
"InternalFrame.closeIcon", new SwingLazyValue(PKG_PREFIX + "AquaInternalFrameUI", "exportCloseIcon"), |
|
544 |
"InternalFrame.maximizeIcon", new SwingLazyValue(PKG_PREFIX + "AquaInternalFrameUI", "exportZoomIcon"), |
|
545 |
"InternalFrame.iconifyIcon", new SwingLazyValue(PKG_PREFIX + "AquaInternalFrameUI", "exportMinimizeIcon"), |
|
546 |
"InternalFrame.minimizeIcon", new SwingLazyValue(PKG_PREFIX + "AquaInternalFrameUI", "exportMinimizeIcon"), |
|
547 |
// this could be either grow or icon |
|
548 |
// we decided to make it icon so that anyone who uses |
|
549 |
// these for ui will have different icons for max and min |
|
550 |
// these icons are pretty crappy to use in Mac OS X since |
|
551 |
// they really are interactive but we have to return a static |
|
552 |
// icon for now. |
|
553 |
||
554 |
// InternalFrame Auditory Cue Mappings |
|
555 |
"InternalFrame.closeSound", null, |
|
556 |
"InternalFrame.maximizeSound", null, |
|
557 |
"InternalFrame.minimizeSound", null, |
|
558 |
"InternalFrame.restoreDownSound", null, |
|
559 |
"InternalFrame.restoreUpSound", null, |
|
560 |
||
561 |
"InternalFrame.activeTitleBackground", windowBackgroundColor, |
|
562 |
"InternalFrame.activeTitleForeground", textForeground, |
|
563 |
"InternalFrame.inactiveTitleBackground", windowBackgroundColor, |
|
564 |
"InternalFrame.inactiveTitleForeground", textInactiveText, |
|
565 |
"InternalFrame.windowBindings", new Object[]{ |
|
566 |
"shift ESCAPE", "showSystemMenu", |
|
567 |
"ctrl SPACE", "showSystemMenu", |
|
568 |
"ESCAPE", "hideSystemMenu" |
|
569 |
}, |
|
570 |
||
571 |
// Radar [3543438]. We now define the TitledBorder properties for font and color. |
|
572 |
// Aqua HIG doesn't define TitledBorders as Swing does. Eventually, we might want to |
|
573 |
// re-think TitledBorder to behave more like a Box (NSBox). (vm) |
|
574 |
"TitledBorder.font", controlFont, |
|
575 |
"TitledBorder.titleColor", black, |
|
576 |
// "TitledBorder.border", -- we inherit this property from BasicLookAndFeel (etched border) |
|
577 |
"TitledBorder.aquaVariant", aquaTitledBorder, // this is the border that matches what aqua really looks like |
|
578 |
"InsetBorder.aquaVariant", aquaInsetBorder, // this is the title-less variant |
|
579 |
||
580 |
// *** Label |
|
581 |
"Label.font", controlFont, // themeLabelFont is for small things like ToolbarButtons |
|
582 |
"Label.background", controlBackgroundColor, |
|
583 |
"Label.foreground", black, |
|
584 |
"Label.disabledForeground", disabled, |
|
585 |
"Label.disabledShadow", disabledShadow, |
|
586 |
"Label.opaque", useOpaqueComponents, |
|
587 |
"Label.border", null, |
|
588 |
||
589 |
"List.font", viewFont, // [3577901] Aqua HIG says "default font of text in lists and tables" should be 12 point (vm). |
|
590 |
"List.background", white, |
|
591 |
"List.foreground", black, |
|
592 |
"List.selectionBackground", selectionBackground, |
|
593 |
"List.selectionForeground", selectionForeground, |
|
594 |
"List.selectionInactiveBackground", selectionInactiveBackground, |
|
595 |
"List.selectionInactiveForeground", selectionInactiveForeground, |
|
596 |
"List.focusCellHighlightBorder", focusCellHighlightBorder, |
|
597 |
"List.border", null, |
|
598 |
"List.cellRenderer", listCellRendererActiveValue, |
|
599 |
||
600 |
"List.sourceListBackgroundPainter", new SwingLazyValue(PKG_PREFIX + "AquaListUI", "getSourceListBackgroundPainter"), |
|
601 |
"List.sourceListSelectionBackgroundPainter", new SwingLazyValue(PKG_PREFIX + "AquaListUI", "getSourceListSelectionBackgroundPainter"), |
|
602 |
"List.sourceListFocusedSelectionBackgroundPainter", new SwingLazyValue(PKG_PREFIX + "AquaListUI", "getSourceListFocusedSelectionBackgroundPainter"), |
|
603 |
"List.evenRowBackgroundPainter", new SwingLazyValue(PKG_PREFIX + "AquaListUI", "getListEvenBackgroundPainter"), |
|
604 |
"List.oddRowBackgroundPainter", new SwingLazyValue(PKG_PREFIX + "AquaListUI", "getListOddBackgroundPainter"), |
|
605 |
||
606 |
// <rdar://Problem/3743210> The modifier for the Mac is meta, not control. |
|
607 |
"List.focusInputMap", aquaKeyBindings.getListInputMap(), |
|
608 |
||
609 |
//"List.scrollPaneBorder", listBoxBorder, // Not used in Swing1.1 |
|
610 |
//"ListItem.border", ThemeMenu.listItemBorder(), // for inset calculation |
|
611 |
||
612 |
// *** Menus |
|
613 |
"Menu.font", menuFont, |
|
614 |
"Menu.acceleratorFont", menuFont, |
|
615 |
"Menu.background", menuBackgroundColor, |
|
616 |
"Menu.foreground", menuForegroundColor, |
|
617 |
"Menu.selectionBackground", menuSelectedBackgroundColor, |
|
618 |
"Menu.selectionForeground", menuSelectedForegroundColor, |
|
619 |
"Menu.disabledBackground", menuDisabledBackgroundColor, |
|
620 |
"Menu.disabledForeground", menuDisabledForegroundColor, |
|
621 |
"Menu.acceleratorForeground", menuAccelForegroundColor, |
|
622 |
"Menu.acceleratorSelectionForeground", menuAccelSelectionForegroundColor, |
|
623 |
//"Menu.border", ThemeMenu.menuItemBorder(), // for inset calculation |
|
624 |
"Menu.border", menuBorder, |
|
625 |
"Menu.borderPainted", Boolean.FALSE, |
|
626 |
"Menu.margin", menuItemMargin, |
|
627 |
//"Menu.checkIcon", emptyCheckIcon, // A non-drawing GlyphIcon to make the spacing consistent |
|
628 |
"Menu.arrowIcon", new SwingLazyValue(kAquaImageFactoryName, "getMenuArrowIcon"), |
|
629 |
"Menu.consumesTabs", Boolean.TRUE, |
|
630 |
"Menu.menuPopupOffsetY", new Integer(1), |
|
631 |
"Menu.submenuPopupOffsetY", new Integer(-4), |
|
632 |
||
633 |
"MenuBar.font", menuFont, |
|
634 |
"MenuBar.background", menuBackgroundColor, // not a menu item, not selected |
|
635 |
"MenuBar.foreground", menuForegroundColor, |
|
636 |
"MenuBar.border", new AquaMenuBarBorder(), // sja make lazy! |
|
637 |
"MenuBar.margin", new InsetsUIResource(0, 8, 0, 8), // sja make lazy! |
|
638 |
"MenuBar.selectionBackground", menuSelectedBackgroundColor, // not a menu item, is selected |
|
639 |
"MenuBar.selectionForeground", menuSelectedForegroundColor, |
|
640 |
"MenuBar.disabledBackground", menuDisabledBackgroundColor, //ThemeBrush.GetThemeBrushForMenu(false, false), // not a menu item, not selected |
|
641 |
"MenuBar.disabledForeground", menuDisabledForegroundColor, |
|
642 |
"MenuBar.backgroundPainter", new SwingLazyValue(PKG_PREFIX + "AquaMenuPainter", "getMenuBarPainter"), |
|
643 |
"MenuBar.selectedBackgroundPainter", new SwingLazyValue(PKG_PREFIX + "AquaMenuPainter", "getSelectedMenuBarItemPainter"), |
|
644 |
||
645 |
"MenuItem.font", menuFont, |
|
646 |
"MenuItem.acceleratorFont", menuFont, |
|
647 |
"MenuItem.background", menuBackgroundColor, |
|
648 |
"MenuItem.foreground", menuForegroundColor, |
|
649 |
"MenuItem.selectionBackground", menuSelectedBackgroundColor, |
|
650 |
"MenuItem.selectionForeground", menuSelectedForegroundColor, |
|
651 |
"MenuItem.disabledBackground", menuDisabledBackgroundColor, |
|
652 |
"MenuItem.disabledForeground", menuDisabledForegroundColor, |
|
653 |
"MenuItem.acceleratorForeground", menuAccelForegroundColor, |
|
654 |
"MenuItem.acceleratorSelectionForeground", menuAccelSelectionForegroundColor, |
|
655 |
"MenuItem.acceleratorDelimiter", "", |
|
656 |
"MenuItem.border", menuBorder, |
|
657 |
"MenuItem.margin", menuItemMargin, |
|
658 |
"MenuItem.borderPainted", Boolean.TRUE, |
|
659 |
//"MenuItem.checkIcon", emptyCheckIcon, // A non-drawing GlyphIcon to make the spacing consistent |
|
660 |
//"MenuItem.arrowIcon", null, |
|
661 |
"MenuItem.selectedBackgroundPainter", new SwingLazyValue(PKG_PREFIX + "AquaMenuPainter", "getSelectedMenuItemPainter"), |
|
662 |
||
663 |
// *** OptionPane |
|
664 |
// You can additionaly define OptionPane.messageFont which will |
|
665 |
// dictate the fonts used for the message, and |
|
666 |
// OptionPane.buttonFont, which defines the font for the buttons. |
|
667 |
"OptionPane.font", alertHeaderFont, |
|
668 |
"OptionPane.messageFont", controlFont, |
|
669 |
"OptionPane.buttonFont", controlFont, |
|
670 |
"OptionPane.background", windowBackgroundColor, |
|
671 |
"OptionPane.foreground", black, |
|
672 |
"OptionPane.messageForeground", black, |
|
673 |
"OptionPane.border", new BorderUIResource.EmptyBorderUIResource(12, 21, 17, 21), |
|
674 |
"OptionPane.messageAreaBorder", zeroBorder, |
|
675 |
"OptionPane.buttonAreaBorder", new BorderUIResource.EmptyBorderUIResource(13, 0, 0, 0), |
|
676 |
"OptionPane.minimumSize", new DimensionUIResource(262, 90), |
|
677 |
||
678 |
"OptionPane.errorIcon", stopIcon, |
|
679 |
"OptionPane.informationIcon", confirmIcon, |
|
680 |
"OptionPane.warningIcon", cautionIcon, |
|
681 |
"OptionPane.questionIcon", confirmIcon, |
|
682 |
"_SecurityDecisionIcon", securityIcon, |
|
683 |
"OptionPane.windowBindings", new Object[]{"ESCAPE", "close"}, |
|
684 |
// OptionPane Auditory Cue Mappings |
|
685 |
"OptionPane.errorSound", null, |
|
686 |
"OptionPane.informationSound", null, // Info and Plain |
|
687 |
"OptionPane.questionSound", null, |
|
688 |
"OptionPane.warningSound", null, |
|
689 |
"OptionPane.buttonClickThreshhold", new Integer(500), |
|
690 |
"OptionPane.yesButtonMnemonic", "", |
|
691 |
"OptionPane.noButtonMnemonic", "", |
|
692 |
"OptionPane.okButtonMnemonic", "", |
|
693 |
"OptionPane.cancelButtonMnemonic", "", |
|
694 |
||
695 |
"Panel.font", controlFont, |
|
696 |
"Panel.background", panelBackgroundColor, //new ColorUIResource(0.5647f, 0.9957f, 0.5059f), |
|
697 |
"Panel.foreground", black, |
|
698 |
"Panel.opaque", useOpaqueComponents, |
|
699 |
||
15326
e0b5489e29a6
7147078: [macosx] Echo char set in TextField doesn't prevent word jumping
alexp
parents:
14649
diff
changeset
|
700 |
"PasswordField.focusInputMap", aquaKeyBindings.getPasswordFieldInputMap(), |
12047 | 701 |
"PasswordField.font", controlFont, |
702 |
"PasswordField.background", textBackground, |
|
703 |
"PasswordField.foreground", textForeground, |
|
704 |
"PasswordField.inactiveForeground", textInactiveText, |
|
705 |
"PasswordField.inactiveBackground", textInactiveBackground, |
|
706 |
"PasswordField.selectionBackground", textHighlight, |
|
707 |
"PasswordField.selectionForeground", textHighlightText, |
|
708 |
"PasswordField.caretForeground", textForeground, |
|
709 |
"PasswordField.caretBlinkRate", textCaretBlinkRate, |
|
710 |
"PasswordField.border", textFieldBorder, |
|
711 |
"PasswordField.margin", zeroInsets, |
|
712 |
"PasswordField.echoChar", new Character((char)0x25CF), |
|
713 |
"PasswordField.capsLockIconColor", textPasswordFieldCapsLockIconColor, |
|
714 |
||
715 |
"PopupMenu.font", menuFont, |
|
716 |
"PopupMenu.background", menuBackgroundColor, |
|
14649
0f8154876c6a
7154516: [macosx] Popup menus have no visible borders
serb
parents:
12656
diff
changeset
|
717 |
// Fix for 7154516: make popups opaque |
0f8154876c6a
7154516: [macosx] Popup menus have no visible borders
serb
parents:
12656
diff
changeset
|
718 |
"PopupMenu.translucentBackground", white, |
12047 | 719 |
"PopupMenu.foreground", menuForegroundColor, |
720 |
"PopupMenu.selectionBackground", menuSelectedBackgroundColor, |
|
721 |
"PopupMenu.selectionForeground", menuSelectedForegroundColor, |
|
722 |
"PopupMenu.border", menuBorder, |
|
723 |
// "PopupMenu.margin", |
|
724 |
||
725 |
"ProgressBar.font", controlFont, |
|
726 |
"ProgressBar.foreground", black, |
|
727 |
"ProgressBar.background", controlBackgroundColor, |
|
728 |
"ProgressBar.selectionForeground", black, |
|
729 |
"ProgressBar.selectionBackground", white, |
|
730 |
"ProgressBar.border", new BorderUIResource(BorderFactory.createEmptyBorder()), |
|
731 |
"ProgressBar.repaintInterval", new Integer(20), |
|
732 |
||
733 |
"RadioButton.background", controlBackgroundColor, |
|
734 |
"RadioButton.foreground", black, |
|
735 |
"RadioButton.disabledText", disabled, |
|
736 |
"RadioButton.select", selected, |
|
737 |
"RadioButton.icon", new SwingLazyValue(PKG_PREFIX + "AquaButtonRadioUI", "getSizingRadioButtonIcon"), |
|
738 |
"RadioButton.font", controlFont, |
|
739 |
"RadioButton.border", AquaButtonBorder.getBevelButtonBorder(), |
|
740 |
"RadioButton.margin", new InsetsUIResource(1, 1, 0, 1), |
|
741 |
"RadioButton.focusInputMap", controlFocusInputMap, |
|
742 |
||
743 |
"RadioButtonMenuItem.font", menuFont, |
|
744 |
"RadioButtonMenuItem.acceleratorFont", menuFont, |
|
745 |
"RadioButtonMenuItem.background", menuBackgroundColor, |
|
746 |
"RadioButtonMenuItem.foreground", menuForegroundColor, |
|
747 |
"RadioButtonMenuItem.selectionBackground", menuSelectedBackgroundColor, |
|
748 |
"RadioButtonMenuItem.selectionForeground", menuSelectedForegroundColor, |
|
749 |
"RadioButtonMenuItem.disabledBackground", menuDisabledBackgroundColor, |
|
750 |
"RadioButtonMenuItem.disabledForeground", menuDisabledForegroundColor, |
|
751 |
"RadioButtonMenuItem.acceleratorForeground", menuAccelForegroundColor, |
|
752 |
"RadioButtonMenuItem.acceleratorSelectionForeground", menuAccelSelectionForegroundColor, |
|
753 |
"RadioButtonMenuItem.acceleratorDelimiter", "", |
|
754 |
"RadioButtonMenuItem.border", menuBorder, // for inset calculation |
|
755 |
"RadioButtonMenuItem.margin", menuItemMargin, |
|
756 |
"RadioButtonMenuItem.borderPainted", Boolean.TRUE, |
|
757 |
"RadioButtonMenuItem.checkIcon", new SwingLazyValue(kAquaImageFactoryName, "getMenuItemCheckIcon"), |
|
758 |
"RadioButtonMenuItem.dashIcon", new SwingLazyValue(kAquaImageFactoryName, "getMenuItemDashIcon"), |
|
759 |
//"RadioButtonMenuItem.arrowIcon", null, |
|
760 |
||
761 |
"Separator.background", null, |
|
762 |
"Separator.foreground", new ColorUIResource(0xD4, 0xD4, 0xD4), |
|
763 |
||
764 |
"ScrollBar.border", null, |
|
765 |
"ScrollBar.focusInputMap", aquaKeyBindings.getScrollBarInputMap(), |
|
766 |
"ScrollBar.focusInputMap.RightToLeft", aquaKeyBindings.getScrollBarRightToLeftInputMap(), |
|
767 |
"ScrollBar.width", new Integer(16), |
|
768 |
"ScrollBar.background", white, |
|
769 |
"ScrollBar.foreground", black, |
|
770 |
||
771 |
"ScrollPane.font", controlFont, |
|
772 |
"ScrollPane.background", white, |
|
773 |
"ScrollPane.foreground", black, //$ |
|
774 |
"ScrollPane.border", scollListBorder, |
|
775 |
"ScrollPane.viewportBorder", null, |
|
776 |
||
777 |
"ScrollPane.ancestorInputMap", aquaKeyBindings.getScrollPaneInputMap(), |
|
778 |
"ScrollPane.ancestorInputMap.RightToLeft", new UIDefaults.LazyInputMap(new Object[]{}), |
|
779 |
||
780 |
"Viewport.font", controlFont, |
|
781 |
"Viewport.background", white, // The background for tables, lists, etc |
|
782 |
"Viewport.foreground", black, |
|
783 |
||
784 |
// *** Slider |
|
785 |
"Slider.foreground", black, "Slider.background", controlBackgroundColor, |
|
786 |
"Slider.font", controlSmallFont, |
|
787 |
//"Slider.highlight", table.get("controlLtHighlight"), |
|
788 |
//"Slider.shadow", table.get("controlShadow"), |
|
789 |
//"Slider.focus", table.get("controlDkShadow"), |
|
790 |
"Slider.tickColor", new ColorUIResource(Color.GRAY), |
|
791 |
"Slider.border", null, |
|
792 |
"Slider.focusInsets", new InsetsUIResource(2, 2, 2, 2), |
|
793 |
"Slider.focusInputMap", aquaKeyBindings.getSliderInputMap(), |
|
794 |
"Slider.focusInputMap.RightToLeft", aquaKeyBindings.getSliderRightToLeftInputMap(), |
|
795 |
||
796 |
// *** Spinner |
|
797 |
"Spinner.font", controlFont, |
|
798 |
"Spinner.background", controlBackgroundColor, |
|
799 |
"Spinner.foreground", black, |
|
800 |
"Spinner.border", null, |
|
801 |
"Spinner.arrowButtonSize", new Dimension(16, 5), |
|
802 |
"Spinner.ancestorInputMap", aquaKeyBindings.getSpinnerInputMap(), |
|
803 |
"Spinner.editorBorderPainted", Boolean.TRUE, |
|
804 |
"Spinner.editorAlignment", SwingConstants.TRAILING, |
|
805 |
||
806 |
// *** SplitPane |
|
807 |
//"SplitPane.highlight", table.get("controlLtHighlight"), |
|
808 |
//"SplitPane.shadow", table.get("controlShadow"), |
|
809 |
"SplitPane.background", panelBackgroundColor, |
|
810 |
"SplitPane.border", scollListBorder, |
|
811 |
"SplitPane.dividerSize", new Integer(9), //$ |
|
812 |
"SplitPaneDivider.border", null, // AquaSplitPaneDividerUI draws it |
|
813 |
"SplitPaneDivider.horizontalGradientVariant", new SwingLazyValue(PKG_PREFIX + "AquaSplitPaneDividerUI", "getHorizontalSplitDividerGradientVariant"), |
|
814 |
||
815 |
// *** TabbedPane |
|
816 |
"TabbedPane.font", controlFont, |
|
817 |
"TabbedPane.smallFont", controlSmallFont, |
|
818 |
"TabbedPane.useSmallLayout", Boolean.FALSE,//sSmallTabs ? Boolean.TRUE : Boolean.FALSE, |
|
819 |
"TabbedPane.background", tabBackgroundColor, // for bug [3398277] use a background color so that |
|
820 |
// tabs on a custom pane get erased when they are removed. |
|
821 |
"TabbedPane.foreground", black, //ThemeTextColor.GetThemeTextColor(AppearanceConstants.kThemeTextColorTabFrontActive), |
|
822 |
//"TabbedPane.lightHighlight", table.get("controlLtHighlight"), |
|
823 |
//"TabbedPane.highlight", table.get("controlHighlight"), |
|
824 |
//"TabbedPane.shadow", table.get("controlShadow"), |
|
825 |
//"TabbedPane.darkShadow", table.get("controlDkShadow"), |
|
826 |
//"TabbedPane.focus", table.get("controlText"), |
|
827 |
"TabbedPane.opaque", useOpaqueComponents, |
|
828 |
"TabbedPane.textIconGap", new Integer(4), |
|
829 |
"TabbedPane.tabInsets", new InsetsUIResource(0, 10, 3, 10), // Label within tab (top, left, bottom, right) |
|
830 |
//"TabbedPane.rightTabInsets", new InsetsUIResource(0, 10, 3, 10), // Label within tab (top, left, bottom, right) |
|
831 |
"TabbedPane.leftTabInsets", new InsetsUIResource(0, 10, 3, 10), // Label within tab |
|
832 |
"TabbedPane.rightTabInsets", new InsetsUIResource(0, 10, 3, 10), // Label within tab |
|
833 |
//"TabbedPane.tabAreaInsets", new InsetsUIResource(3, 9, -1, 9), // Tabs relative to edge of pane (negative value for overlapping) |
|
834 |
"TabbedPane.tabAreaInsets", new InsetsUIResource(3, 9, -1, 9), // Tabs relative to edge of pane (negative value for overlapping) |
|
835 |
// (top = side opposite pane, left = edge || to pane, bottom = side adjacent to pane, right = left) - see rotateInsets |
|
836 |
"TabbedPane.contentBorderInsets", new InsetsUIResource(8, 0, 0, 0), // width of border |
|
837 |
//"TabbedPane.selectedTabPadInsets", new InsetsUIResource(0, 0, 1, 0), // Really outsets, this is where we allow for overlap |
|
838 |
"TabbedPane.selectedTabPadInsets", new InsetsUIResource(0, 0, 0, 0), // Really outsets, this is where we allow for overlap |
|
839 |
"TabbedPane.tabsOverlapBorder", Boolean.TRUE, |
|
840 |
"TabbedPane.selectedTabTitlePressedColor", selectedTabTitlePressedColor, |
|
841 |
"TabbedPane.selectedTabTitleDisabledColor", selectedTabTitleDisabledColor, |
|
842 |
"TabbedPane.selectedTabTitleNormalColor", selectedTabTitleNormalColor, |
|
843 |
"TabbedPane.selectedTabTitleShadowDisabledColor", selectedTabTitleShadowDisabledColor, |
|
844 |
"TabbedPane.selectedTabTitleShadowNormalColor", selectedTabTitleShadowNormalColor, |
|
845 |
"TabbedPane.nonSelectedTabTitleNormalColor", nonSelectedTabTitleNormalColor, |
|
846 |
||
847 |
// *** Table |
|
848 |
"Table.font", viewFont, // [3577901] Aqua HIG says "default font of text in lists and tables" should be 12 point (vm). |
|
849 |
"Table.foreground", black, // cell text color |
|
850 |
"Table.background", white, // cell background color |
|
851 |
"Table.selectionForeground", selectionForeground, |
|
852 |
"Table.selectionBackground", selectionBackground, |
|
853 |
"Table.selectionInactiveBackground", selectionInactiveBackground, |
|
854 |
"Table.selectionInactiveForeground", selectionInactiveForeground, |
|
855 |
"Table.gridColor", white, // grid line color |
|
856 |
"Table.focusCellBackground", textHighlightText, |
|
857 |
"Table.focusCellForeground", textHighlight, |
|
858 |
"Table.focusCellHighlightBorder", focusCellHighlightBorder, |
|
859 |
"Table.scrollPaneBorder", scollListBorder, |
|
860 |
||
861 |
"Table.ancestorInputMap", aquaKeyBindings.getTableInputMap(), |
|
862 |
"Table.ancestorInputMap.RightToLeft", aquaKeyBindings.getTableRightToLeftInputMap(), |
|
863 |
||
864 |
"TableHeader.font", controlSmallFont, |
|
865 |
"TableHeader.foreground", black, |
|
866 |
"TableHeader.background", white, // header background |
|
867 |
"TableHeader.cellBorder", listHeaderBorder, |
|
868 |
||
869 |
// *** Text |
|
870 |
"TextArea.focusInputMap", aquaKeyBindings.getMultiLineTextInputMap(), |
|
871 |
"TextArea.font", controlFont, |
|
872 |
"TextArea.background", textBackground, |
|
873 |
"TextArea.foreground", textForeground, |
|
874 |
"TextArea.inactiveForeground", textInactiveText, |
|
875 |
"TextArea.inactiveBackground", textInactiveBackground, |
|
876 |
"TextArea.selectionBackground", textHighlight, |
|
877 |
"TextArea.selectionForeground", textHighlightText, |
|
878 |
"TextArea.caretForeground", textForeground, |
|
879 |
"TextArea.caretBlinkRate", textCaretBlinkRate, |
|
880 |
"TextArea.border", textAreaBorder, |
|
881 |
"TextArea.margin", zeroInsets, |
|
882 |
||
883 |
"TextComponent.selectionBackgroundInactive", textHighlightInactive, |
|
884 |
||
885 |
"TextField.focusInputMap", aquaKeyBindings.getTextFieldInputMap(), |
|
886 |
"TextField.font", controlFont, |
|
887 |
"TextField.background", textBackground, |
|
888 |
"TextField.foreground", textForeground, |
|
889 |
"TextField.inactiveForeground", textInactiveText, |
|
890 |
"TextField.inactiveBackground", textInactiveBackground, |
|
891 |
"TextField.selectionBackground", textHighlight, |
|
892 |
"TextField.selectionForeground", textHighlightText, |
|
893 |
"TextField.caretForeground", textForeground, |
|
894 |
"TextField.caretBlinkRate", textCaretBlinkRate, |
|
895 |
"TextField.border", textFieldBorder, |
|
896 |
"TextField.margin", zeroInsets, |
|
897 |
||
898 |
"TextPane.focusInputMap", aquaKeyBindings.getMultiLineTextInputMap(), |
|
899 |
"TextPane.font", controlFont, |
|
900 |
"TextPane.background", textBackground, |
|
901 |
"TextPane.foreground", textForeground, |
|
902 |
"TextPane.selectionBackground", textHighlight, |
|
903 |
"TextPane.selectionForeground", textHighlightText, |
|
904 |
"TextPane.caretForeground", textForeground, |
|
905 |
"TextPane.caretBlinkRate", textCaretBlinkRate, |
|
906 |
"TextPane.inactiveForeground", textInactiveText, |
|
907 |
"TextPane.inactiveBackground", textInactiveBackground, |
|
908 |
"TextPane.border", textAreaBorder, |
|
909 |
"TextPane.margin", editorMargin, |
|
910 |
||
911 |
// *** ToggleButton |
|
912 |
"ToggleButton.background", controlBackgroundColor, |
|
913 |
"ToggleButton.foreground", black, |
|
914 |
"ToggleButton.disabledText", disabled, |
|
915 |
// we need to go through and find out if these are used, and if not what to set |
|
916 |
// so that subclasses will get good aqua like colors. |
|
917 |
// "ToggleButton.select", getControlShadow(), |
|
918 |
// "ToggleButton.text", getControl(), |
|
919 |
// "ToggleButton.disabledSelectedText", getControlDarkShadow(), |
|
920 |
// "ToggleButton.disabledBackground", getControl(), |
|
921 |
// "ToggleButton.disabledSelectedBackground", getControlShadow(), |
|
922 |
//"ToggleButton.focus", getFocusColor(), |
|
923 |
"ToggleButton.border", new SwingLazyValue(PKG_PREFIX + "AquaButtonBorder", "getDynamicButtonBorder"), // sja make this lazy! |
|
924 |
"ToggleButton.font", controlFont, |
|
925 |
"ToggleButton.focusInputMap", controlFocusInputMap, |
|
926 |
"ToggleButton.margin", new InsetsUIResource(2, 2, 2, 2), |
|
927 |
||
928 |
// *** ToolBar |
|
929 |
"ToolBar.font", controlFont, |
|
930 |
"ToolBar.background", panelBackgroundColor, |
|
931 |
"ToolBar.foreground", new ColorUIResource(Color.gray), |
|
932 |
"ToolBar.dockingBackground", panelBackgroundColor, |
|
933 |
"ToolBar.dockingForeground", selectionBackground, |
|
934 |
"ToolBar.floatingBackground", panelBackgroundColor, |
|
935 |
"ToolBar.floatingForeground", new ColorUIResource(Color.darkGray), |
|
936 |
"ToolBar.border", new SwingLazyValue(PKG_PREFIX + "AquaToolBarUI", "getToolBarBorder"), |
|
937 |
"ToolBar.borderHandleColor", toolbarDragHandleColor, |
|
938 |
//"ToolBar.separatorSize", new DimensionUIResource( 10, 10 ), |
|
939 |
"ToolBar.separatorSize", null, |
|
940 |
||
941 |
// *** ToolBarButton |
|
942 |
"ToolBarButton.margin", new InsetsUIResource(3, 3, 3, 3), |
|
943 |
"ToolBarButton.insets", new InsetsUIResource(1, 1, 1, 1), |
|
944 |
||
945 |
// *** ToolTips |
|
946 |
"ToolTip.font", controlSmallFont, |
|
947 |
//$ Tooltips - Same color as help balloons? |
|
948 |
"ToolTip.background", toolTipBackground, |
|
949 |
"ToolTip.foreground", black, |
|
950 |
"ToolTip.border", toolTipBorder, |
|
951 |
||
952 |
// *** Tree |
|
953 |
"Tree.font", viewFont, // [3577901] Aqua HIG says "default font of text in lists and tables" should be 12 point (vm). |
|
954 |
"Tree.background", white, |
|
955 |
"Tree.foreground", black, |
|
956 |
// for now no lines |
|
957 |
"Tree.hash", white, //disabled, // Line color |
|
958 |
"Tree.line", white, //disabled, // Line color |
|
959 |
"Tree.textForeground", black, |
|
960 |
"Tree.textBackground", white, |
|
961 |
"Tree.selectionForeground", selectionForeground, |
|
962 |
"Tree.selectionBackground", selectionBackground, |
|
963 |
"Tree.selectionInactiveBackground", selectionInactiveBackground, |
|
964 |
"Tree.selectionInactiveForeground", selectionInactiveForeground, |
|
965 |
"Tree.selectionBorderColor", selectionBackground, // match the background so it looks like we don't draw anything |
|
966 |
"Tree.editorBorderSelectionColor", null, // The EditTextFrame provides its own border |
|
967 |
// "Tree.editorBorder", textFieldBorder, // If you still have Sun bug 4376328 in DefaultTreeCellEditor, it has to have the same insets as TextField.border |
|
968 |
"Tree.leftChildIndent", new Integer(7),//$ |
|
969 |
"Tree.rightChildIndent", new Integer(13),//$ |
|
970 |
"Tree.rowHeight", new Integer(19),// iconHeight + 3, to match finder - a zero would have the renderer decide, except that leaves the icons touching |
|
971 |
"Tree.scrollsOnExpand", Boolean.FALSE, |
|
972 |
"Tree.openIcon", new SwingLazyValue(kAquaImageFactoryName, "getTreeOpenFolderIcon"), // Open folder icon |
|
973 |
"Tree.closedIcon", new SwingLazyValue(kAquaImageFactoryName, "getTreeFolderIcon"), // Closed folder icon |
|
974 |
"Tree.leafIcon", new SwingLazyValue(kAquaImageFactoryName, "getTreeDocumentIcon"), // Document icon |
|
975 |
"Tree.expandedIcon", new SwingLazyValue(kAquaImageFactoryName, "getTreeExpandedIcon"), |
|
976 |
"Tree.collapsedIcon", new SwingLazyValue(kAquaImageFactoryName, "getTreeCollapsedIcon"), |
|
977 |
"Tree.rightToLeftCollapsedIcon", new SwingLazyValue(kAquaImageFactoryName, "getTreeRightToLeftCollapsedIcon"), |
|
978 |
"Tree.changeSelectionWithFocus", Boolean.TRUE, |
|
979 |
"Tree.drawsFocusBorderAroundIcon", Boolean.FALSE, |
|
980 |
||
981 |
"Tree.focusInputMap", aquaKeyBindings.getTreeInputMap(), |
|
982 |
"Tree.focusInputMap.RightToLeft", aquaKeyBindings.getTreeRightToLeftInputMap(), |
|
983 |
"Tree.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[]{"ESCAPE", "cancel"}),}; |
|
984 |
||
985 |
table.putDefaults(defaults); |
|
986 |
||
987 |
Object aaTextInfo = SwingUtilities2.AATextInfo.getAATextInfo(true); |
|
988 |
table.put(SwingUtilities2.AA_TEXT_PROPERTY_KEY, aaTextInfo); |
|
989 |
} |
|
990 |
||
991 |
protected void initSystemColorDefaults(final UIDefaults table) { |
|
992 |
// String[] defaultSystemColors = { |
|
993 |
// "desktop", "#005C5C", /* Color of the desktop background */ |
|
994 |
// "activeCaption", "#000080", /* Color for captions (title bars) when they are active. */ |
|
995 |
// "activeCaptionText", "#FFFFFF", /* Text color for text in captions (title bars). */ |
|
996 |
// "activeCaptionBorder", "#C0C0C0", /* Border color for caption (title bar) window borders. */ |
|
997 |
// "inactiveCaption", "#808080", /* Color for captions (title bars) when not active. */ |
|
998 |
// "inactiveCaptionText", "#C0C0C0", /* Text color for text in inactive captions (title bars). */ |
|
999 |
// "inactiveCaptionBorder", "#C0C0C0", /* Border color for inactive caption (title bar) window borders. */ |
|
1000 |
// "window", "#FFFFFF", /* Default color for the interior of windows */ |
|
1001 |
// "windowBorder", "#000000", /* ??? */ |
|
1002 |
// "windowText", "#000000", /* ??? */ |
|
1003 |
// "menu", "#C0C0C0", /* Background color for menus */ |
|
1004 |
// "menuText", "#000000", /* Text color for menus */ |
|
1005 |
// "text", "#C0C0C0", /* Text background color */ |
|
1006 |
// "textText", "#000000", /* Text foreground color */ |
|
1007 |
// "textHighlight", "#000080", /* Text background color when selected */ |
|
1008 |
// "textHighlightText", "#FFFFFF", /* Text color when selected */ |
|
1009 |
// "textInactiveText", "#808080", /* Text color when disabled */ |
|
1010 |
// "control", "#C0C0C0", /* Default color for controls (buttons, sliders, etc) */ |
|
1011 |
// "controlText", "#000000", /* Default color for text in controls */ |
|
1012 |
// "controlHighlight", "#C0C0C0", /* Specular highlight (opposite of the shadow) */ |
|
1013 |
// "controlLtHighlight", "#FFFFFF", /* Highlight color for controls */ |
|
1014 |
// "controlShadow", "#808080", /* Shadow color for controls */ |
|
1015 |
// "controlDkShadow", "#000000", /* Dark shadow color for controls */ |
|
1016 |
// "scrollbar", "#E0E0E0", /* Scrollbar background (usually the "track") */ |
|
1017 |
// "info", "#FFFFE1", /* ??? */ |
|
1018 |
// "infoText", "#000000" /* ??? */ |
|
1019 |
// }; |
|
1020 |
// |
|
1021 |
// loadSystemColors(table, defaultSystemColors, isNativeLookAndFeel()); |
|
1022 |
} |
|
1023 |
||
1024 |
/** |
|
1025 |
* Initialize the uiClassID to AquaComponentUI mapping. |
|
1026 |
* The JComponent classes define their own uiClassID constants |
|
1027 |
* (see AbstractComponent.getUIClassID). This table must |
|
1028 |
* map those constants to a BasicComponentUI class of the |
|
1029 |
* appropriate type. |
|
1030 |
* |
|
1031 |
* @see #getDefaults |
|
1032 |
*/ |
|
1033 |
protected void initClassDefaults(final UIDefaults table) { |
|
1034 |
final String basicPackageName = "javax.swing.plaf.basic."; |
|
1035 |
||
1036 |
final Object[] uiDefaults = { |
|
1037 |
"ButtonUI", PKG_PREFIX + "AquaButtonUI", |
|
1038 |
"CheckBoxUI", PKG_PREFIX + "AquaButtonCheckBoxUI", |
|
1039 |
"CheckBoxMenuItemUI", PKG_PREFIX + "AquaMenuItemUI", |
|
1040 |
"LabelUI", PKG_PREFIX + "AquaLabelUI", |
|
1041 |
"ListUI", PKG_PREFIX + "AquaListUI", |
|
1042 |
"MenuUI", PKG_PREFIX + "AquaMenuUI", |
|
1043 |
"MenuItemUI", PKG_PREFIX + "AquaMenuItemUI", |
|
1044 |
"OptionPaneUI", PKG_PREFIX + "AquaOptionPaneUI", |
|
1045 |
"PanelUI", PKG_PREFIX + "AquaPanelUI", |
|
1046 |
"RadioButtonMenuItemUI", PKG_PREFIX + "AquaMenuItemUI", |
|
1047 |
"RadioButtonUI", PKG_PREFIX + "AquaButtonRadioUI", |
|
1048 |
"ProgressBarUI", PKG_PREFIX + "AquaProgressBarUI", |
|
1049 |
"RootPaneUI", PKG_PREFIX + "AquaRootPaneUI", |
|
1050 |
"SliderUI", PKG_PREFIX + "AquaSliderUI", |
|
1051 |
"ScrollBarUI", PKG_PREFIX + "AquaScrollBarUI", |
|
1052 |
"TabbedPaneUI", PKG_PREFIX + (JRSUIUtils.TabbedPane.shouldUseTabbedPaneContrastUI() ? "AquaTabbedPaneContrastUI" : "AquaTabbedPaneUI"), |
|
1053 |
"TableUI", PKG_PREFIX + "AquaTableUI", |
|
1054 |
"ToggleButtonUI", PKG_PREFIX + "AquaButtonToggleUI", |
|
1055 |
"ToolBarUI", PKG_PREFIX + "AquaToolBarUI", |
|
1056 |
"ToolTipUI", PKG_PREFIX + "AquaToolTipUI", |
|
1057 |
"TreeUI", PKG_PREFIX + "AquaTreeUI", |
|
1058 |
||
1059 |
"InternalFrameUI", PKG_PREFIX + "AquaInternalFrameUI", |
|
1060 |
"DesktopIconUI", PKG_PREFIX + "AquaInternalFrameDockIconUI", |
|
1061 |
"DesktopPaneUI", PKG_PREFIX + "AquaInternalFramePaneUI", |
|
1062 |
"EditorPaneUI", PKG_PREFIX + "AquaEditorPaneUI", |
|
1063 |
"TextFieldUI", PKG_PREFIX + "AquaTextFieldUI", |
|
1064 |
"TextPaneUI", PKG_PREFIX + "AquaTextPaneUI", |
|
1065 |
"ComboBoxUI", PKG_PREFIX + "AquaComboBoxUI", |
|
1066 |
"PopupMenuUI", PKG_PREFIX + "AquaPopupMenuUI", |
|
1067 |
"TextAreaUI", PKG_PREFIX + "AquaTextAreaUI", |
|
1068 |
"MenuBarUI", PKG_PREFIX + "AquaMenuBarUI", |
|
1069 |
"FileChooserUI", PKG_PREFIX + "AquaFileChooserUI", |
|
1070 |
"PasswordFieldUI", PKG_PREFIX + "AquaTextPasswordFieldUI", |
|
1071 |
"TableHeaderUI", PKG_PREFIX + "AquaTableHeaderUI", |
|
1072 |
||
1073 |
"FormattedTextFieldUI", PKG_PREFIX + "AquaTextFieldFormattedUI", |
|
1074 |
||
1075 |
"SpinnerUI", PKG_PREFIX + "AquaSpinnerUI", |
|
1076 |
"SplitPaneUI", PKG_PREFIX + "AquaSplitPaneUI", |
|
1077 |
"ScrollPaneUI", PKG_PREFIX + "AquaScrollPaneUI", |
|
1078 |
||
1079 |
"PopupMenuSeparatorUI", PKG_PREFIX + "AquaPopupMenuSeparatorUI", |
|
1080 |
"SeparatorUI", PKG_PREFIX + "AquaPopupMenuSeparatorUI", |
|
1081 |
"ToolBarSeparatorUI", PKG_PREFIX + "AquaToolBarSeparatorUI", |
|
1082 |
||
1083 |
// as we implement aqua versions of the swing elements |
|
1084 |
// we will aad the com.apple.laf.FooUI classes to this table. |
|
1085 |
||
1086 |
"ColorChooserUI", basicPackageName + "BasicColorChooserUI", |
|
1087 |
||
1088 |
// text UIs |
|
1089 |
"ViewportUI", basicPackageName + "BasicViewportUI", |
|
1090 |
}; |
|
1091 |
table.putDefaults(uiDefaults); |
|
1092 |
} |
|
1093 |
} |