Package org.tinyuml.draw

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


    selection.startDragging(105, 30);
    assertEquals(3, selection.getEditPoints().size());
    assertTrue(selection.isDragging());
    selection.updatePosition(120, 50);
    selection.updatePosition(130, 70);
    selection.stopDragging(140, 90);
    assertFalse(selection.isDragging());
    assertEquals(3, conn.getPoints().size());
    // the position at stopDragging() has no effect !
    Point2D pNew = new Point2D.Double(130, 70);
    assertEquals(pNew, conn.getPoints().get(1));
View Full Code Here


    assertEquals(3, selection.getEditPoints().size());
    assertTrue(selection.isDragging());
    selection.updatePosition(120, 50);
    selection.updatePosition(110, 40);
    selection.updatePosition(106, 31); // melting position
    selection.stopDragging(106, 31);
    assertFalse(selection.isDragging());
    assertEquals(2, conn.getPoints().size());
    assertEquals(oldp1, conn.getPoints().get(0));
    assertEquals(oldp2, conn.getPoints().get(1));
  }
View Full Code Here

    selection.startDragging(105, 90);
    assertTrue(selection.isDragging());
    selection.updatePosition(120, 50);
    selection.updatePosition(130, 70);
    selection.updatePosition(140, 90);
    selection.stopDragging(140, 90);
    assertFalse(selection.isDragging());
    assertEquals(3, conn.getPoints().size());
    Point2D pNew = new Point2D.Double(140, 90);
    assertEquals(pNew, conn.getPoints().get(1));
  }
View Full Code Here

    selection.startDragging(105, 90);
    assertTrue(selection.isDragging());
    selection.updatePosition(120, 50);
    selection.updatePosition(110, 40);
    selection.updatePosition(105, 31);
    selection.stopDragging(105, 31);
    assertFalse(selection.isDragging());
    assertEquals(2, conn.getPoints().size());
  }
}
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.