01: /*
02: * @(#)Eclipse3xMetalUtils.java 11/16/2006
03: *
04: * Copyright 2002 - 2006 JIDE Software Inc. All rights reserved.
05: */
06:
07: package com.jidesoft.plaf.eclipse;
08:
09: import com.jidesoft.swing.JideTabbedPane;
10:
11: import javax.swing.*;
12: import javax.swing.plaf.BorderUIResource;
13: import javax.swing.plaf.InsetsUIResource;
14:
15: /**
16: * Utility Class for WindowsLookAndFeel to add Eclipse3x related LookAndFeel style
17: */
18: public class Eclipse3xMetalUtils extends EclipseMetalUtils {
19:
20: /**
21: * Initializes class defaults.
22: *
23: * @param table
24: */
25: public static void initClassDefaults(UIDefaults table) {
26: EclipseLookAndFeelExtension.initClassDefaults(table);
27: table.put("JideTabbedPaneUI",
28: "com.jidesoft.plaf.eclipse.Eclipse3xJideTabbedPaneUI");
29: }
30:
31: /**
32: * Initializes components defaults.
33: *
34: * @param table
35: */
36: public static void initComponentDefaults(UIDefaults table) {
37: EclipseMetalUtils.initComponentDefaults(table);
38: initComponentDefaultsForEclipse3x(table);
39: }
40:
41: private static void initComponentDefaultsForEclipse3x(
42: UIDefaults table) {
43: Object uiDefaults[] = {
44: "JideTabbedPane.defaultTabShape",
45: JideTabbedPane.SHAPE_ECLIPSE3X,
46: "JideTabbedPane.defaultTabColorTheme",
47: JideTabbedPane.COLOR_THEME_WIN2K,
48: "JideTabbedPane.defaultResizeMode",
49: JideTabbedPane.RESIZE_MODE_NONE,
50: "JideTabbedPane.closeButtonMarginSize",
51: 10,
52: "JideTabbedPane.iconMarginHorizon",
53: 8,
54: "JideTabbedPane.iconMarginVertical",
55: 6,
56:
57: "JideTabbedPane.border",
58: new BorderUIResource(BorderFactory.createEmptyBorder(1,
59: 1, 1, 1)),
60: "JideTabbedPane.contentBorderInsets",
61: new InsetsUIResource(2, 2, 2, 2), };
62: table.putDefaults(uiDefaults);
63: }
64: }
|