Package pl.tecna.gwt.connectors.client.elements

Examples of pl.tecna.gwt.connectors.client.elements.ShapeConnectorStart


  public void previewDragStart() throws VetoDragException {

    // create new connector for dragged ShapeConnectorStart
    if (context.draggable instanceof ShapeConnectorStart) {
      diagram.clearSelection();
      ShapeConnectorStart ep = (ShapeConnectorStart) context.draggable;
      ep.setWidget(ep.createEndPointImage());
      ep.setLeft(getDraggableCenterLeft(ep));
      ep.setTop(getDraggableCenterTop(ep));

      if (ep.connector == null) {
        ep.shape.endPoints.remove(ep);
        ep.shape.hideShapeConnectorStartPionts();
        ep.removeHandlers();
        ep.removeStyle();
        DOM.setStyleAttribute(ep.getElement(), "cursor", "crosshair");
        if (ep.connector == null) {
          int startLeft = ep.getOverlapingCP().getCenterLeft();
          int startTop = ep.getOverlapingCP().getCenterTop();
          int endLeft = ep.getLeft();
          int endTop = ep.getTop();

          ep.connector = diagram.createConnector(startLeft, startTop, endLeft, endTop, ep, ep.shape.connectorsStyle);
        }
        ep.connector.startEndPoint.glueToConnectionPoint(ep.getOverlapingCP());
      }
    }
    super.previewDragStart();
  }
View Full Code Here

TOP

Related Classes of pl.tecna.gwt.connectors.client.elements.ShapeConnectorStart

Copyright © 2018 www.massapicom. 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.