001: /*
002: * Enhydra Java Application Server Project
003: *
004: * The contents of this file are subject to the Enhydra Public License
005: * Version 1.1 (the "License"); you may not use this file except in
006: * compliance with the License. You may obtain a copy of the License on
007: * the Enhydra web site ( http://www.enhydra.org/ ).
008: *
009: * Software distributed under the License is distributed on an "AS IS"
010: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
011: * the License for the specific terms governing rights and limitations
012: * under the License.
013: *
014: * The Initial Developer of the Enhydra Application Server is Lutris
015: * Technologies, Inc. The Enhydra Application Server and portions created
016: * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
017: * All Rights Reserved.
018: *
019: * Contributor(s):
020: * Paul Mahar
021: *
022: */
023:
024: package org.enhydra.kelp.common.deployer;
025:
026: // Kelp imports
027: import org.enhydra.kelp.common.AbstractTool;
028:
029: // ToolBox imports
030: import org.enhydra.tool.common.ButtonPanel;
031: import org.enhydra.tool.common.InnerPanel;
032: import org.enhydra.tool.common.SwingUtil;
033:
034: // Standard imports
035: import java.awt.Frame;
036: import java.awt.event.ActionListener;
037: import java.util.ResourceBundle;
038:
039: //
040: public class CoreDeployTool extends AbstractTool {
041: static ResourceBundle addinRes = ResourceBundle
042: .getBundle("org.enhydra.kelp.common.Res"); // nores
043:
044: private DeployInnerPanel innerPanel = null;
045: private DeployButtonPanel buttonPanel = null;
046:
047: public static final String getDefaultTitle() {
048: return "Kelp Deployer";
049: }
050:
051: public static void main(String[] args) {
052: SwingUtil.setLookAndFeelToSystem();
053: CoreDeployTool tool = null;
054:
055: tool = new CoreDeployTool();
056: tool.showDialog(new Frame());
057: System.exit(0);
058: }
059:
060: public CoreDeployTool() {
061: super ();
062: }
063:
064: // override AbstractTool
065: public void clearAll() {
066: super .clearAll();
067: innerPanel = null;
068: buttonPanel = null;
069: }
070:
071: // implement AbstractTool
072: public String getTitle() {
073: return CoreDeployTool.getDefaultTitle();
074: }
075:
076: // implement AbstractTool
077: public ActionListener createButtonListener() {
078: return (new DeployButtonListener(this ));
079: }
080:
081: // implement AbstractTool
082: public InnerPanel getInnerPanel() {
083: if (innerPanel == null) {
084: innerPanel = new DeployInnerPanel();
085: }
086: return innerPanel;
087: }
088:
089: // implement AbstractTool
090: public ButtonPanel getButtonPanel() {
091: if (buttonPanel == null) {
092: buttonPanel = new DeployButtonPanel();
093: }
094: return buttonPanel;
095: }
096:
097: // implement AbstractTool
098: protected String getProgressTitle() {
099: 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: }
|