1 19 20 package org.netbeans.modules.j2ee.persistenceapi; 21 import java.io.File ; 22 23 import java.util.EventObject ; 24 25 import org.openide.filesystems.FileObject; 26 27 import org.openide.filesystems.FileUtil; 28 29 33 public final class FileChangeSupportEvent extends EventObject { 34 35 public static final int EVENT_CREATED = 0; 36 public static final int EVENT_DELETED = 1; 37 public static final int EVENT_MODIFIED = 2; 38 39 private final int type; 40 private final File path; 41 42 FileChangeSupportEvent(FileChangeSupport support, int type, File path) { 43 super(support); 44 this.type = type; 45 this.path = path; 46 } 47 48 public int getType() { 49 return type; 50 } 51 52 public File getPath() { 53 return path; 54 } 55 56 public FileObject getFileObject() { 57 return FileUtil.toFileObject(path); 58 } 59 60 public String toString() { 61 return "FCSE[" + "CDM".charAt(type) + ":" + path + "]"; } 63 64 } 65 | Popular Tags |