This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Undo Manager appears only to work with text components.
How are you drawing your images? Do you have some sort of ImageComponent class or similar? Can you put ImageComponents into some sort of List and go back and forth along the List?
Campbell Ritchie wrote:Undo Manager appears only to work with text components.
Not at all. UndoManager can work with any kind of edits at all. It's just that you have to write a subclass of UndoableEdit which essentially stores the "before" and "after" states in such a way that the undo() and redo() methods modify the view appropriately. For example an edit for a checkbox might look like this (not all required methods implemented):
Joined: Oct 13, 2005
I was mistaken, obviously. Sorry.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: How to add Undo and Redo actions to JPanel