示例#1
0
 public void undo(StudentModel model) {
   System.out.println("Undoing add command.");
   int index = model.findIndexByElement(node);
   if (index >= 0) ModelUtils.removeElement(model.getElement(index), model, true);
 }
示例#2
0
 public Add(Node node, StudentModel model) {
   this.node = node;
   if (!model.getHistory().isEmpty() && model.getHistory().peek() instanceof Drag)
     model.removeActionFromHistory();
 }