X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles%2Forg.simantics.g2d%2Fsrc%2Forg%2Fsimantics%2Fg2d%2Felement%2FElementHints.java;h=35f3a8591fb3de903c94e8d69f3ca3f24d3090f6;hb=bb2be932187c70082a01e12e1f451dd06650a48c;hp=9710fab683b6ea7ce48a5b03013a7189248bf220;hpb=060886da1e94e4a6bb1e09d56e96a6ad289ba7d0;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.g2d/src/org/simantics/g2d/element/ElementHints.java b/bundles/org.simantics.g2d/src/org/simantics/g2d/element/ElementHints.java index 9710fab68..35f3a8591 100644 --- a/bundles/org.simantics.g2d/src/org/simantics/g2d/element/ElementHints.java +++ b/bundles/org.simantics.g2d/src/org/simantics/g2d/element/ElementHints.java @@ -20,18 +20,19 @@ import java.awt.geom.AffineTransform; import java.awt.geom.Rectangle2D; 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; import org.simantics.g2d.connection.IConnectionAdvisor; -import org.simantics.g2d.element.handler.SceneGraph; import org.simantics.g2d.element.handler.EdgeVisuals.ArrowType; import org.simantics.g2d.element.handler.EdgeVisuals.StrokeType; +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; @@ -49,13 +50,18 @@ 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. */ public static final Key KEY_TRANSFORM = new KeyOf(AffineTransform.class, "TRANSFORM"); + /** + * For describing representation parameters of an element. + */ + public static final Key KEY_PARAMETERS = new KeyOf(Map.class, "PARAMETERS"); + /** * For defining the rectangular boundaries of an element. */