Methods Summary |
---|
public boolean | allowMerge()Return true if this operation can be merged with a later operation.
The default implementation always returns true.
return true;
|
public abstract void | commit()Called when this undo state is being committed to the undo stack.
The implementation should perform the initial edits and save any state that
may be needed to undo them.
|
public int | describeContents()
return 0;
|
public UndoOwner | getOwner()Owning object as given to {@link #UndoOperation(UndoOwner)}.
return mOwner;
|
public DATA | getOwnerData()Synonym for {@link #getOwner()}.{@link android.content.UndoOwner#getData()}.
return (DATA)mOwner.getData();
|
public boolean | hasData()Return true if this operation actually contains modification data. The
default implementation always returns true. If you return false, the
operation will be dropped when the final undo state is being built.
return true;
|
public boolean | matchOwner(UndoOwner owner)Return true if this undo operation is a member of the given owner.
The default implementation is owner == getOwner() . You
can override this to provide more sophisticated dependencies between
owners.
return owner == getOwner();
|
public abstract void | redo()Called when this undo state is being pushed back from the transient
redo stack to the main undo stack. The implementation should re-apply
the edits that were previously removed by {@link #undo}.
|
public abstract void | undo()Called when this undo state is being popped off the undo stack (in to
the temporary redo stack). The implementation should remove the original
edits and thus restore the target object to its prior value.
|