X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.g3d%2Fsrc%2Forg%2Fsimantics%2Fg3d%2Fscenegraph%2Fbase%2FNode.java;h=f7fe9eded0e0d1e606814e5b6556af2da85b5096;hb=53d55c24c779745f188bdb18d32f71d20acb61b2;hp=ae1b300c1c63e72bfce31b5690065930d622b800;hpb=f36217aeeb09c0c46f99886ee99772156ce9cfe6;p=simantics%2F3d.git diff --git a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/base/Node.java b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/base/Node.java index ae1b300c..f7fe9ede 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/base/Node.java +++ b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/base/Node.java @@ -22,57 +22,57 @@ public abstract class Node implements INode { protected Long id = IDCOUNTER++; - public Long getId() { - return id; - } + public Long getId() { + return id; + } - public ParentNode getParent() { - return parent; - } + public ParentNode getParent() { + return parent; + } - - @Override - public String getParentRel() { - return parentName; - } - - public void setParent(ParentNode parent, String name) { - this.parent = parent; - this.parentName = name; - } - - public ParentNode getRootNode() { - return parent != null ? parent.getRootNode() : null; - } - - public void remove() { - if (parent != null) { - parent.removeNode(parentName, this); - } - } - - public void deattach() { - if (parent != null) { - parent.deattachNode(parentName, this); - } - } - - public void init() { - } - - public void cleanup() { - if (parent != null) { - parent.removeNode(parentName, this); - } - } - - @Override + + @Override + public String getParentRel() { + return parentName; + } + + public void setParent(ParentNode parent, String name) { + this.parent = parent; + this.parentName = name; + } + + public ParentNode getRootNode() { + return parent != null ? parent.getRootNode() : null; + } + + public void remove() { + if (parent != null) { + parent.removeNode(parentName, this); + } + } + + public void deattach() { + if (parent != null) { + parent.deattachNode(parentName, this); + } + } + + public void init() { + } + + public void cleanup() { + if (parent != null) { + parent.removeNode(parentName, this); + } + } + + @Override public String toString() { return getClass().getSimpleName(); } - - protected List listeners = new ArrayList(); + + protected List listeners = new ArrayList(); @Override public void addListener(NodeListener listener) { @@ -95,5 +95,5 @@ public abstract class Node implements INode { listener.propertyChanged(this, id); } } - + }