]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.g3d/src/org/simantics/g3d/scenegraph/base/INode.java
Use ListenerList with G3D nodes
[simantics/3d.git] / org.simantics.g3d / src / org / simantics / g3d / scenegraph / base / INode.java
index 390b3a20c7938345426a1716eeccf686b56ec15e..8dfef39d84c3079b217b82478328af7b08f961ef 100644 (file)
@@ -11,7 +11,7 @@
  *******************************************************************************/
 package org.simantics.g3d.scenegraph.base;
 
-import java.util.List;
+import org.eclipse.core.runtime.ListenerList;
 
 
 
@@ -20,49 +20,49 @@ import java.util.List;
 public interface INode {
        
        /**
-     * 
-     * @return unique node identifier
-     */
-   // public Long getId();
+        
+        * @return unique node identifier
+        */
+       // public Long getId();
 
-        /**
-     * @return root node of the scene graph or <code>null</code> if this node is
-     *         not part of a properly rooted scene graph hierarchy
-     */
-    public ParentNode<?> getRootNode();
+       /**
+        * @return root node of the scene graph or <code>null</code> if this node is
+        *         not part of a properly rooted scene graph hierarchy
+        */
+       public ParentNode<?> getRootNode();
 
-    /**
-     * @return Parent node reference or <code>null</code> if not set
-     */
-    public ParentNode<?> getParent();
-    
-    public String getParentRel();
-    /**
-     * Set parent node. This method is for scene graph internal use only and
-     * should not be called outside the scene graph structure. This method
-     * simply sets the parent node parent field, and does not affect on parent
-     * node (i.e., should be called only from parent node).
-     */
-    public void setParent(ParentNode<?> parent, String name);
+       /**
+        * @return Parent node reference or <code>null</code> if not set
+        */
+       public ParentNode<?> getParent();
+       
+       public String getParentRel();
+       /**
+        * Set parent node. This method is for scene graph internal use only and
+        * should not be called outside the scene graph structure. This method
+        * simply sets the parent node parent field, and does not affect on parent
+        * node (i.e., should be called only from parent node).
+        */
+       public void setParent(ParentNode<?> parent, String name);
 
-    /**
-     * Perform cleanup for this node and for the child nodes. Any resources
-     * (including child nodes) related to this node are unusable after this
-     * operation. This method is for scene graph internal use only, thus should
-     * not be called outside the scene graph structure.
-     */
-    public void cleanup();
-    /**
-     * Remove this node and its children from the scene graph.
-     */
-    public void remove();
-    
-    public void deattach();
+       /**
+        * Perform cleanup for this node and for the child nodes. Any resources
+        * (including child nodes) related to this node are unusable after this
+        * operation. This method is for scene graph internal use only, thus should
+        * not be called outside the scene graph structure.
+        */
+       public void cleanup();
+       /**
+        * Remove this node and its children from the scene graph.
+        */
+       public void remove();
+       
+       public void deattach();
 
-    
-    public void addListener(NodeListener listener);
+       
+       public void addListener(NodeListener listener);
        public void removeListener(NodeListener listener);
        
-       public List<NodeListener> getListeners();
+       public ListenerList<NodeListener> getListeners();
 
 }