Search in sources :

Example 16 with ConnectionContainerEditPart

use of org.knime.workbench.editor2.editparts.ConnectionContainerEditPart 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

ConnectionContainerEditPart (org.knime.workbench.editor2.editparts.ConnectionContainerEditPart)13 NodeContainerEditPart (org.knime.workbench.editor2.editparts.NodeContainerEditPart)10 Point (org.eclipse.draw2d.geometry.Point)9 EditPart (org.eclipse.gef.EditPart)7 AbstractPortEditPart (org.knime.workbench.editor2.editparts.AbstractPortEditPart)5 ArrayList (java.util.ArrayList)4 AbstractWorkflowPortBarEditPart (org.knime.workbench.editor2.editparts.AbstractWorkflowPortBarEditPart)4 AbsoluteBendpoint (org.eclipse.draw2d.AbsoluteBendpoint)3 Bendpoint (org.eclipse.draw2d.Bendpoint)3 Rectangle (org.eclipse.draw2d.geometry.Rectangle)3 AnnotationEditPart (org.knime.workbench.editor2.editparts.AnnotationEditPart)3 NodeInPortEditPart (org.knime.workbench.editor2.editparts.NodeInPortEditPart)3 WorkflowInPortBarEditPart (org.knime.workbench.editor2.editparts.WorkflowInPortBarEditPart)3 WorkflowOutPortBarEditPart (org.knime.workbench.editor2.editparts.WorkflowOutPortBarEditPart)3 WorkflowRootEditPart (org.knime.workbench.editor2.editparts.WorkflowRootEditPart)3 Iterator (java.util.Iterator)2 IFigure (org.eclipse.draw2d.IFigure)2 GraphicalEditPart (org.eclipse.gef.GraphicalEditPart)2 CompoundCommand (org.eclipse.gef.commands.CompoundCommand)2 AbstractEditPart (org.eclipse.gef.editparts.AbstractEditPart)2