| 1 |
/* |
| 2 |
* @(#)Eclipse3xWindowsUtils.java 3/17/2013 |
| 3 |
* |
| 4 |
* Copyright 2002 - 2013 JIDE Software Inc. All rights reserved. |
| 5 |
*/ |
| 6 |
|
| 7 |
package com.jidesoft.plaf.eclipse; |
| 8 |
|
| 9 |
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 Eclipse3xWindowsUtils extends EclipseWindowsUtils { |
| 19 |
|
| 20 |
/** |
| 21 |
* Initializes class defaults with menu components UIDefaults. |
| 22 |
* |
| 23 |
* @param table |
| 24 |
*/ |
| 25 |
public static void initClassDefaultsWithMenu(UIDefaults table) { |
| 26 |
EclipseWindowsUtils.initClassDefaultsWithMenu(table); |
| 27 |
initClassDefaults(table); |
| 28 |
} |
| 29 |
|
| 30 |
/** |
| 31 |
* Initializes class defaults. |
| 32 |
* |
| 33 |
* @param table |
| 34 |
*/ |
| 35 |
public static void initClassDefaults(UIDefaults table) { |
| 36 |
EclipseWindowsUtils.initClassDefaults(table); |
| 37 |
table.put("JideTabbedPaneUI", "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(UIDefaults table) { |
| 61 |
Object uiDefaults[] = { |
| 62 |
"JideTabbedPane.defaultTabShape", JideTabbedPane.SHAPE_ECLIPSE3X, |
| 63 |
"JideTabbedPane.defaultTabColorTheme", JideTabbedPane.COLOR_THEME_WIN2K, |
| 64 |
"JideTabbedPane.defaultResizeMode", JideTabbedPane.RESIZE_MODE_NONE, |
| 65 |
"JideTabbedPane.closeButtonMarginSize", 10, |
| 66 |
"JideTabbedPane.iconMarginHorizon", 8, |
| 67 |
"JideTabbedPane.iconMarginVertical", 6, |
| 68 |
|
| 69 |
"JideTabbedPane.border", new BorderUIResource(BorderFactory.createEmptyBorder(1, 1, 1, 1)), |
| 70 |
"JideTabbedPane.contentBorderInsets", new InsetsUIResource(2, 2, 2, 2), |
| 71 |
}; |
| 72 |
|
| 73 |
table.putDefaults(uiDefaults); |
| 74 |
} |
| 75 |
} |