KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > tool > archive > wizard > ArchivePage


1
2 /*
3  * Enhydra Java Application Server Project
4  *
5  * The contents of this file are subject to the Enhydra Public License
6  * Version 1.1 (the "License"); you may not use this file except in
7  * compliance with the License. You may obtain a copy of the License on
8  * the Enhydra web site ( http://www.enhydra.org/ ).
9  *
10  * Software distributed under the License is distributed on an "AS IS"
11  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
12  * the License for the specific terms governing rights and limitations
13  * under the License.
14  *
15  * The Initial Developer of the Enhydra Application Server is Lutris
16  * Technologies, Inc. The Enhydra Application Server and portions created
17  * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
18  * All Rights Reserved.
19  *
20  * Contributor(s):
21  * Paul Mahar
22  *
23  */

24 package org.enhydra.tool.archive.wizard;
25
26 // ToolBox imports
27
import org.enhydra.tool.ToolBoxInfo;
28 import org.enhydra.tool.archive.ArchiveException;
29 import org.enhydra.tool.archive.JarPlan;
30 import org.enhydra.tool.common.Browser;
31 import org.enhydra.tool.common.ToolException;
32 import org.enhydra.tool.common.wizard.TBWizardPage;
33
34 // Standard imports
35
import java.awt.*;
36 import java.beans.*;
37 import java.io.File JavaDoc;
38 import javax.swing.*;
39
40 /**
41  * The ArchivePage is a panel that you can add to the ArchiveDialog. It displays
42  * a page title, instructions and an ArchivePanel.
43  */

44 public class ArchivePage extends TBWizardPage {
45
46     /**
47      * Create an ArchivePage.
48      */

49     public ArchivePage() {
50         super();
51     }
52
53     public void validatePage() throws ToolException {
54         getArchivePanel().validatePlan();
55     }
56
57     public void preparePage() {
58         getArchivePanel().preparePanel();
59     }
60
61     private ArchivePanel getArchivePanel() {
62         return (ArchivePanel) getWizardPanel();
63     }
64
65     protected void writePlan(JarPlan plan) throws ArchiveException {
66         getArchivePanel().writePlan(plan);
67     }
68
69     protected void readPlan(JarPlan plan) throws ArchiveException {
70         getArchivePanel().readPlan(plan);
71     }
72
73     public void help() {
74         Browser browser = new Browser();
75         StringBuffer JavaDoc buf = new StringBuffer JavaDoc();
76
77         browser.setOwner(getTopLevelAncestor());
78         buf.append(ToolBoxInfo.getEnhydraRoot());
79         buf.append(File.separatorChar);
80         buf.append("doc"); // nores
81
buf.append(File.separatorChar);
82         buf.append("index.html"); // nores
83
browser.open(buf.toString());
84     }
85
86 }
87
Popular Tags