Examples of MoveBendpointCommand


Examples of org.drools.eclipse.flow.common.editor.core.command.MoveBendpointCommand

    protected Command getMoveBendpointCommand(BendpointRequest request) {
        Point location = request.getLocation();
        getConnection().translateToRelative(location);

        MoveBendpointCommand command = new MoveBendpointCommand();
        command.setConnectionModel(getHost().getModel());
        command.setIndex(request.getIndex());
        command.setNewLocation(location);

        return command;

    }
View Full Code Here

Examples of org.eclipse.gef.examples.logicdesigner.model.commands.MoveBendpointCommand

  com.setIndex(request.getIndex());
  return com;
}

protected Command getMoveBendpointCommand(BendpointRequest request) {
  MoveBendpointCommand com = new MoveBendpointCommand();
  Point p = request.getLocation();
  Connection conn = getConnection();
 
  conn.translateToRelative(p);
 
  com.setLocation(p);
 
  Point ref1 = getConnection().getSourceAnchor().getReferencePoint();
  Point ref2 = getConnection().getTargetAnchor().getReferencePoint();
 
  conn.translateToRelative(ref1);
  conn.translateToRelative(ref2);
 
  com.setRelativeDimensions(p.getDifference(ref1),
          p.getDifference(ref2));
  com.setWire((Wire)request.getSource().getModel());
  com.setIndex(request.getIndex());
  return com;
}
View Full Code Here

Examples of org.eclipse.sapphire.ui.swt.gef.commands.MoveBendPointCommand

    ConnectionEditPart connectionEditPart = (ConnectionEditPart)getHost();
    if (connectionEditPart.getSource() == connectionEditPart.getTarget())
    {
      return null;
    }
    MoveBendPointCommand com = new MoveBendPointCommand();
    Point p = request.getLocation();
    Connection conn = getConnection();

    conn.translateToRelative(p);

    com.setLocation(p);

    Point ref1 = getConnection().getSourceAnchor().getReferencePoint();
    Point ref2 = getConnection().getTargetAnchor().getReferencePoint();

    conn.translateToRelative(ref1);
    conn.translateToRelative(ref2);

    com.setRelativeDimensions(p.getDifference(ref1), p.getDifference(ref2));
    com.setDiagramConnectionModel((DiagramConnectionModel) request.getSource().getModel());
    com.setIndex(request.getIndex());
    return com;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.