KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > kelp > common > deployer > CoreDeployTool


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

23
24 package org.enhydra.kelp.common.deployer;
25
26 // Kelp imports
27
import org.enhydra.kelp.common.AbstractTool;
28
29 // ToolBox imports
30
import org.enhydra.tool.common.ButtonPanel;
31 import org.enhydra.tool.common.InnerPanel;
32 import org.enhydra.tool.common.SwingUtil;
33
34 // Standard imports
35
import java.awt.Frame JavaDoc;
36 import java.awt.event.ActionListener JavaDoc;
37 import java.util.ResourceBundle JavaDoc;
38
39 //
40
public class CoreDeployTool extends AbstractTool {
41     static ResourceBundle JavaDoc addinRes =
42         ResourceBundle.getBundle("org.enhydra.kelp.common.Res"); // nores
43

44     private DeployInnerPanel innerPanel = null;
45     private DeployButtonPanel buttonPanel = null;
46
47     public static final String JavaDoc getDefaultTitle() {
48       return "Kelp Deployer";
49     }
50
51     public static void main(String JavaDoc[] args) {
52         SwingUtil.setLookAndFeelToSystem();
53         CoreDeployTool tool = null;
54
55         tool = new CoreDeployTool();
56         tool.showDialog(new Frame JavaDoc());
57         System.exit(0);
58     }
59
60     public CoreDeployTool() {
61         super();
62     }
63
64     // override AbstractTool
65
public void clearAll() {
66         super.clearAll();
67         innerPanel = null;
68         buttonPanel = null;
69     }
70
71     // implement AbstractTool
72
public String JavaDoc getTitle() {
73       return CoreDeployTool.getDefaultTitle();
74     }
75
76     // implement AbstractTool
77
public ActionListener JavaDoc createButtonListener() {
78         return (new DeployButtonListener(this));
79     }
80
81     // implement AbstractTool
82
public InnerPanel getInnerPanel() {
83         if (innerPanel == null) {
84             innerPanel = new DeployInnerPanel();
85         }
86         return innerPanel;
87     }
88
89     // implement AbstractTool
90
public ButtonPanel getButtonPanel() {
91         if (buttonPanel == null) {
92             buttonPanel = new DeployButtonPanel();
93         }
94         return buttonPanel;
95     }
96
97     // implement AbstractTool
98
protected String JavaDoc getProgressTitle() {
99         return addinRes.getString("Deployment_Progress");
100     }
101
102     protected void back() {
103       innerPanel.back();
104     }
105
106     protected void next() {
107       innerPanel.next();
108     }
109
110     protected void deploy() {
111        innerPanel.deploy(this);
112     }
113
114 }
115
Popular Tags