moved UndoEdit to dire.swing and reimplemented StateTransFunctions