1 25 26 29 package net.killingar.forum.internal; 30 31 import java.util.ArrayList ; 32 import java.util.List ; 33 34 public class ParentIDItemTreeNode 35 { 36 public ParentIDItem item; 37 public List subnodes; 38 public int indent = 0; 39 40 public ParentIDItemTreeNode() 41 { 42 } 43 44 public ParentIDItemTreeNode(ParentIDItem inItem) 45 { 46 item = inItem; 47 48 if (item == null) 49 throw new RuntimeException (); 50 } 51 52 public ParentIDItemTreeNode(ParentIDItem inItem, int inIndent) 53 { 54 item = inItem; 55 indent = inIndent; 56 57 if (item == null) 58 throw new RuntimeException (); 59 } 60 61 public void setSubnodes(List in) { subnodes = in; } 62 public void setItem(ParentIDItem in) { item = in; } 63 public void setIndent(int in) { indent = in; } 64 65 public List getSubnodes() { return subnodes; } 66 public ParentIDItem getItem() { return item; } 67 public int getIndent() { return indent; } 68 69 public List getSubnodesAlways() { if (subnodes == null)subnodes = new ArrayList (); return subnodes; } 70 71 public boolean hasSubnodes() { return subnodes != null && subnodes.size() != 0; } 72 } 73 | Popular Tags |