use of com.google.security.zynamics.zylib.gui.zygraph.realizers.ZyRegenerateableNodeRealizer in project binnavi by google.
the class CEditNodeHelper method setCaretStart.
public static void setCaretStart(final AbstractZyGraph<?, ?> graph, final Node node, final MouseEvent event) {
final double mouseX = graph.getEditMode().translateX(event.getX());
final double mouseY = graph.getEditMode().translateY(event.getY());
final IZyNodeRealizer realizer = (IZyNodeRealizer) graph.getGraph().getRealizer(node);
final ZyLabelContent labelContent = realizer.getNodeContent();
final CDefaultLabelEventHandler labelEventHandler = graph.getEditMode().getLabelEventHandler();
graph.getEditMode().getLabelEventHandler().activateLabelContent(labelContent, new ZyRegenerateableNodeRealizer(realizer));
if (labelContent.isSelectable()) {
final double zoom = graph.getView().getZoom();
final double nodeX = realizer.getRealizer().getX();
final double nodeY = realizer.getRealizer().getY();
labelEventHandler.handleMousePressedEvent(nodeX, nodeY, mouseX, mouseY, zoom);
}
}
Aggregations