undo-redo

Implement Undo/Redo operations for Adding/Deleting ListView Items

青春壹個敷衍的年華 提交于 2019-12-02 04:37:36
I have too much problems trying to implement an Undo/Redo operation in a ListView Control, just to add/remove items. I realized time ago a relative question here Extend this Class to Undo/Redo in a Listview where I was started multiple bountyes of 50, 100, 200 and 300 points, a total of 650 points... but no body could really helped me to finalize this issue in weeks and months. But after time in that question finally a user ( @ThorstenC ) showed me a possible solution and a great idea, the code of him is incomplete so the code of him is what I'm trying to realize/finish. The problem is Simple

How to implemement undo features in painting application in Android?

感情迁移 提交于 2019-12-02 04:28:30
问题 i want to do undo features in in my application.. for this i searched i net found that take arraylist of x,y points which i have done below code i am unable for undo the drawings ?? public Drawview(Context context, float x, float y, int r) { super(context); mBitmap = Bitmap.createBitmap(800, 1200, Bitmap.Config.ARGB_8888); // mainbitmap.add(mBitmap); //System.out.println("**mBitmapPaint***"+mBitmapPaint); mCanvas = new Canvas(mBitmap); mPath = new Path(); mBitmapPaint = new Paint(Paint.DITHER

Extend this Class to Undo/Redo in a Listview

感情迁移 提交于 2019-11-30 19:32:14
I'm using a thir party code to manage undo/redo operations in a WindowsForm project. I need to extend the Class to manage undo/redo operations in a Listview, this means: · Undo/Redo Add/Delete items and subitems · Undo/Redo Check/Uncheck rows · Undo/Redo some other importants things that maybe I've missed I don't know how to start doing this, the code is too complex for me, any help/tips/examples about this would be very gratified for me, but in 3 months I have not been able to carry out this change, I think I will need good explanations or full examples, here is the code: ********************

Undo/Redo with immutable objects

核能气质少年 提交于 2019-11-30 14:33:05
I read the following in an article Immutable objects are particularly handy for implementing certain common idioms such as undo/redo and abortable transactions. Take undo for example. A common technique for implementing undo is to keep a stack of objects that somehow know how to run each command in reverse (the so-called "Command Pattern"). However, figuring out how to run a command in reverse can be tricky. A simpler technique is to maintain a stack of immutable objects representing the state of the system between successive commands. Then, to undo a command, you simply revert back to the

How to add undo / redo buttons to toolbar in Eclipse?

坚强是说给别人听的谎言 提交于 2019-11-30 11:53:05
问题 I feel a bit embarrassed asking this questions, but how the heck can I get regular undo/redo buttons into the toolbar of eclipse? I've often to switch between German and English keyboard layout. Y and Z on those layouts is interchanged and thus I constantly trigger the wrong action for undo / redo. I've observed myself how I figure this without other editors: I just use the toolbars for this operations. I've already tried Google and such, as well as going through the Customize Perspective

Implementing the command pattern

前提是你 提交于 2019-11-30 11:36:21
I am in the design process of an application, and I would like to use the command pattern for undo/redo purposes. I did some research into the command pattern but the only thing I don't get is: Should a command have the undo and redo methods, or should I make two separate commands, one for undo and one for redo, and call those from the main command itself? The command object itself should implement the undo / redo functionality. The commands are generally pushed and popped from a stack maintained by a command manager to implement multi level undo. When commands are executed they are pushed

Apply Undo Redo on elements that can dragable (drag and drop)

馋奶兔 提交于 2019-11-30 10:01:59
问题 I want to implement functionality on the svgElements that can be dragged with javascript how could I do this... I have implemented this with mouse up When mouse up occurs, I save the x and y position, object id, object type (circle, rect, etc.) Can any one tell...is this good way to implement? 回答1: I see a little issue in the example, you forget sometimes this. var history = { stack : [], counter : -1, add : function(item){ this.stack[++this.counter] = item; this.doSomethingWith(item); //

Extending Swing's UndoManager to provide repeat and multiple undo/redo

◇◆丶佛笑我妖孽 提交于 2019-11-30 09:43:09
问题 I've been tasked with adding undo/redo/repeat functionality to an application. I'm currently investigating whether I can use Swing's UndoManager. Apart from the usual undo and redo buttons, I need to provide the ability to undo or redo multiple edits at once (drop down UI like MS Office), and repeat a chosen edit. I believe I can use UndoManager for multiple undo and redo. It provides methods for multiple undo and redo. To build the UI, I can extend UndoManager to expose the edits it holds. I

How to create Undo-Redo in kineticjs?

≡放荡痞女 提交于 2019-11-30 09:33:06
问题 Is there any simple way how to create undo redo function in Kineticjs ? I have found a Undo Manager for HTML 5 in https://github.com/ArthurClemens/Javascript-Undo-Manager, but I don't know how to put in Kineticjs, please help me. thank you. 回答1: I was able to implement a simple solution based on a post by Chtiwi Malek at CodiCode. I also used some of the code from this problem as an example to draw rectangles, so credits go to them and Chtiwi. The only difference in my solution is I used

how to implement undo/redo operation without major changes in program

喜你入骨 提交于 2019-11-30 07:27:16
Hi I'm about to add new functionality to application which I'm currently writting. I need to write a undo/redo fnctionality. However 90% of our application is ready and I don't know what is the best way to implementing this functionality without affectig(too much ) code which has been already created. There aren't many details here. However, Undo/Redo functionality is typically handled via some variation of the Command Pattern . Depending on your architecture, this could be a simple reworking of your basic functionality into "commands", or a major overhaul. ArBR As Reed Copsey says the most