1 2 24 package org.enhydra.tool.archive.wizard; 25 26 import org.enhydra.tool.ToolBoxInfo; 30 import org.enhydra.tool.archive.JarPlan; 31 import org.enhydra.tool.archive.ArchiveException; 32 import org.enhydra.tool.archive.ArchiveTool; 33 import org.enhydra.tool.common.PathHandle; 34 import org.enhydra.tool.common.SwingUtil; 35 36 import javax.swing.*; 40 import javax.swing.border.*; 41 import java.awt.*; 42 import java.awt.event.ActionEvent ; 43 import java.awt.event.ActionListener ; 44 import java.io.File ; 45 import java.util.ArrayList ; 46 import java.util.ResourceBundle ; 47 import java.util.jar.Manifest ; 48 import java.util.jar.JarInputStream ; 49 50 54 public class E3Type extends ArchiveType { 55 public final static String EXT = "jar"; 56 protected final String getSelectionName() { 58 return "Enhydra Application"; 59 } 60 61 protected final String getExtension() { 62 return EXT; 63 } 64 65 protected final String getType() { 66 return "e3-jar"; 67 } 68 69 70 protected final String getDescription() { 71 StringBuffer buf = new StringBuffer (); 72 73 buf.append("Create a jar for an Enhydra super servlet. "); 74 buf.append("Super servlet jars are compatable with Enhydra 5."); 75 return buf.toString(); 76 } 77 78 protected void initPanels() throws ArchiveException { 79 E3FilePanel filePanel = new E3FilePanel(); 80 ClassesPanel classesPanel = new ClassesPanel(); 81 ArchivePanel[] newPanels = new ArchivePanel[2]; 82 83 newPanels[0] = filePanel; 84 newPanels[1] = classesPanel; 85 setWizardPanels(newPanels); 86 } 87 88 protected void initPlan() throws ArchiveException { 89 PathHandle path = null; 90 91 setPlan(new JarPlan()); 92 getPlan().setArchivePath(getDefaultArchivePath()); 93 path = PathHandle.createPathHandle(getPlan().getArchivePath()); 94 if (path.isFile()) { 95 readArchive(getPlan().getArchivePath()); 96 } 97 } 98 99 } 100 | Popular Tags |