01: /*
02: * @(#)BasicLookAndFeelExtension.java 4/15/2007
03: *
04: * Copyright 2002 - 2007 JIDE Software Inc. All rights reserved.
05: */
06:
07: package com.jidesoft.plaf.basic;
08:
09: import com.jidesoft.plaf.LookAndFeelExtension;
10: import com.jidesoft.plaf.LookAndFeelFactory;
11:
12: import javax.swing.*;
13:
14: /**
15: * Initialize the uiClassID to BasicComponentUI mapping for JIDE components.
16: * The JComponent classes define their own uiClassID constants
17: * (see AbstractComponent.getUIClassID). This table must
18: * map those constants to a BasicComponentUI class of the
19: * appropriate type.
20: */
21: public class BasicLookAndFeelExtension implements LookAndFeelExtension {
22:
23: /**
24: * Initializes class defaults.
25: *
26: * @param table UIDefaults table
27: */
28: public static void initClassDefaults(UIDefaults table) {
29: int products = LookAndFeelFactory.getProductsUsed();
30:
31: final String basicPackageName = "com.jidesoft.plaf.basic.";
32:
33: // common
34: table.put("JidePopupMenuUI", basicPackageName
35: + "BasicJidePopupMenuUI");
36: table.put("HeaderBoxUI", basicPackageName + "BasicHeaderBoxUI");
37: table.put("RangeSliderUI", basicPackageName
38: + "BasicRangeSliderUI");
39: table.put("FolderChooserUI", basicPackageName
40: + "BasicFolderChooserUI");
41: table.put("StyledLabelUI", basicPackageName
42: + "BasicStyledLabelUI");
43: table.put("GripperUI", basicPackageName + "BasicGripperUI");
44: table.put("JidePopupUI", basicPackageName + "BasicJidePopupUI");
45: table.put("JideTabbedPaneUI", basicPackageName
46: + "BasicJideTabbedPaneUI");
47: table.put("JideButtonUI", basicPackageName
48: + "BasicJideButtonUI");
49: table.put("JideSplitButtonUI", basicPackageName
50: + "BasicJideSplitButtonUI");
51:
52: if ((products & PRODUCT_GRIDS) != 0) {
53: // grids
54: table.put("JideTableUI", basicPackageName
55: + "BasicJideTableUI");
56: table.put("NavigableTableUI", basicPackageName
57: + "BasicNavigableTableUI");
58: table.put("CellSpanTableUI", basicPackageName
59: + "BasicCellSpanTableUI");
60: table.put("HierarchicalTableUI", basicPackageName
61: + "BasicHierarchicalTableUI");
62: table.put("NestedTableHeaderUI", basicPackageName
63: + "BasicNestedTableHeaderUI");
64: table.put("EditableTableHeaderUI", basicPackageName
65: + "BasicEditableTableHeaderUI");
66: }
67:
68: if ((products & PRODUCT_DOCK) != 0) {
69: // dock
70: table.put("SidePaneUI", basicPackageName
71: + "BasicSidePaneUI");
72: table.put("DockableFrameUI", basicPackageName
73: + "BasicDockableFrameUI");
74: }
75:
76: if ((products & PRODUCT_COMPONENTS) != 0) {
77: // components
78: table.put("CollapsiblePaneUI", basicPackageName
79: + "BasicCollapsiblePaneUI");
80: table.put("StatusBarSeparatorUI", basicPackageName
81: + "BasicStatusBarSeparatorUI");
82: }
83:
84: if ((products & PRODUCT_ACTION) != 0) {
85: // action
86: table.put("CommandBarUI", basicPackageName
87: + "BasicCommandBarUI");
88: table.put("CommandBarSeparatorUI", basicPackageName
89: + "BasicCommandBarSeparatorUI");
90: table.put("ChevronUI", basicPackageName + "BasicChevronUI");
91: table.put("CommandBarTitleBarUI", basicPackageName
92: + "BasicCommandBarTitleBarUI");
93: }
94: }
95: }
|