1 package com.genimen.djeneric.tools.templateeditor.tree; 2 3 import javax.swing.ImageIcon ; 4 import javax.swing.JTree ; 5 6 import com.genimen.djeneric.structure.ExtentUsage; 7 import com.genimen.djeneric.tools.generator.util.Template; 8 import com.genimen.djeneric.tools.generator.util.TemplateSet; 9 import com.genimen.djeneric.tools.templateeditor.TemplateEditor; 10 11 public class TemplateTreeNode extends DefaultTemplateTreeNode 12 { 13 private static final long serialVersionUID = 1L; 14 Template _template; 15 16 public TemplateTreeNode(TemplateSet templateSet) 17 { 18 super(templateSet); 19 } 20 21 public TemplateTreeNode(ExtentUsage extentUsage, JTree tree, TemplateSet templateSet, Template tn) 22 { 23 super(extentUsage, tree, templateSet); 24 _template = tn; 25 } 26 27 public void expandNode() throws Exception 28 { 29 } 30 31 public void reload() throws Exception 32 { 33 } 34 35 public String toString() 36 { 37 if (_template == null) return "Dummy"; 38 return _template.getModuleName(); 39 } 40 41 public ImageIcon getImageIcon() 42 { 43 return TemplateEditor.getImageIcon("template.gif"); 44 } 45 46 public Template getTemplate() 47 { 48 return _template; 49 } 50 51 } | Popular Tags |