KickJava   Java API By Example, From Geeks To Geeks.

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


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.ViewportUI JavaDoc;
19 import javax.swing.plaf.basic.BasicViewportUI JavaDoc;
20
21 /**
22  * Compiere View Point
23  *
24  * @author Jorg Janke
25  * @version $Id: CompiereViewportUI.java,v 1.4 2003/09/27 11:08:52 jjanke Exp $
26  */

27 public class CompiereViewportUI extends BasicViewportUI JavaDoc
28 {
29     /** Shared UI object */
30     private static ViewportUI JavaDoc viewportUI;
31
32     /**
33      * Create UI
34      * @param c
35      * @return CompiereViewpointUI
36      */

37     public static ComponentUI JavaDoc createUI (JComponent JavaDoc c)
38     {
39         if (viewportUI == null)
40             viewportUI = new CompiereViewportUI();
41         return viewportUI;
42     } // createUI
43

44     /**
45      * Install UI
46      * @param c
47      */

48     public void installUI(JComponent JavaDoc c)
49     {
50         super.installUI(c);
51         // will be ignored as set in constructor after updateUI - Sun bug: 4677611
52
c.setOpaque(false);
53     } // installUI
54

55 } // CompiereViewpointUI
56
Popular Tags