1 7 8 package org.gjt.jclasslib.browser; 9 10 import javax.swing.tree.DefaultMutableTreeNode ; 11 12 19 public class BrowserTreeNode extends DefaultMutableTreeNode { 20 21 24 public static final String NODE_NO_CONTENT = "noContent"; 25 28 public static final String NODE_GENERAL = "general"; 29 32 public static final String NODE_CONSTANT_POOL = "constantPool"; 33 36 public static final String NODE_INTERFACE = "interface"; 37 40 public static final String NODE_FIELD = "field"; 41 44 public static final String NODE_METHOD = "method"; 45 48 public static final String NODE_ATTRIBUTE = "attribute"; 49 52 public static final String NODE_ANNOTATION = "annotation"; 53 56 public static final String NODE_ELEMENTVALUEPAIR = "elementvaluepair"; 57 60 public static final String NODE_ELEMENTVALUE = "elementvalue"; 61 64 public static final String NODE_ARRAYELEMENTVALUE = "arrayelementvalue"; 65 66 67 private String type; 68 private int index; 69 private Object element; 70 71 76 public BrowserTreeNode(String text) { 77 this(text, NODE_NO_CONTENT); 78 } 79 80 86 public BrowserTreeNode(String text, String type) { 87 this(text, type, 0); 88 } 89 90 97 public BrowserTreeNode(String text, String type, int index) { 98 this(text, type, index, null); 99 } 100 101 public BrowserTreeNode(String text, String type, int index, Object element) { 102 super(text); 103 this.type = type; 104 this.index = index; 105 this.element = element; 106 } 107 108 113 public String getType() { 114 return type; 115 } 116 117 124 public int getIndex() { 125 return index; 126 } 127 128 133 public Object getElement() { 134 return element; 135 } 136 } 137 | Popular Tags |