Examples of SapphireMidpointLocator


Examples of org.eclipse.sapphire.ui.swt.gef.parts.SapphireMidpointLocator

  @Override
  public void execute() {
    int x = rectangle.x;
    int y = rectangle.y;
    Connection connection = (Connection)editPart.getFigure().getParent();
    SapphireMidpointLocator location = new SapphireMidpointLocator(editPart.getConfigurationManager(), connection);
    Point midpoint = location.getMidpoint();
    midpoint = editPart.getConfigurationManager().getDiagramEditor().calculateRealMouseLocation(midpoint);
    org.eclipse.sapphire.ui.Point newPos = new org.eclipse.sapphire.ui.Point(x - midpoint.x, y - midpoint.y);
    editPart.getDiagramConnectionPart().setLabelPosition(newPos);
  }
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.