1 18 19 package org.objectweb.jac.aspects.gui; 20 21 import javax.swing.tree.DefaultMutableTreeNode ; 22 23 27 public abstract class AbstractNode extends DefaultMutableTreeNode { 28 String icon; 29 String text; 30 String tooltip; 31 TreeView model; 32 boolean showRelations = false; 33 boolean isLeaf = true; 34 boolean areChildrenUptodate = false; 35 36 public AbstractNode() { 37 } 38 39 public AbstractNode(TreeView model, Object object, boolean showRelations) { 40 super(object); 41 this.model = model; 42 this.showRelations = showRelations; 43 } 44 45 48 public boolean isLeaf() { 49 return super.isLeaf() && isLeaf; 50 } 51 52 57 public void setLeaf(boolean isLeaf) { 58 this.isLeaf = isLeaf; 59 } 60 61 63 64 public boolean areChildrenUptodate() { 65 return areChildrenUptodate; 66 } 67 68 73 74 public void setChildrenUptodate(boolean value) { 75 this.areChildrenUptodate = value; 76 } 77 78 80 81 public void setModel(TreeView model) { 82 this.model = model; 83 } 84 85 87 88 public String getIcon() { 89 return icon; 90 } 91 92 94 95 public String getText() { 96 return text; 97 } 98 99 public String getToolTip() { 100 return tooltip; 101 } 102 103 106 public abstract void unregisterEvents(); 107 108 114 115 public void setParent(DefaultMutableTreeNode parent) { 116 super.setParent(parent); 117 if (parent==null) { 118 unregisterEvents(); 119 } 120 } 121 } 122 | Popular Tags |