4
418928
Hi everybody,
I've created a small application that allows the user to draw things
and put things on the screen (polygons, circles, arcs, etc.). Now I
want to implement an undo operation. The question is: does Java offer
any facility for this? Or there is any design pattern that I am
advised to use?
The obvious approach is to store snapshots of previous states of the
application desktop to restore them if necessary. But then I start
thinking about how many undos to support, if I will support redos,
etc. Just wondering if there's something out there on this subject.
Thanks
Sergio.
I've created a small application that allows the user to draw things
and put things on the screen (polygons, circles, arcs, etc.). Now I
want to implement an undo operation. The question is: does Java offer
any facility for this? Or there is any design pattern that I am
advised to use?
The obvious approach is to store snapshots of previous states of the
application desktop to restore them if necessary. But then I start
thinking about how many undos to support, if I will support redos,
etc. Just wondering if there's something out there on this subject.
Thanks
Sergio.