01: /*
02: LoaderGenerator - tool for generated xml, sql and doml file needed for Octopus.
03:
04:
05: Copyright (C) 2003 Together
06:
07: This library is free software; you can redistribute it and/or
08: modify it under the terms of the GNU Lesser General Public
09: License as published by the Free Software Foundation; either
10: version 2.1 of the License, or (at your option) any later version.
11:
12: This library is distributed in the hope that it will be useful,
13: but WITHOUT ANY WARRANTY; without even the implied warranty of
14: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: Lesser General Public License for more details.
16:
17: You should have received a copy of the GNU Lesser General Public
18: License along with this library; if not, write to the Free Software
19: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20: */
21:
22: package org.webdocwf.util.loader.wizard;
23:
24: import java.awt.*;
25: import java.awt.event.*;
26: import javax.swing.*;
27: import javax.swing.event.*;
28: import java.util.*;
29: import java.net.URL;
30:
31: /**
32: *
33: * OctopusGeneratorHelpFrame class creates the help frame
34: * @author Radoslav Dutina
35: * @version 1.0
36: */
37: public class OctopusGeneratorHelpFrame extends JFrame {
38:
39: private OctopusHelpToolBar toolBar;
40: private OctopusHelpPane browserPane;
41: private OctopusHelpPane favoritesBrowserPane;
42:
43: private StringBuffer help = new StringBuffer();
44:
45: /**
46: * Construct the object of OctopusGeneratorHelpFrame class
47: */
48: public OctopusGeneratorHelpFrame() {
49: super ("Help for Together Data Transformer");
50:
51: browserPane = new OctopusHelpPane();
52: toolBar = new OctopusHelpToolBar(browserPane);
53: favoritesBrowserPane = new OctopusHelpPane();
54: favoritesBrowserPane.addHyperlinkListener(toolBar);
55:
56: JPanel leftPanel = new JPanel();
57: leftPanel.setLayout(new BoxLayout(leftPanel, BoxLayout.Y_AXIS));
58: JPanel buttonPanel = new JPanel();
59: JButton button = new JButton("Close Help ...");
60: button.setSize(new Dimension(100, 100));
61: button.setVisible(true);
62: buttonPanel.add(button, BorderLayout.CENTER);
63: button.addActionListener(new ActionListener() {
64: public void actionPerformed(ActionEvent e) {
65: dispose();
66: }
67:
68: });
69:
70: leftPanel.add(favoritesBrowserPane);
71: leftPanel.add(buttonPanel);
72:
73: toolBar.setVisible(true);
74: favoritesBrowserPane.goToURL(getClass().getResource(
75: "HelpPages/mainIndex.html"));
76:
77: JSplitPane splitPane = new JSplitPane(
78: JSplitPane.HORIZONTAL_SPLIT,
79: new JScrollPane(leftPanel),
80: new JScrollPane(browserPane));
81: splitPane.setDividerLocation(300);
82: splitPane.setOneTouchExpandable(true);
83:
84: Container contentPane = getContentPane();
85: contentPane.add(toolBar, BorderLayout.NORTH);
86: contentPane.add(splitPane, BorderLayout.CENTER);
87:
88: Dimension dimension = Toolkit.getDefaultToolkit()
89: .getScreenSize();
90: setBounds(1, 1, dimension.width - 5, dimension.height - 30);
91:
92: }
93: }
|