]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.g2d/src/org/simantics/g2d/element/ElementHints.java
Use Consumer interface instead of deprecated Callback interface
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / element / ElementHints.java
index dc8f914748d0f661d2a2c9925d78fdb29e8e1fa0..35f3a8591fb3de903c94e8d69f3ca3f24d3090f6 100644 (file)
@@ -22,6 +22,7 @@ import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
+import java.util.function.Consumer;
 
 import org.simantics.g2d.canvas.Hints;
 import org.simantics.g2d.connection.ConnectionEntity;
@@ -32,7 +33,6 @@ import org.simantics.g2d.element.handler.SceneGraph;
 import org.simantics.g2d.image.Image;
 import org.simantics.g2d.utils.Alignment;
 import org.simantics.scenegraph.Node;
-import org.simantics.utils.datastructures.Callback;
 import org.simantics.utils.datastructures.hints.IHintContext.Key;
 import org.simantics.utils.datastructures.hints.IHintContext.KeyOf;
 
@@ -50,7 +50,7 @@ public class ElementHints {
      * For attaching a callback to an element that is invoked when KEY_SG_NODE
      * is initialized and set.
      */
-    public static final Key KEY_SG_CALLBACK = new SceneGraphNodeKey(Callback.class, "SG_NODE_CALLBACK");
+    public static final Key KEY_SG_CALLBACK = new SceneGraphNodeKey(Consumer.class, "SG_NODE_CALLBACK");
 
     /**
      * For describing the local affine transformation of an element.