7576777879808182
public synchronized void undo() { if (canUndo()) { UndoableEvent event = undoRedoWindow.get(index); index--; event.getRollbackHandler().undoAction(event); bus.fireEvent(new UndoRedoEvent()); } }
8788899091929394
public synchronized void redo() { if (canRedo()) { index++; UndoableEvent event = undoRedoWindow.get(index); event.getRollbackHandler().doAction(event); bus.fireEvent(new UndoRedoEvent()); } }