SpreadSheetApplet
Class SpreadSheet.UndoHandler

java.lang.Object
  |
  +--javax.swing.undo.AbstractUndoableEdit
        |
        +--javax.swing.undo.CompoundEdit
              |
              +--javax.swing.undo.UndoManager
                    |
                    +--SpreadSheetApplet.SpreadSheet.UndoHandler

private class SpreadSheet.UndoHandler
extends javax.swing.undo.UndoManager

UndoManager qui permet aussi de maintenir à jour les boutons bUndo et bRedo en fonction de canUndo() et canRedo(). Il comprend aussi une méthode setActive() qui pemet de désactiver momentanément l'enregistrement des UndoableEdit par la méthode addEdit(...).

See Also:
Serialized Form

Field Summary
private  boolean blocked
           
private  boolean isActive
           
 
Fields inherited from class javax.swing.undo.UndoManager
indexOfNextAdd, limit
 
Fields inherited from class javax.swing.undo.CompoundEdit
edits, inProgress
 
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
alive, hasBeenDone, RedoName, UndoName
 
Constructor Summary
private SpreadSheet.UndoHandler()
           
 
Method Summary
 boolean addEdit(javax.swing.undo.UndoableEdit e)
           
 void blockActiver(boolean b)
           
 void redo()
           
 void setActive(boolean b)
           
 void undo()
           
 void update()
           
 
Methods inherited from class javax.swing.undo.UndoManager
canRedo, canUndo, canUndoOrRedo, discardAllEdits, editToBeRedone, editToBeUndone, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, redoTo, setLimit, toString, trimEdits, trimForLimit, undoableEditHappened, undoOrRedo, 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, registerNatives, wait, wait, wait
 

Field Detail

isActive

private boolean isActive


blocked

private boolean blocked

Constructor Detail

SpreadSheet.UndoHandler

private SpreadSheet.UndoHandler()

Method Detail

blockActiver

public void blockActiver(boolean b)


setActive

public void setActive(boolean b)


update

public void update()


addEdit

public boolean addEdit(javax.swing.undo.UndoableEdit e)


undo

public void undo()


redo

public void redo()