]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/DiagramHints.java
Small but effective HiDPI fixes for platform G2D
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / diagram / DiagramHints.java
index 367cebcce67fb91caba55ad502c9c1050e75508e..0c11d348ab62fcc3860437b1e8a72f779f5349d5 100644 (file)
@@ -20,9 +20,13 @@ import java.util.Map;
 import org.simantics.g2d.canvas.ICanvasContext;
 import org.simantics.g2d.canvas.ICanvasParticipant;
 import org.simantics.g2d.connection.IConnectionAdvisor;
+import org.simantics.g2d.diagram.handler.impl.PickContextImpl;
+import org.simantics.g2d.diagram.participant.ElementPainter;
+import org.simantics.g2d.element.IElement;
 import org.simantics.g2d.layers.ILayers;
 import org.simantics.g2d.layers.ILayersEditor;
 import org.simantics.g2d.routing.IRouter2;
+import org.simantics.scenegraph.INode;
 import org.simantics.scenegraph.g2d.snap.ISnapAdvisor;
 import org.simantics.utils.datastructures.hints.IHintContext.Key;
 import org.simantics.utils.datastructures.hints.IHintContext.KeyOf;
@@ -151,7 +155,7 @@ public class DiagramHints {
 
     /**
      * A Hint for other participants to use for showing the context menu at the
-     * contol position specified by the Point2D argument.
+     * control position specified by the Point2D argument.
      */
     public static final Key SHOW_POPUP_MENU                = new KeyOf(Point2D.class, "SHOW_POPUP_MENU_CMD");
 
@@ -186,4 +190,14 @@ public class DiagramHints {
      */
     public static final Key SELECTION_PADDING_SCALE_FACTOR = new KeyOf(Double.class, "SELECTION_PADDING_SCALE_FACTOR");
 
+    /**
+     * An optional cache map that maps scene graph {@link INode}s to
+     * {@link IElement}s to speed up IElement lookups based on SG nodes.
+     * 
+     * @since 1.36.0
+     * @see PickContextImpl
+     * @see ElementPainter
+     */
+    public static final Key NODE_TO_ELEMENT_MAP = new KeyOf(Map.class, "NODE_TO_ELEMENT_MAP");
+
 }