Examples of BezierConnectionData


Examples of pl.balon.gwt.diagrams.client.connection.data.BezierConnectionData

    Point b2 = p2.move(d[1], 50); // TODO parametrize it?

//    Point b1 = p1.move(d[0], 3*(d[0].isHorizontal() ? c1.getHeight() : c1.getWidth()));
//    Point b2 = p2.move(d[1], 3*(d[1].isHorizontal() ? c2.getHeight() : c2.getWidth()));

    BezierConnectionData data = new BezierConnectionData(
        new Point[]{p1, p2},
        new Point[]{b1, b2});
   
    return data;
  }
View Full Code Here

Examples of pl.balon.gwt.diagrams.client.connection.data.BezierConnectionData

   */
  protected void update(ConnectionData data) {
    if(!(data instanceof BezierConnectionData)){
      throw new IllegalArgumentException("Expected BezierConnectionData");
    }
    BezierConnectionData bdata = (BezierConnectionData) data;
    if( bdata.getPoints().size() != 2 ){
      throw new IllegalArgumentException("Expected two connection points");
    }
    if( bdata.getControlPoints().size() != 2 ){
      throw new IllegalArgumentException("Expected two control points");
    }

    curve.draw(
        (Point)bdata.getPoints().get(0),
        (Point)bdata.getPoints().get(1),
        (Point)bdata.getControlPoints().get(0),
        (Point)bdata.getControlPoints().get(1));
   
  }
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.