Search in sources :

Example 1 with NewBendpointMoveCommand

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

the class ConnectionBendpointEditPolicy method getMoveBendpointCommand.

/**
 * {@inheritDoc}
 */
protected Command getMoveBendpointCommand(final BendpointRequest request) {
    // index of the bendpoint to move
    int index = request.getIndex();
    Point loc = request.getLocation();
    ConnectionContainerEditPart edit = (ConnectionContainerEditPart) getHost();
    ZoomManager zoomManager = (ZoomManager) getHost().getRoot().getViewer().getProperty(ZoomManager.class.toString());
    WorkflowManager m = getWorkflowManager();
    return new NewBendpointMoveCommand(edit, m, index, loc, zoomManager);
}
Also used : ConnectionContainerEditPart(org.knime.workbench.editor2.editparts.ConnectionContainerEditPart) ZoomManager(org.eclipse.gef.editparts.ZoomManager) WorkflowManager(org.knime.core.node.workflow.WorkflowManager) Point(org.eclipse.draw2d.geometry.Point) NewBendpointMoveCommand(org.knime.workbench.editor2.commands.NewBendpointMoveCommand) 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 WorkflowManager (org.knime.core.node.workflow.WorkflowManager)1 NewBendpointMoveCommand (org.knime.workbench.editor2.commands.NewBendpointMoveCommand)1 ConnectionContainerEditPart (org.knime.workbench.editor2.editparts.ConnectionContainerEditPart)1