1 23 package org.enhydra.kelp.common.importer; 24 25 import org.enhydra.kelp.common.ValidationException; 27 import org.enhydra.kelp.common.ValidationUtil; 28 import org.enhydra.kelp.common.importer.ImportPaths; 29 30 import javax.swing.*; 32 import javax.swing.border.*; 33 import java.awt.*; 34 import java.awt.event.ActionEvent ; 35 import java.awt.event.ActionListener ; 36 import java.beans.*; 37 import java.io.File ; 38 import java.util.Properties ; 39 40 46 public class ImporterPanel extends JPanel { 47 transient private ImportPaths paths; 48 49 private final String WRITE_OPTIONS_EXCEPTION = 51 "writeOptions() not implemented"; private final String VALIDATE_OPTIONS_EXCEPTION = 53 "validateOptions() not implemented"; private final String PAGE_TITLE = "PAGE TITLE"; private final String INSTRUCTIONS = "INSTRUCTIONS"; 57 public void setPaths(ImportPaths p) { 58 paths = p; 59 readOptions(); 60 } 61 62 public ImportPaths getPaths() { 63 return paths; 64 } 65 66 public void activated() {} 67 68 public void checkPage() throws ValidationException { 69 writeOptions(); 70 } 71 72 79 public void readOptions() {} 80 81 88 public void writeOptions() throws ValidationException { 89 throw new ValidationException(WRITE_OPTIONS_EXCEPTION); 90 } 91 92 100 public void validateOptions() throws ValidationException { 101 throw new ValidationException(VALIDATE_OPTIONS_EXCEPTION); 102 } 103 104 110 public String getPageTitle() { 111 return PAGE_TITLE; 112 } 113 114 121 public String getInstructions() { 122 StringBuffer buf = new StringBuffer (); 123 124 buf.append(INSTRUCTIONS); 125 return buf.toString(); 126 } 127 128 } 129 | Popular Tags |