1 13 package com.tonbeller.wcf.tree; 14 15 18 public class EmptyTreeModel implements TreeModel { 19 static TreeModel model = new EmptyTreeModel(); 20 public static TreeModel instance() { 21 return model; 22 } 23 24 private EmptyTreeModel() { 25 } 26 27 public Object [] getRoots() { 28 return new Object [0]; 29 } 30 31 public boolean hasChildren(Object node) { 32 return false; 33 } 34 35 public Object [] getChildren(Object node) { 36 return null; 37 } 38 39 public Object getParent(Object node) { 40 return null; 41 } 42 43 public void addTreeModelChangeListener(TreeModelChangeListener l) { 44 } 45 46 public void removeTreeModelChangeListener(TreeModelChangeListener l) { 47 } 48 49 public void fireModelChanged(boolean identityChanged) { 50 } 51 } 52 | Popular Tags |