X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.g2d%2Fsrc%2Forg%2Fsimantics%2Fg2d%2Fdiagram%2FDiagramHints.java;h=0c11d348ab62fcc3860437b1e8a72f779f5349d5;hb=HEAD;hp=6152c168e70f09e57d517249c92d8c9a01804972;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/DiagramHints.java b/bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/DiagramHints.java index 6152c168e..0c11d348a 100644 --- a/bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/DiagramHints.java +++ b/bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/DiagramHints.java @@ -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"); @@ -179,4 +183,21 @@ public class DiagramHints { */ public static final Key POPUP_MENU_HIDDEN = new KeyOf(Long.class, "POPUP_MENU_HIDDEN"); + /** + * For specifying a user-defined padding for selections + * + * @since 1.33.0 + */ + 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"); + }