1 13 package com.tonbeller.wcf.tree; 14 15 20 public interface TreeModel { 21 22 public static final TreeModel EMPTY_MODEL = new TreeModel() { 23 public Object [] getRoots() { 24 return new Object [0]; 25 } 26 public boolean hasChildren(Object node) { 27 return false; 28 } 29 public Object [] getChildren(Object node) { 30 return null; 31 } 32 public Object getParent(Object node) { 33 return null; 34 } 35 public void addTreeModelChangeListener(TreeModelChangeListener l) { 36 } 37 public void removeTreeModelChangeListener(TreeModelChangeListener l) { 38 } 39 public void fireModelChanged(boolean identityChanged) { 40 } 41 }; 42 43 46 Object [] getRoots(); 47 48 51 boolean hasChildren(Object node); 52 53 56 Object [] getChildren(Object node); 57 58 61 Object getParent(Object node); 62 63 void addTreeModelChangeListener(TreeModelChangeListener l); 64 void removeTreeModelChangeListener(TreeModelChangeListener l); 65 66 67 72 void fireModelChanged(boolean identityChanged); 73 } 74 | Popular Tags |