Class CompoundEdit

All Implemented Interfaces:
Serializable, UndoableEdit
Direct Known Subclasses:
AbstractDocument.DefaultDocumentEvent, UndoManager

public class CompoundEdit extends AbstractUndoableEdit
A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Vector<UndoableEdit>
    The collection of UndoableEdits undone/redone en masse by this CompoundEdit.

    Fields declared in class AbstractUndoableEdit

    RedoName, UndoName
    Modifier and Type
    Field
    Description
    protected static final String
    String returned by getRedoPresentationName; as of Java 2 platform v1.3.1 this field is no longer used.
    protected static final String
    String returned by getUndoPresentationName; as of Java 2 platform v1.3.1 this field is no longer used.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a CompoundEdit.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    If this edit is inProgress, accepts anEdit and returns true.
    boolean
    Returns false if isInProgress or if super returns false.
    boolean
    Returns false if isInProgress or if super returns false.
    void
    die()
    Sends die to each subedit, in the reverse of the order that they were added.
    void
    end()
    Sets inProgress to false.
    Returns getPresentationName from the last UndoableEdit added to edits.
    Returns getRedoPresentationName from the last UndoableEdit added to edits.
    Returns getUndoPresentationName from the last UndoableEdit added to edits.
    boolean
    Returns true if this edit is in progress--that is, it has not received end.
    boolean
    Returns true if any of the UndoableEdits in edits do.
    protected UndoableEdit
    Returns the last UndoableEdit in edits, or null if edits is empty.
    void
    Sends redo to all contained UndoableEdits in the order in which they were added.
    Returns a string that displays and identifies this object's properties.
    void
    Sends undo to all contained UndoableEdits in the reverse of the order in which they were added.

    Methods declared in class AbstractUndoableEdit

    replaceEdit
    Modifier and Type
    Method
    Description
    boolean
    This default implementation returns false.

    Methods declared in class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    Modifier and Type
    Method
    Description
    protected Object
    Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.
    boolean
    Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
    May cause performance issues, deadlocks and hangs.
    final Class<? extends Object>
    Answers the unique instance of java.lang.Class which represents the class of the receiver.
    int
    Answers an integer hash code for the receiver.
    final void
    Causes one thread which is waiting on the receiver to be made ready to run.
    final void
    Causes all threads which are waiting on the receiver to be made ready to run.
    final void
    Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated by notify or notifyAll).
    final void
    wait(long time)
    Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated by notify or notifyAll) or the expiration of the timeout.
    final void
    wait(long time, int frac)
    Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated by notify or notifyAll) or the expiration of the timeout.