All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.undo.JCompoundEdit

java.lang.Object
   |
   +----com.sun.java.swing.undo.JUndoableEdit
           |
           +----com.sun.java.swing.undo.JCompoundEdit

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


Variable Index

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

Constructor Index

 o JCompoundEdit()

Method Index

 o addEdit(UndoableEdit)
If this edit is not inProgress, accepts anEdit and returns true.
 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 init()
Designated initializer, called by all constructors to initialize ivars.
 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 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 JCompoundEdit

Constructors

 o JCompoundEdit
 public JCompoundEdit()

Methods

 o init
 protected void init()
Designated initializer, called by all constructors to initialize ivars. Sets up edits vector.

Overrides:
init in class JUndoableEdit
 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 JUndoableEdit
 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 JUndoableEdit
 o lastEdit
 protected UndoableEdit lastEdit()
Returns the last UndoableEdit in edits, or null if edits is empty

 o addEdit
 public boolean addEdit(UndoableEdit anEdit)
If this edit is not inProgress, accepts anEdit and returns true.

The last edit added to this JCompoundEdit 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 JUndoableEdit
 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 JUndoableEdit
 o getPresentationName
 public String getPresentationName()
Returns getPresentationName from the last UndoableEdit added to edits. If edits is empty, calls super.

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

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

Overrides:
getRedoPresentationName in class JUndoableEdit

All Packages  Class Hierarchy  This Package  Previous  Next  Index