]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/IG2DNode.java
Move state changes away from render method to refresh method
[simantics/platform.git] / bundles / org.simantics.scenegraph / src / org / simantics / scenegraph / g2d / IG2DNode.java
index e181d59ff02d45305da28dbbac3cb7802be5b002..2d17e47c594fbc2ad546106a2a0d6c9777bd7d95 100644 (file)
@@ -50,8 +50,9 @@ public interface IG2DNode extends INode, IEventHandler {
     public boolean validate();
 
     /**
-     * Perform the actual rendering. Node state changes should be avoided in
-     * this method. This method should not change the transform of the g2d
+     * Perform the actual rendering. Node state changes must be avoided in
+     * this method. Implement node state changes to refresh method instead. 
+     * This method should not change the transform of the g2d
      * instance. You should call g2d.create or copy the original transform and
      * put it back at the end of this method according to what is specified in
      * {@link Graphics2D#setTransform(AffineTransform)}.
@@ -70,7 +71,12 @@ public interface IG2DNode extends INode, IEventHandler {
      * @see #getTransform()
      */
     public void render(Graphics2D g2d);
-
+    
+    /**
+     * Refresh the node state.  
+     */
+    public void refresh();
+    
     /**
      * Visit the IG2DNode substructure of this node using the provided visitor.
      *