1 13 package com.tonbeller.wcf.tree; 14 15 18 public class TreeModelDecorator implements TreeModel, DecoratedTreeModel { 19 private TreeModel decoree; 20 21 public TreeModelDecorator() { 22 } 23 24 public TreeModelDecorator(TreeModel decoree) { 25 this.decoree = decoree; 26 } 27 28 public Object [] getRoots() { 29 return decoree.getRoots(); 30 } 31 32 public boolean hasChildren(Object node) { 33 return decoree.hasChildren(node); 34 } 35 36 public Object [] getChildren(Object node) { 37 return decoree.getChildren(node); 38 } 39 40 public Object getParent(Object node) { 41 return decoree.getParent(node); 42 } 43 44 public void addTreeModelChangeListener(TreeModelChangeListener l) { 45 decoree.addTreeModelChangeListener(l); 46 } 47 48 public void removeTreeModelChangeListener(TreeModelChangeListener l) { 49 decoree.removeTreeModelChangeListener(l); 50 } 51 52 public void fireModelChanged(boolean identityChanged) { 53 decoree.fireModelChanged(identityChanged); 54 } 55 56 public TreeModel getDecoree() { 57 return decoree; 58 } 59 60 public void setDecoree(TreeModel model) { 61 decoree = model; 62 } 63 64 } 65 | Popular Tags |