X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.g3d%2Fsrc%2Forg%2Fsimantics%2Fg3d%2Fscenegraph%2FNodeMap.java;h=4e0681472e7056b8cc8e6e9058aa53850a3fe3ab;hb=ebfe6b0245b5cf9231cecedf0aaacd891eb5d344;hp=d4f12da30fa2a0ebbde238bbda81f9055a6f172c;hpb=87b3241ec277ba3d8e414b26186a032c9cdcaeed;p=simantics%2F3d.git diff --git a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/NodeMap.java b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/NodeMap.java index d4f12da3..4e068147 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/NodeMap.java +++ b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/NodeMap.java @@ -1,48 +1,62 @@ -package org.simantics.g3d.scenegraph; - -import java.util.Collection; - -import org.simantics.g3d.scenegraph.base.INode; -import org.simantics.g3d.scenegraph.base.NodeListener; -import org.simantics.g3d.scenegraph.base.ParentNode; - -public interface NodeMap { - - public Collection getRenderObjects(INode node); - - public void updateRenderObjectsFor(INode node); - - public INode getNode(T t); - - public ParentNode getRootNode(); - - /** - * Commit changes to the database. - */ - public void commit(); - - - /** - * Deletes (Disposes) the map. - */ - public void delete(); - - - /** - * Track changes that are going to be committed into the database. - * - * Disabling change tracking causes commit() to do nothing. - * @param enabled - */ - public void setChangeTracking(boolean enabled); - public boolean isChangeTracking(); - - - /** - * Add listener for all scene-graph events. - * @param listener - */ - public void addListener(NodeListener listener); - - public void removeListener(NodeListener listener); -} +/******************************************************************************* + * Copyright (c) 2012, 2013 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.g3d.scenegraph; + +import java.util.Collection; + +import org.simantics.g3d.scenegraph.base.INode; +import org.simantics.g3d.scenegraph.base.NodeListener; +import org.simantics.g3d.scenegraph.base.ParentNode; +import org.simantics.objmap.graph.IMapping; + +public interface NodeMap { + + public Collection getRenderObjects(INode node); + + public void updateRenderObjectsFor(E node); + + public E getNode(T t); + + public ParentNode getRootNode(); + + /** + * Commit changes to the database. + */ + public void commit(String message); + + + /** + * Deletes (Disposes) the map. + */ + public void delete(); + + + /** + * Track changes that are going to be committed into the database. + * + * Disabling change tracking causes commit() to do nothing. + * @param enabled + */ + public void setChangeTracking(boolean enabled); + public boolean isChangeTracking(); + + + /** + * Add listener for all scene-graph events. + * @param listener + */ + public void addListener(NodeListener listener); + + public void removeListener(NodeListener listener); + + public IMapping getMapping(); +}