1 package net.sf.panoptes.model.node; 2 3 import java.util.ArrayList ; 4 import java.util.List ; 5 6 7 14 public class GroupNode extends NodeSupport { 15 16 private boolean acceptsChildren = true; 17 18 21 private ArrayList children; 22 23 public GroupNode(Node parent) { 24 super(parent); 25 children = new ArrayList (); 26 } 27 28 public GroupNode(Node parent, String name, String description) { 29 this(parent); 30 getConfigDescriptor().setName(name); 31 getConfigDescriptor().setDescription(description); 32 getConfigDescriptor().setIconName(Node.ICON_FOLDER); 33 } 34 35 public void init() { 36 37 } 38 39 public int size() { 40 return children.size(); 41 } 42 43 public void addChild(Node child) { 44 children.add(child); 45 } 46 47 public List getChildren() { 48 return children; 49 50 } 51 public boolean mightHaveChildren() { 52 return true; 53 } 54 55 public void refresh() { 56 57 } 58 59 public void clear() { 60 children.clear(); 61 } 62 63 66 public Object getBean() { 67 return this; 68 } 69 70 71 } 72 | Popular Tags |