All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Class java.awt.swing.undo.CompoundEdit

java.lang.Object
    |
    +----java.awt.swing.undo.AbstractUndoableEdit
            |
            +----java.awt.swing.undo.CompoundEdit

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


Variable Index

 o edits
The collection of UndoableEdits undone/redone en masse by this CompoundEdit

Constructor Index

 o CompoundEdit()

Method Index

 o addEdit(UndoableEdit)
If this edit is inProgress, accepts anEdit and returns true.
 o canRedo()
Returns false if isInProgress or if super does.
 o canUndo()
Returns false if isInProgress or if super does.
 o die()
Send die to each subedit, in the reverse of the order that they were added
 o end()
Sets inProgress to false.
 o getPresentationName()
Returns getPresentationName from the last UndoableEdit added to edits.
 o getRedoPresentationName()
Returns getRedoPresentationName from the last UndoableEdit added to edits.
 o getUndoPresentationName()
Returns getUndoPresentationName from the last UndoableEdit added to edits.
 o isInProgress()
Returns true if this edit is in progress--that is, it has not received end.
 o isSignificant()
Returns true if any of the UndoableEdits in edits do.
 o lastEdit()
Returns the last UndoableEdit in edits, or null if edits is empty
 o redo()
Sends redo() to all contained UndoableEdits in the order in which they were added.
 o toString()
Returns a string representation of the object.
 o undo()
Sends undo() to all contained UndoableEdits in the reverse of the order in which they were added.

Variables

 o edits
protected Vector edits
The collection of UndoableEdits undone/redone en masse by this CompoundEdit

Constructors

 o CompoundEdit
public CompoundEdit()

Methods

 o undo
public void undo() throws CannotUndoException
Sends undo() to all contained UndoableEdits in the reverse of the order in which they were added.

Overrides:
undo in class AbstractUndoableEdit
 o redo
public void redo() throws CannotRedoException
Sends redo() to all contained UndoableEdits in the order in which they were added.

Overrides:
redo in class AbstractUndoableEdit
 o lastEdit
protected UndoableEdit lastEdit()
Returns the last UndoableEdit in edits, or null if edits is empty

 o die
public void die()
Send die to each subedit, in the reverse of the order that they were added

Overrides:
die in class AbstractUndoableEdit
 o addEdit
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.

Overrides:
addEdit in class AbstractUndoableEdit
 o end
public void end()
Sets inProgress to false.

See Also:
canUndo, canRedo
 o canUndo
public boolean canUndo()
Returns false if isInProgress or if super does.

Overrides:
canUndo in class AbstractUndoableEdit
See Also:
isInProgress
 o canRedo
public boolean canRedo()
Returns false if isInProgress or if super does.

Overrides:
canRedo in class AbstractUndoableEdit
See Also:
isInProgress
 o isInProgress
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.

See Also:
end
 o isSignificant
public boolean isSignificant()
Returns true if any of the UndoableEdits in edits do. Returns false if they all return false.

Overrides:
isSignificant in class AbstractUndoableEdit
 o getPresentationName
public String getPresentationName()
Returns getPresentationName from the last UndoableEdit added to edits. If edits is empty, calls super.

Overrides:
getPresentationName in class AbstractUndoableEdit
 o getUndoPresentationName
public String getUndoPresentationName()
Returns getUndoPresentationName from the last UndoableEdit added to edits. If edits is empty, calls super.

Overrides:
getUndoPresentationName in class AbstractUndoableEdit
 o getRedoPresentationName
public String getRedoPresentationName()
Returns getRedoPresentationName from the last UndoableEdit added to edits. If edits is empty, calls super.

Overrides:
getRedoPresentationName in class AbstractUndoableEdit
 o toString
public String toString()
Returns a string representation of the object.

Overrides:
toString in class AbstractUndoableEdit

All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Submit a bug or feature