|
UndoRedo V1.2 by Matthew Ford 2005/06/27 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjavax.swing.undo.AbstractUndoableEdit
au.com.forward.undoRedo.UndoRedoEdit
public abstract class UndoRedoEdit
| Field Summary | |
|---|---|
protected java.lang.String |
description
|
| Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
RedoName, UndoName |
| Constructor Summary | |
|---|---|
UndoRedoEdit()
Creates a new instance of UndoRedoEdit |
|
| Method Summary | |
|---|---|
void |
cancelGetDescription()
Cancels getDescription This is called when the undo/redo tree selection changes to cancel the previous getDescription. |
void |
getDescription(IDisplayText textDisplay)
Gets the Description of the UndoableEdit. |
java.lang.Long |
getFrameMarker()
Returns the last frameMarker set Because the frameMarker is set for the original edit and every subsequent undo/redo of it, the frameMarker needs to be saved with the task preforming the operation. |
void |
setFrameMarker(java.lang.Long marker)
Called by the UndoRedoManager to set the frame marker for future roll back. |
void |
setUndoState(boolean undoState)
Sets the undo or redo state. |
| Methods inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, redo, replaceEdit, toString, undo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface au.com.forward.undoRedo.IHaveDescription |
|---|
getDescription |
| Field Detail |
|---|
protected java.lang.String description
| Constructor Detail |
|---|
public UndoRedoEdit()
| Method Detail |
|---|
public void getDescription(IDisplayText textDisplay)
cancelGetDescription() is called when the selection
changes and the text is no longer needed.
public void cancelGetDescription()
cancelGetDescription in interface IHaveDescriptionpublic void setFrameMarker(java.lang.Long marker)
setFrameMarker in interface ICanBeRolledBackmarker - the frameMarker associated with this operationpublic java.lang.Long getFrameMarker()
This implementation nulls the frameMarker when it is returned. This means this method can only be called once for each marker set. Nulling the frameMarker here allows it to be garbaged collected from the UndoRedoManager when there are not other references.
getFrameMarker in interface ICanBeRolledBackpublic void setUndoState(boolean undoState)
This method should also do any other clean up necessary in the UndoableEdit to return it to its previous state.
This method is only called to toggle the state. That is if the current state is canRedo() the only call will be setUndoRedoState(true);
setUndoState in interface ICanBeRolledBackundoState - true to return UndoableEdit to undo state,
false to return it to a redo state.
|
©2005, Forward Computing and Control Pty. Ltd ACN 003 669 994 NSW Australia All Rights Reserved. |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||