Search in sources :

Example 1 with NewBendpointCreateCommand

use of org.knime.workbench.editor2.commands.NewBendpointCreateCommand in project knime-core by knime.

the class ConnectionBendpointEditPolicy method getCreateBendpointCommand.

/**
 * {@inheritDoc}
 */
protected Command getCreateBendpointCommand(final BendpointRequest req) {
    int index = req.getIndex();
    Point loc = req.getLocation();
    ConnectionContainerEditPart editPart = (ConnectionContainerEditPart) getHost();
    ZoomManager zoomManager = (ZoomManager) getHost().getRoot().getViewer().getProperty(ZoomManager.class.toString());
    return new NewBendpointCreateCommand(editPart, getWorkflowManager(), index, loc, zoomManager);
}
Also used : ConnectionContainerEditPart(org.knime.workbench.editor2.editparts.ConnectionContainerEditPart) ZoomManager(org.eclipse.gef.editparts.ZoomManager) NewBendpointCreateCommand(org.knime.workbench.editor2.commands.NewBendpointCreateCommand) Point(org.eclipse.draw2d.geometry.Point) AbsoluteBendpoint(org.eclipse.draw2d.AbsoluteBendpoint) Point(org.eclipse.draw2d.geometry.Point) Bendpoint(org.eclipse.draw2d.Bendpoint)

Aggregations

AbsoluteBendpoint (org.eclipse.draw2d.AbsoluteBendpoint)1 Bendpoint (org.eclipse.draw2d.Bendpoint)1 Point (org.eclipse.draw2d.geometry.Point)1 ZoomManager (org.eclipse.gef.editparts.ZoomManager)1 NewBendpointCreateCommand (org.knime.workbench.editor2.commands.NewBendpointCreateCommand)1 ConnectionContainerEditPart (org.knime.workbench.editor2.editparts.ConnectionContainerEditPart)1