]> gerrit.simantics Code Review - simantics/3d.git/blob - org.simantics.g3d/src/org/simantics/g3d/scenegraph/base/INode.java
3D framework (Simca 2012)
[simantics/3d.git] / org.simantics.g3d / src / org / simantics / g3d / scenegraph / base / INode.java
1 package org.simantics.g3d.scenegraph.base;\r
2 \r
3 import java.util.List;\r
4 \r
5 \r
6 \r
7 \r
8 \r
9 public interface INode {\r
10         \r
11         /**\r
12      * \r
13      * @return unique node identifier\r
14      */\r
15     public Long getId();\r
16 \r
17          /**\r
18      * @return root node of the scene graph or <code>null</code> if this node is\r
19      *         not part of a properly rooted scene graph hierarchy\r
20      */\r
21     public ParentNode<?> getRootNode();\r
22 \r
23     /**\r
24      * @return Parent node reference or <code>null</code> if not set\r
25      */\r
26     public ParentNode<?> getParent();\r
27     \r
28     public String getParentRel();\r
29     /**\r
30      * Set parent node. This method is for scene graph internal use only and\r
31      * should not be called outside the scene graph structure. This method\r
32      * simply sets the parent node parent field, and does not affect on parent\r
33      * node (i.e., should be called only from parent node).\r
34      */\r
35     public void setParent(ParentNode<?> parent, String name);\r
36 \r
37     /**\r
38      * Perform cleanup for this node and for the child nodes. Any resources\r
39      * (including child nodes) related to this node are unusable after this\r
40      * operation. This method is for scene graph internal use only, thus should\r
41      * not be called outside the scene graph structure.\r
42      */\r
43     public void cleanup();\r
44     /**\r
45      * Remove this node and its children from the scene graph.\r
46      */\r
47     public void remove();\r
48 \r
49     \r
50     public void addListener(NodeListener listener);\r
51         public void removeListener(NodeListener listener);\r
52         \r
53         public List<NodeListener> getListeners();\r
54 \r
55 }\r