Example #1
0
 private void moveStickables(
     StickableMap stickables,
     boolean undoable,
     Rectangle oldRect,
     StickingPolygon stickingPolygonBeforeLocationChange,
     String oldAddAttr) {
   Map<Stickable, List<PointChange>> stickableChanges =
       Stickables.moveStickPointsBasedOnPolygonChanges(
           stickingPolygonBeforeLocationChange,
           generateStickingBorder(),
           stickables,
           getGridSize());
   if (undoable) {
     undoStack.add(
         new UndoInformation(
             getRectangle(),
             oldRect,
             stickableChanges,
             getGridSize(),
             oldAddAttr,
             getAdditionalAttributes()));
   }
 }
Example #2
0
 @Override
 public void mergeUndoDrag() {
   UndoInformation undoInfoA = undoStack.remove();
   UndoInformation undoInfoB = undoStack.remove();
   undoStack.add(undoInfoA.merge(undoInfoB));
 }