1 /*******************************************************************************
\r
2 * Copyright (c) 2012, 2013 Association for Decentralized Information Management in
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.g3d.scenegraph.base;
\r
14 import java.util.List;
\r
20 public interface INode {
\r
24 * @return unique node identifier
\r
26 public Long getId();
\r
29 * @return root node of the scene graph or <code>null</code> if this node is
\r
30 * not part of a properly rooted scene graph hierarchy
\r
32 public ParentNode<?> getRootNode();
\r
35 * @return Parent node reference or <code>null</code> if not set
\r
37 public ParentNode<?> getParent();
\r
39 public String getParentRel();
\r
41 * Set parent node. This method is for scene graph internal use only and
\r
42 * should not be called outside the scene graph structure. This method
\r
43 * simply sets the parent node parent field, and does not affect on parent
\r
44 * node (i.e., should be called only from parent node).
\r
46 public void setParent(ParentNode<?> parent, String name);
\r
49 * Perform cleanup for this node and for the child nodes. Any resources
\r
50 * (including child nodes) related to this node are unusable after this
\r
51 * operation. This method is for scene graph internal use only, thus should
\r
52 * not be called outside the scene graph structure.
\r
54 public void cleanup();
\r
56 * Remove this node and its children from the scene graph.
\r
58 public void remove();
\r
61 public void addListener(NodeListener listener);
\r
62 public void removeListener(NodeListener listener);
\r
64 public List<NodeListener> getListeners();
\r