1 23 24 package org.enhydra.kelp.common.dods; 25 26 import org.enhydra.kelp.common.AbstractTool; 28 29 import org.enhydra.tool.common.ButtonPanel; 31 import org.enhydra.tool.common.InnerPanel; 32 import org.enhydra.tool.common.SwingUtil; 33 34 import java.awt.Frame ; 36 import java.awt.event.ActionListener ; 37 import java.util.ResourceBundle ; 38 39 import java.io.File ; 41 import org.enhydra.dods.generator.DODSGenerator; 42 43 public class CoreDodsTool extends AbstractTool { 45 static ResourceBundle addinRes = 46 ResourceBundle.getBundle("org.enhydra.kelp.common.Res"); 48 private DodsInnerPanel innerPanel = null; 49 private DodsButtonPanel buttonPanel = null; 50 DODSGenerator generator; 51 52 public static final String getDefaultTitle() { 53 return "DODS Generator"; 54 } 55 56 public static void main(String [] args) { 57 System.setProperty("DODS_HOME", "C:"+File.separator+"enhydra5.2"+ 59 File.separator+"dods"); 60 61 SwingUtil.setLookAndFeelToSystem(); 62 CoreDodsTool tool = null; 63 64 tool = new CoreDodsTool(); 65 tool.showDialog(new Frame ()); 66 System.exit(0); 67 } 68 69 public CoreDodsTool() { 70 super(); 71 } 72 73 public void clearAll() { 75 super.clearAll(); 76 innerPanel = null; 77 buttonPanel = null; 78 } 79 80 public String getTitle() { 82 return CoreDodsTool.getDefaultTitle(); 83 } 84 85 public ActionListener createButtonListener() { 87 return (new DodsButtonListener(this)); 88 } 89 90 public InnerPanel getInnerPanel() { 92 if (innerPanel == null) { 93 innerPanel = new DodsInnerPanel(); 94 } 95 return innerPanel; 96 } 97 98 public ButtonPanel getButtonPanel() { 100 if (buttonPanel == null) { 101 buttonPanel = new DodsButtonPanel(); 102 } 103 return buttonPanel; 104 } 105 106 protected String getProgressTitle() { 108 return addinRes.getString("Dods_Progress"); 109 } 110 111 protected void back() { 112 innerPanel.back(); 113 } 114 115 protected void generate() { 116 innerPanel.generate(this); 117 } 118 119 } 120 | Popular Tags |