KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > webdocwf > util > loader > wizard > OctopusGeneratorHelpFrame


1
2 /*
3 LoaderGenerator - tool for generated xml, sql and doml file needed for Octopus.
4
5
6     Copyright (C) 2003 Together
7
8     This library is free software; you can redistribute it and/or
9     modify it under the terms of the GNU Lesser General Public
10     License as published by the Free Software Foundation; either
11     version 2.1 of the License, or (at your option) any later version.
12
13     This library is distributed in the hope that it will be useful,
14     but WITHOUT ANY WARRANTY; without even the implied warranty of
15     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16     Lesser General Public License for more details.
17
18     You should have received a copy of the GNU Lesser General Public
19     License along with this library; if not, write to the Free Software
20     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */

22
23 package org.webdocwf.util.loader.wizard;
24
25 import java.awt.*;
26 import java.awt.event.*;
27 import javax.swing.*;
28 import javax.swing.event.*;
29 import java.util.*;
30 import java.net.URL JavaDoc;
31
32
33
34
35 /**
36  *
37  * OctopusGeneratorHelpFrame class creates the help frame
38  * @author Radoslav Dutina
39  * @version 1.0
40  */

41 public class OctopusGeneratorHelpFrame extends JFrame{
42
43   private OctopusHelpToolBar toolBar;
44   private OctopusHelpPane browserPane;
45   private OctopusHelpPane favoritesBrowserPane;
46
47
48
49
50 private StringBuffer JavaDoc help = new StringBuffer JavaDoc();
51
52 /**
53  * Construct the object of OctopusGeneratorHelpFrame class
54  */

55 public OctopusGeneratorHelpFrame() {
56     super("Help for Enhydra Octopus" );
57
58     browserPane=new OctopusHelpPane();
59     toolBar=new OctopusHelpToolBar(browserPane);
60     favoritesBrowserPane=new OctopusHelpPane();
61     favoritesBrowserPane.addHyperlinkListener(toolBar);
62
63     JPanel leftPanel=new JPanel();
64     leftPanel.setLayout(new BoxLayout(leftPanel,BoxLayout.Y_AXIS));
65     JPanel buttonPanel=new JPanel();
66     JButton button = new JButton("Close Help ...");
67     button.setSize(new Dimension(100, 100));
68     button.setVisible(true);
69     buttonPanel.add(button,BorderLayout.CENTER);
70     button.addActionListener(new ActionListener() {
71       public void actionPerformed(ActionEvent e) {
72         dispose();
73       }
74
75     });
76
77     leftPanel.add(favoritesBrowserPane);
78     leftPanel.add(buttonPanel);
79
80     toolBar.setVisible(true);
81     favoritesBrowserPane.goToURL(getClass().getResource("HelpPages/mainIndex.html"));
82
83
84     JSplitPane splitPane=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
85                                         new JScrollPane (leftPanel),
86                                         new JScrollPane (browserPane));
87     splitPane.setDividerLocation(300);
88     splitPane.setOneTouchExpandable(true);
89
90     Container contentPane=getContentPane();
91     contentPane.add(toolBar,BorderLayout.NORTH);
92     contentPane.add(splitPane,BorderLayout.CENTER);
93
94     Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
95     setBounds(1,1,dimension.width-5, dimension.height-30);
96
97   }
98 }
Popular Tags