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.dods;
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 CoreDodsTool extends AbstractTool {
041: static ResourceBundle addinRes = ResourceBundle
042: .getBundle("org.enhydra.kelp.common.Res"); // nores
043:
044: private DodsInnerPanel innerPanel = null;
045: private DodsButtonPanel buttonPanel = null;
046:
047: public static final String getDefaultTitle() {
048: return "DODS Generator";
049: }
050:
051: public static void main(String[] args) {
052: SwingUtil.setLookAndFeelToSystem();
053: CoreDodsTool tool = null;
054:
055: tool = new CoreDodsTool();
056: tool.showDialog(new Frame());
057: System.exit(0);
058: }
059:
060: public CoreDodsTool() {
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 CoreDodsTool.getDefaultTitle();
074: }
075:
076: // implement AbstractTool
077: public ActionListener createButtonListener() {
078: return (new DodsButtonListener(this ));
079: }
080:
081: // implement AbstractTool
082: public InnerPanel getInnerPanel() {
083: if (innerPanel == null) {
084: innerPanel = new DodsInnerPanel();
085: }
086: return innerPanel;
087: }
088:
089: // implement AbstractTool
090: public ButtonPanel getButtonPanel() {
091: if (buttonPanel == null) {
092: buttonPanel = new DodsButtonPanel();
093: }
094: return buttonPanel;
095: }
096:
097: // implement AbstractTool
098: protected String getProgressTitle() {
099: return addinRes.getString("Dods_Progress");
100: }
101:
102: protected void back() {
103: innerPanel.back();
104: }
105:
106: protected void generate() {
107: innerPanel.generate(this);
108: }
109:
110: }
|