@Test public void addPointCreatesHistoryItem() { ArcPoint point = new ArcPoint(new Point2D.Double(0, 0), false); controller.addPoint(point.getPoint()); UndoableEdit addArcPointAction = new AddArcPathPoint<>(mockArc, point); verify(listener).undoableEditHappened(argThat(Contains.thisAction(addArcPointAction))); }
public void addPoint(Point2D point) { ArcPoint newPoint = new ArcPoint(point, false); arc.addIntermediatePoint(newPoint); registerUndoableEdit(new AddArcPathPoint<>(arc, newPoint)); }
ArcController extends AbstractPetriNetComponentController<Arc<S, T>> { public void addPoint(Point2D point) { ArcPoint newPoint = new ArcPoint(point, false); arc.addIntermediatePoint(newPoint); registerUndoableEdit(new AddArcPathPoint<>(arc, newPoint)); } }
ArcController extends AbstractPetriNetComponentController<Arc<S, T>> { public void addPoint(Point2D point) { ArcPoint newPoint = new ArcPoint(point, false); arc.addIntermediatePoint(newPoint); registerUndoableEdit(new AddArcPathPoint<>(arc, newPoint)); } ArcController(Arc<S, T> arc, PetriNetController petriNetController, UndoableEditListener listener); }
ArcController extends AbstractPetriNetComponentController<Arc<S, T>> { public void addPoint(Point2D point) { ArcPoint newPoint = new ArcPoint(point, false); arc.addIntermediatePoint(newPoint); registerUndoableEdit(new AddArcPathPoint<>(arc, newPoint)); } ArcController(Arc<S, T> arc, PetriNetController petriNetController, UndoableEditListener listener); void setWeight(String token, String expr); void setWeights(Map<String, String> newWeights); String getWeightForToken(String token); Connectable getTarget(); void toggleArcPointType(ArcPoint arcPoint); void splitArcPoint(ArcPoint arcPoint); void addPoint(Point2D point); void deletePoint(ArcPoint point); }
ArcController extends AbstractPetriNetComponentController<Arc<S, T>> { public void addPoint(Point2D point) { ArcPoint newPoint = new ArcPoint(point, false); arc.addIntermediatePoint(newPoint); registerUndoableEdit(new AddArcPathPoint<>(arc, newPoint)); } ArcController(Arc<S, T> arc, PetriNetController petriNetController, UndoableEditListener listener); void setWeight(String token, String expr); void setWeights(Map<String, String> newWeights); String getWeightForToken(String token); Connectable getTarget(); void toggleArcPointType(ArcPoint arcPoint); void splitArcPoint(ArcPoint arcPoint); void addPoint(Point2D point); void deletePoint(ArcPoint point);  }