1 7 8 package org.gjt.jclasslib.nbmodule; 9 10 import org.openide.filesystems.FileObject; 11 import org.openide.nodes.*; 12 13 19 public class ClassFileNode extends AbstractNode { 20 21 private FileObject fo; 22 23 27 public ClassFileNode(FileObject fo) { 28 super(Children.LEAF); 29 this.fo = fo; 30 setIconBase("/org/gjt/jclasslib/nbmodule/nbmodule"); 31 setName(fo.getName()); 32 } 33 34 38 public FileObject getFileObject() { 39 return fo; 40 } 41 42 46 public Node.Handle getHandle() { 47 return new ClassFileNodeHandle(this); 48 } 49 50 51 public static class ClassFileNodeHandle implements Node.Handle { 52 private FileObject fo; 53 54 58 public ClassFileNodeHandle(ClassFileNode node) { 59 fo = node.fo; 60 } 61 62 public Node getNode() { 63 return new ClassFileNode(fo); 64 } 65 } 66 67 } 68 | Popular Tags |