|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CompoundEdit
javax.swing.undo.UndoManager
dip.gui.undo.UndoRedoManager
Manages Undo/Redo events, and associated Edit menu items involving Undo and Redo.
This is not a singleton.
Field Summary |
Fields inherited from class javax.swing.undo.CompoundEdit |
edits |
Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
RedoName, UndoName |
Constructor Summary | |
UndoRedoManager(ClientFrame clientFrame,
OrderDisplayPanel orderDisplayPanel)
Constructor |
Method Summary | |
boolean |
addEdit(javax.swing.undo.UndoableEdit anEdit)
Add an Edit (UndoableEdit) |
void |
discardAllEdits()
Throw away all stored edits |
void |
dumpEdits()
For debugging: lists edits. |
void |
filterF2F()
Filters the Undo list, in reverse order, removing all actions until the first UndoResolve action is detected. |
ClientFrame |
getClientFrame()
Returns the ClientFrame object |
OrderDisplayPanel |
getOrderDisplayPanel()
Returns the OrderDisplayPanel associated with this UndoRedo manager. |
void |
redo()
Redo last undo |
void |
refreshMenu()
Refreshes the menu items, enabling & adding action names as appropriate. |
void |
setClientFrame(ClientFrame clientFrame)
Can be used post-deserialization |
void |
setOrderDisplayPanel(OrderDisplayPanel orderDisplayPanel)
Can be used post-deserialization |
void |
simplify()
Simplifies the undo list. |
void |
undo()
Undo an UndoableEdit |
void |
undoOrRedo()
Undo or Redo |
Methods inherited from class javax.swing.undo.UndoManager |
canRedo, canUndo, canUndoOrRedo, editToBeRedone, editToBeUndone, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, redoTo, setLimit, toString, trimEdits, trimForLimit, undoableEditHappened, undoTo |
Methods inherited from class javax.swing.undo.CompoundEdit |
die, getPresentationName, isInProgress, isSignificant, lastEdit |
Methods inherited from class javax.swing.undo.AbstractUndoableEdit |
replaceEdit |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public UndoRedoManager(ClientFrame clientFrame, OrderDisplayPanel orderDisplayPanel)
Method Detail |
public void setClientFrame(ClientFrame clientFrame)
public void setOrderDisplayPanel(OrderDisplayPanel orderDisplayPanel)
public boolean addEdit(javax.swing.undo.UndoableEdit anEdit)
public void redo()
public void undo()
public void discardAllEdits()
public void undoOrRedo()
public void dumpEdits()
public OrderDisplayPanel getOrderDisplayPanel()
public ClientFrame getClientFrame()
public void refreshMenu()
public void filterF2F()
public void simplify()
The rationale for this is this enables quickly undoing a number of resolves, and simplifies the task of going 'back in time' to change the game.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |