Home » openjdk-7 » javax » swing » undo » [javadoc | source]
javax.swing.undo
public class: CompoundEdit [javadoc | source]
java.lang.Object
   javax.swing.undo.AbstractUndoableEdit
      javax.swing.undo.CompoundEdit

All Implemented Interfaces:
    UndoableEdit, Serializable

Direct Known Subclasses:
    NamedCompound, DefaultDocumentEvent, UndoManager, CountingUndoManager

A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.
Field Summary
 boolean inProgress    True if this edit has never received end
protected  Vector<UndoableEdit> edits    The collection of UndoableEdits undone/redone en masse by this CompoundEdit
Fields inherited from javax.swing.undo.AbstractUndoableEdit:
UndoName,  RedoName,  hasBeenDone,  alive
Constructor:
 public CompoundEdit() 
Method from javax.swing.undo.CompoundEdit Summary:
addEdit,   canRedo,   canUndo,   die,   end,   getPresentationName,   getRedoPresentationName,   getUndoPresentationName,   isInProgress,   isSignificant,   lastEdit,   redo,   toString,   undo
Methods from javax.swing.undo.AbstractUndoableEdit:
addEdit,   canRedo,   canUndo,   die,   getPresentationName,   getRedoPresentationName,   getUndoPresentationName,   isSignificant,   redo,   replaceEdit,   toString,   undo
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.undo.CompoundEdit Detail:
 public boolean addEdit(UndoableEdit anEdit) 
    If this edit is inProgress, accepts anEdit and returns true.

    The last edit added to this CompoundEdit is given a chance to addEdit(anEdit). If it refuses (returns false), anEdit is given a chance to replaceEdit the last edit. If anEdit returns false here, it is added to edits.

 public boolean canRedo() 
    Returns false if isInProgress or if super returns false.
 public boolean canUndo() 
    Returns false if isInProgress or if super returns false.
 public  void die() 
    Sends die to each subedit, in the reverse of the order that they were added.
 public  void end() 
    Sets inProgress to false.
 public String getPresentationName() 
    Returns getPresentationName from the last UndoableEdit added to edits. If edits is empty, calls super.
 public String getRedoPresentationName() 
    Returns getRedoPresentationName from the last UndoableEdit added to edits. If edits is empty, calls super.
 public String getUndoPresentationName() 
    Returns getUndoPresentationName from the last UndoableEdit added to edits. If edits is empty, calls super.
 public boolean isInProgress() 
    Returns true if this edit is in progress--that is, it has not received end. This generally means that edits are still being added to it.
 public boolean isSignificant() 
    Returns true if any of the UndoableEdits in edits do. Returns false if they all return false.
 protected UndoableEdit lastEdit() 
    Returns the last UndoableEdit in edits, or null if edits is empty.
 public  void redo() throws CannotRedoException 
    Sends redo to all contained UndoableEdits in the order in which they were added.
 public String toString() 
    Returns a string that displays and identifies this object's properties.
 public  void undo() throws CannotUndoException 
    Sends undo to all contained UndoableEdits in the reverse of the order in which they were added.