1 18 package org.apache.batik.gvt; 19 20 import java.util.LinkedList ; 21 import java.util.List ; 22 23 import org.apache.batik.gvt.event.GraphicsNodeChangeListener; 24 25 31 public class RootGraphicsNode extends CompositeGraphicsNode { 32 33 List treeGraphicsNodeChangeListeners = null; 34 35 38 public RootGraphicsNode() {} 39 40 44 public RootGraphicsNode getRoot() { 45 return this; 46 } 47 48 public List getTreeGraphicsNodeChangeListeners() { 49 if (treeGraphicsNodeChangeListeners == null) { 50 treeGraphicsNodeChangeListeners = new LinkedList (); 51 } 52 return treeGraphicsNodeChangeListeners; 53 } 54 55 public void addTreeGraphicsNodeChangeListener 56 (GraphicsNodeChangeListener l) { 57 getTreeGraphicsNodeChangeListeners().add(l); 58 } 59 60 public void removeTreeGraphicsNodeChangeListener 61 (GraphicsNodeChangeListener l) { 62 getTreeGraphicsNodeChangeListeners().remove(l); 63 } 64 65 } 66 | Popular Tags |