01: // Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov Date: 2006-4-29 10:33:49
02: // Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
03: // Decompiler options: packimports(3)
04: // Source File Name: EclipseWindowsUtils.java
05:
06: package com.jidesoft.plaf.eclipse;
07:
08: import com.jidesoft.swing.JideTabbedPane;
09:
10: import javax.swing.*;
11: import javax.swing.plaf.BorderUIResource;
12: import javax.swing.plaf.InsetsUIResource;
13:
14: /**
15: * Utility Class for WindowsLookAndFeel to add Eclipse3x related LookAndFeel style
16: */
17: public class Eclipse3xWindowsUtils extends EclipseWindowsUtils {
18:
19: /**
20: * Initializes class defaults with menu components UIDefaults.
21: *
22: * @param table
23: */
24: public static void initClassDefaultsWithMenu(UIDefaults table) {
25: EclipseWindowsUtils.initClassDefaultsWithMenu(table);
26: initClassDefaults(table);
27: }
28:
29: /**
30: * Initializes class defaults.
31: *
32: * @param table
33: */
34: public static void initClassDefaults(UIDefaults table) {
35: EclipseWindowsUtils.initClassDefaults(table);
36: table.put("JideTabbedPaneUI",
37: "com.jidesoft.plaf.eclipse.Eclipse3xJideTabbedPaneUI");
38: }
39:
40: /**
41: * Initializes components defaults.
42: *
43: * @param table
44: */
45: public static void initComponentDefaults(UIDefaults table) {
46: EclipseWindowsUtils.initComponentDefaults(table);
47: initComponentDefaultsForEclipse3x(table);
48: }
49:
50: /**
51: * Initializes components defaults with menu components UIDefaults.
52: *
53: * @param table
54: */
55: public static void initComponentDefaultsWithMenu(UIDefaults table) {
56: EclipseWindowsUtils.initComponentDefaultsWithMenu(table);
57: initComponentDefaultsForEclipse3x(table);
58: }
59:
60: private static void initComponentDefaultsForEclipse3x(
61: UIDefaults table) {
62: Object uiDefaults[] = {
63: "JideTabbedPane.defaultTabShape",
64: JideTabbedPane.SHAPE_ECLIPSE3X,
65: "JideTabbedPane.defaultTabColorTheme",
66: JideTabbedPane.COLOR_THEME_WIN2K,
67: "JideTabbedPane.defaultResizeMode",
68: JideTabbedPane.RESIZE_MODE_NONE,
69: "JideTabbedPane.closeButtonMarginSize",
70: 10,
71: "JideTabbedPane.iconMarginHorizon",
72: 8,
73: "JideTabbedPane.iconMarginVertical",
74: 6,
75:
76: "JideTabbedPane.border",
77: new BorderUIResource(BorderFactory.createEmptyBorder(1,
78: 1, 1, 1)),
79: "JideTabbedPane.contentBorderInsets",
80: new InsetsUIResource(2, 2, 2, 2), };
81:
82: table.putDefaults(uiDefaults);
83: }
84: }
|