01: /*
02: * The contents of this file are subject to the
03: * Mozilla Public License Version 1.1 (the "License");
04: * you may not use this file except in compliance with the License.
05: * You may obtain a copy of the License at http://www.mozilla.org/MPL/
06: *
07: * Software distributed under the License is distributed on an "AS IS"
08: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
09: * 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;
22: import java.awt.Font;
23:
24: import javax.swing.JPanel;
25: import javax.swing.JTabbedPane;
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: * The information panel which contains the console, session and quick
34: * help windows.
35: *
36: * @author Matthew Large
37: * @version $Revision: 1.1 $
38: *
39: */
40: public class InformationBar extends JPanel {
41:
42: /**
43: * Tabs.
44: */
45: private JTabbedPane m_tabs = new JTabbedPane();
46:
47: /**
48: * Constructs a new information bar.
49: *
50: */
51: public InformationBar() {
52: super ();
53: this .setup();
54: }
55:
56: /**
57: * Initialses this component.
58: *
59: */
60: private void setup() {
61: BorderLayout layout = new BorderLayout();
62: layout.setHgap(0);
63: layout.setVgap(0);
64: this .setLayout(layout);
65:
66: String fontName = "Dialog";
67: int fontSize = 11;
68: Font font = new Font(fontName, Font.PLAIN, fontSize);
69: m_tabs.setFont(font);
70:
71: m_tabs.addTab("Console", IconManager.getInstance().getIcon(
72: "16-message-container.gif"), new MessageWindow(m_tabs));
73: m_tabs.addTab("This Session", IconManager.getInstance()
74: .getIcon("16-session-container.gif"), SessionWindow
75: .getInstance());
76: m_tabs.addTab("How to...", IconManager.getInstance().getIcon(
77: "16-command-help.gif"), new QuickHelpWindow());
78:
79: this .add(this .m_tabs);
80:
81: this .setVisible(true);
82: }
83:
84: }
|