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.
-
edits
- The collection of UndoableEdits undone/redone en masse by this
JCompoundEdit
-
JCompoundEdit()
-
-
addEdit(UndoableEdit)
- If this edit is not inProgress, accepts anEdit and returns
true.
-
getPresentationName()
- Returns getPresentationName from the last UndoableEdit added to
edits.
-
getRedoPresentationName()
- Returns getRedoPresentationName from the last UndoableEdit
added to edits.
-
getUndoPresentationName()
- Returns getUndoPresentationName from the last UndoableEdit
added to edits.
-
init()
- Designated initializer, called by all constructors to
initialize ivars.
-
isSignificant()
- Returns true if any of the UndoableEdits in edits do.
-
lastEdit()
- Returns the last UndoableEdit in edits, or null if edits is
empty
-
redo()
- Sends redo() to all contained UndoableEdits in the order in
which they were added.
-
undo()
- Sends undo() to all contained UndoableEdits in the reverse of
the order in which they were added.
edits
protected Vector edits
- The collection of UndoableEdits undone/redone en masse by this
JCompoundEdit
JCompoundEdit
public JCompoundEdit()
init
protected void init()
- Designated initializer, called by all constructors to
initialize ivars. Sets up edits vector.
- Overrides:
- init in class JUndoableEdit
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
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
lastEdit
protected UndoableEdit lastEdit()
- Returns the last UndoableEdit in edits, or null if edits is
empty
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
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
getPresentationName
public String getPresentationName()
- Returns getPresentationName from the last UndoableEdit added to
edits. If edits is empty, calls super.
- Overrides:
- getPresentationName in class JUndoableEdit
getUndoPresentationName
public String getUndoPresentationName()
- Returns getUndoPresentationName from the last UndoableEdit
added to edits. If edits is empty, calls super.
- Overrides:
- getUndoPresentationName in class JUndoableEdit
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