• Post Reply Bookmark Topic Watch Topic
  • New Topic

Undo/Redo  RSS feed

 
J. Ryan
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to implement an undo/redo mechanism in my application, and I want to be able to handle actions which are more complex than text events. For example, I want undo/redo operations (e.g. update, delete, etc.) for custom objects used by my application.

Would it be possible to use the API provided by Swing (UndoManager, etc.) to handle these types of operations or would I need to write something myself? From what I've read so far, it seems like I'll need to do it myself since the API seems to only support text edits. Am I heading down the right track or do I need to use the API? Thanks for any input.
 
subodh gupta
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
update and delete of what?

If you taking about data swing does't provide you have to do it urself.
 
J. Ryan
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean I am modifiying the fields of custom objects, deleting objects, creating new ones, etc. So for anything other than simple text edits of text fields I should use my own history manager?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you need to do that in your own code. Swing has no way of keeping track of what the application is doing.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!