1 33 34 package edu.rice.cs.util.docnavigation; 35 36 import javax.swing.tree.*; 37 import java.io.File ; 38 39 class RootNode<ItemT extends INavigatorItem> extends DefaultMutableTreeNode implements NodeData<ItemT> { 40 41 public RootNode(File f) { super(f); } 42 public RootNode(String s) { this(new File (s)); } 43 public void setData(File f) { super.setUserObject(f); } 44 public File getData() { return (File ) super.getUserObject(); } 45 public String toString() { return getData().toString(); } 46 47 52 public <Ret> Ret execute(NodeDataVisitor<? super ItemT, Ret> v, Object ... p) { return v.fileCase(getData(), p); } 53 } 54 | Popular Tags |