KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > compiere > plaf > CompiereSplitPaneUI


1 /******************************************************************************
2  * The contents of this file are subject to the Compiere License Version 1.1
3  * ("License"); You may not use this file except in compliance with the License
4  * You may obtain a copy of the License at http://www.compiere.org/license.html
5  * Software distributed under the License is distributed on an "AS IS" basis,
6  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
7  * the specific language governing rights and limitations under the License.
8  * The Original Code is Compiere ERP & CRM Business Solution
9  * The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
10  * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
11  * created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
12  * Contributor(s): ______________________________________.
13  *****************************************************************************/

14 package org.compiere.plaf;
15
16 import javax.swing.JComponent JavaDoc;
17 import javax.swing.plaf.ComponentUI JavaDoc;
18 import javax.swing.plaf.basic.BasicSplitPaneDivider JavaDoc;
19 import javax.swing.plaf.basic.BasicSplitPaneUI JavaDoc;
20
21 /**
22  * Compiere Plit Pane UI.
23  * When moving, the divider is painted in darkGray.
24  *
25  * @author Jorg Janke
26  * @version $Id: CompiereSplitPaneUI.java,v 1.5 2003/09/27 11:08:53 jjanke Exp $
27  */

28 public class CompiereSplitPaneUI extends BasicSplitPaneUI JavaDoc
29 {
30     /**
31      * Creates a new MetalSplitPaneUI instance
32      * @param x
33      * @return ComponentUI
34      */

35     public static ComponentUI JavaDoc createUI (JComponent JavaDoc x)
36     {
37         return new CompiereSplitPaneUI();
38     } // createUI
39

40     /**
41      * Creates the default divider.
42      * @return SplitPaneDivider
43      */

44     public BasicSplitPaneDivider JavaDoc createDefaultDivider()
45     {
46         return new CompiereSplitPaneDivider (this);
47     }
48
49     /**
50      * Installs the UI.
51      * @param c
52      */

53     public void installUI (JComponent JavaDoc c)
54     {
55         super.installUI(c);
56         c.setOpaque(false);
57         // BasicBorders$SplitPaneBorder paints gray border
58
// resulting in a 2pt border for the left/right components
59
// but results in 1pt gray line on top/button of divider.
60
// Still, a 1 pt shaddow light gay line is painted
61
c.setBorder(null);
62     } // installUI
63

64
65
66 } // CompiereSplitPaneUI
67
Popular Tags