KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openharmonise > him > window > InformationBar


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 package org.openharmonise.him.window;
20
21 import java.awt.BorderLayout JavaDoc;
22 import java.awt.Font JavaDoc;
23
24 import javax.swing.JPanel JavaDoc;
25 import javax.swing.JTabbedPane JavaDoc;
26
27 import org.openharmonise.him.window.messages.*;
28 import org.openharmonise.him.window.quickhelp.*;
29 import org.openharmonise.him.window.session.*;
30 import org.openharmonise.vfs.gui.*;
31
32
33 /**
34  * The information panel which contains the console, session and quick
35  * help windows.
36  *
37  * @author Matthew Large
38  * @version $Revision: 1.1 $
39  *
40  */

41 public class InformationBar extends JPanel JavaDoc {
42
43     /**
44      * Tabs.
45      */

46     private JTabbedPane JavaDoc m_tabs = new JTabbedPane JavaDoc();
47
48     /**
49      * Constructs a new information bar.
50      *
51      */

52     public InformationBar() {
53         super();
54         this.setup();
55     }
56     
57     /**
58      * Initialses this component.
59      *
60      */

61     private void setup() {
62         BorderLayout JavaDoc layout = new BorderLayout JavaDoc();
63         layout.setHgap(0);
64         layout.setVgap(0);
65         this.setLayout(layout);
66         
67         String JavaDoc fontName = "Dialog";
68         int fontSize = 11;
69         Font JavaDoc font = new Font JavaDoc(fontName, Font.PLAIN, fontSize);
70         m_tabs.setFont(font);
71         
72         m_tabs.addTab("Console", IconManager.getInstance().getIcon("16-message-container.gif"), new MessageWindow(m_tabs));
73         m_tabs.addTab("This Session", IconManager.getInstance().getIcon("16-session-container.gif"), SessionWindow.getInstance());
74         m_tabs.addTab("How to...", IconManager.getInstance().getIcon("16-command-help.gif"), new QuickHelpWindow());
75         
76         this.add(this.m_tabs);
77         
78         this.setVisible(true);
79     }
80
81 }
82
Popular Tags