1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
package NET.worlds.scape; class UndoablTransform implements Undoable { private WObject wob; private Transform transform; UndoablTransform(WObject wob) { this.wob = wob; this.transform = wob.getTransform(); } @Override public void undo() { this.wob.setTransform(this.transform); } }