public void addUndoEvent(UndoInterface event){
  if (shouldProcessUndoRedoAction()) {
    boolean atEndOfList=(currentIndex >= undoList.size());
    if (!atEndOfList) {
      while (undoList.size() > currentIndex) {
        int lastIndex=undoList.size() - 1;
        undoList.remove(lastIndex);
      }
    }
    undoList.add(event);
    currentIndex=undoList.size();
    updateMenuItems();
    logger.debug(event.getStringRepresentation());
  }
}

public void addUndoEvent ( UndoInterface event ) { if ( shouldProcessUndoRedoAction ( ) ) { boolean atEndOfList = ( currentIndex >= undoList . size ( ) ) ; if ( ! atEndOfList ) { while ( undoList . size ( ) > currentIndex ) { int lastIndex = undoList . size ( ) - 1 ; undoList . remove ( lastIndex ) ; } } undoList . add ( event ) ; currentIndex = undoList . size ( ) ; updateMenuItems ( ) ; logger . debug ( event . getStringRepresentation ( ) ) ; } }
adds the undo event .
