Package org.tinyuml.draw

Examples of org.tinyuml.draw.SimpleConnectionSelection.startDragging()


   */
  public void testDragSegmentAndCancel() {
    node1.setOrigin(10, 10); // (10, 10, 80, 40) -> max (90, 50)
    node2.setOrigin(120, 10); // (120, 10, 80, 40) -> max (200, 50)
    SimpleConnectionSelection selection = setupConnection();
    selection.startDragging(105, 30);
    Point2D oldp1 = conn.getEndPoint1();
    Point2D oldp2 = conn.getEndPoint2();
    assertEquals(3, selection.getEditPoints().size());
    assertTrue(selection.isDragging());
    selection.updatePosition(120, 50);
View Full Code Here


   */
  public void testDragSegmentAndStop() {
    node1.setOrigin(10, 10); // (10, 10, 80, 40) -> max (90, 50)
    node2.setOrigin(120, 10); // (120, 10, 80, 40) -> max (200, 50)
    SimpleConnectionSelection selection = setupConnection();
    selection.startDragging(105, 30);
    assertEquals(3, selection.getEditPoints().size());
    assertTrue(selection.isDragging());
    selection.updatePosition(120, 50);
    selection.updatePosition(130, 70);
    selection.stopDragging(140, 90);
View Full Code Here

    node1.setOrigin(10, 10); // (10, 10, 80, 40) -> max (90, 50)
    node2.setOrigin(120, 10); // (120, 10, 80, 40) -> max (200, 50)
    SimpleConnectionSelection selection = setupConnection();
    Point2D oldp1 = conn.getEndPoint1();
    Point2D oldp2 = conn.getEndPoint2();
    selection.startDragging(105, 30);
    assertEquals(3, selection.getEditPoints().size());
    assertTrue(selection.isDragging());
    selection.updatePosition(120, 50);
    selection.updatePosition(110, 40);
    selection.updatePosition(106, 31); // melting position
View Full Code Here

    node1.setOrigin(10, 10); // (10, 10, 80, 40) -> max (90, 50)
    node2.setOrigin(120, 10); // (120, 10, 80, 40) -> max (200, 50)
    SimpleConnectionSelection selection = setupConnection();
    // insert a new control point to make a total of three
    conn.getPoints().add(1, new Point2D.Double(105, 90));
    selection.startDragging(105, 90);
    assertTrue(selection.isDragging());
    selection.updatePosition(120, 50);
    selection.updatePosition(130, 70);
    selection.updatePosition(140, 90);
    selection.stopDragging(140, 90);
View Full Code Here

    node1.setOrigin(10, 10); // (10, 10, 80, 40) -> max (90, 50)
    node2.setOrigin(120, 10); // (120, 10, 80, 40) -> max (200, 50)
    SimpleConnectionSelection selection = setupConnection();
    // insert a new control point to make a total of three
    conn.getPoints().add(1, new Point2D.Double(105, 90));
    selection.startDragging(105, 90);
    assertTrue(selection.isDragging());
    selection.updatePosition(120, 50);
    selection.updatePosition(110, 40);
    selection.updatePosition(105, 31);
    selection.stopDragging(105, 31);
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.