KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openharmonise > him > displaycomponents > table > BlankVersionEntry


1 /*
2  * The contents of this file are subject to the
3  * Mozilla Public License Version 1.1 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at http://www.mozilla.org/MPL/
6  *
7  * Software distributed under the License is distributed on an "AS IS"
8  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
9  * See the License for the specific language governing rights and
10  * limitations under the License.
11  *
12  * The Initial Developer of the Original Code is Simulacra Media Ltd.
13  * Portions created by Simulacra Media Ltd are Copyright (C) Simulacra Media Ltd, 2004.
14  *
15  * All Rights Reserved.
16  *
17  * Contributor(s):
18  */

19
20 package org.openharmonise.him.displaycomponents.table;
21
22 import java.awt.Color JavaDoc;
23 import java.awt.Dimension JavaDoc;
24 import java.awt.FlowLayout JavaDoc;
25 import java.awt.Font JavaDoc;
26
27 import javax.swing.Icon JavaDoc;
28 import javax.swing.JLabel JavaDoc;
29
30 import org.openharmonise.vfs.*;
31 import org.openharmonise.vfs.gui.*;
32
33
34 /**
35  * Place holder for a blank version entry.
36  *
37  * @author Matthew Large
38  * @version $Revision: 1.1 $
39  *
40  */

41 public class BlankVersionEntry extends VersionEntry {
42
43     /**
44      * Contructs a new blank version entry.
45      *
46      * @param sTitle Title
47      */

48     public BlankVersionEntry(String JavaDoc sTitle) {
49         super();
50         this.setup(sTitle);
51     }
52         
53     /**
54      * Configures this blank version entry.
55      *
56      * @param sTitle Title
57      */

58     private void setup(String JavaDoc sTitle) {
59         Icon JavaDoc iIcon = IconManager.getInstance().getIcon( "16-blank.gif" );
60             
61         String JavaDoc fontName = "Dialog";
62         int fontSize = 11;
63         Font JavaDoc font = new Font JavaDoc(fontName, Font.PLAIN, fontSize);
64         
65         this.setPreferredSize(new Dimension JavaDoc(160, 40));
66         this.setSize(new Dimension JavaDoc(160, 40));
67         this.setBackground(Color.WHITE);
68         FlowLayout JavaDoc fl2 = new FlowLayout JavaDoc(FlowLayout.LEFT);
69         fl2.setHgap(0);
70         fl2.setVgap(0);
71         this.setLayout(fl2);
72
73         JLabel JavaDoc title = new JLabel JavaDoc(sTitle);
74         title.setFont(font);
75         title.setPreferredSize(new Dimension JavaDoc(145, 16));
76         title.setIcon(iIcon);
77         this.add(title);
78
79         this.doLayout();
80     }
81
82     /**
83      * Constructs a new blank version entry.
84      *
85      * @param parentEntry Expanded table entry that this is part of
86      * @param vfs Virtual file system for this entry
87      * @param sFilepath Full path to resource that this entry represents
88      * @param sTitle Title
89      */

90     private BlankVersionEntry(
91         TableEntry parentEntry,
92         AbstractVirtualFileSystem vfs,
93         String JavaDoc sFilepath,
94         String JavaDoc sTitle) {
95         super(parentEntry, vfs, sFilepath, sTitle);
96     }
97
98     /**
99      * Constructs a new blank version entry.
100      *
101      * @param parentEntry Expanded table entry that this is part of
102      * @param vfs Virtual file system for this entry
103      * @param sFilepath Full path to resource that this entry represents
104      * @param sTitle Title
105      * @param bDisplayIcon Display Icon
106      */

107     private BlankVersionEntry(
108         TableEntry parentEntry,
109         AbstractVirtualFileSystem vfs,
110         String JavaDoc sFilepath,
111         String JavaDoc sTitle,
112         boolean bDisplayIcon) {
113         super(parentEntry, vfs, sFilepath, sTitle, bDisplayIcon);
114     }
115
116 }
117
Popular Tags