|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.undo.AbstractUndoableEdit | +--javax.swing.undo.CompoundEdit
A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.
Field Summary | |
protected Vector |
edits
The collection of UndoableEdits undone/redone en masse by this CompoundEdit |
Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
RedoName, UndoName |
Constructor Summary | |
CompoundEdit()
|
Method Summary | |
boolean |
addEdit(UndoableEdit anEdit)
If this edit is inProgress, accepts anEdit and returns true. |
boolean |
canRedo()
Returns false if isInProgress or if super does. |
boolean |
canUndo()
Returns false if isInProgress or if super does. |
void |
die()
Send die to each subedit, in the reverse of the order that they were added |
void |
end()
Sets inProgress to false. |
String |
getPresentationName()
Returns getPresentationName from the last UndoableEdit added to edits. |
String |
getRedoPresentationName()
Returns getRedoPresentationName from the last UndoableEdit added to edits. |
String |
getUndoPresentationName()
Returns getUndoPresentationName from the last UndoableEdit added to edits. |
boolean |
isInProgress()
Returns true if this edit is in progress--that is, it has not received end. |
boolean |
isSignificant()
Returns true if any of the UndoableEdits in edits do. |
protected UndoableEdit |
lastEdit()
Returns the last UndoableEdit in edits, or null if edits is empty |
void |
redo()
Sends redo() to all contained UndoableEdits in the order in which they were added. |
String |
toString()
Returns a string that displays and identifies this object's properties. |
void |
undo()
Sends undo() to all contained UndoableEdits in the reverse of the order in which they were added. |
Methods inherited from class javax.swing.undo.AbstractUndoableEdit |
replaceEdit |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Vector edits
Constructor Detail |
public CompoundEdit()
Method Detail |
public void undo() throws CannotUndoException
undo
in class AbstractUndoableEdit
javax.swing.undo.AbstractUndoableEdit
AbstractUndoableEdit.canUndo()
public void redo() throws CannotRedoException
redo
in class AbstractUndoableEdit
javax.swing.undo.AbstractUndoableEdit
AbstractUndoableEdit.canRedo()
protected UndoableEdit lastEdit()
public void die()
die
in class AbstractUndoableEdit
javax.swing.undo.UndoableEdit
die()
public boolean addEdit(UndoableEdit anEdit)
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.
addEdit
in class AbstractUndoableEdit
javax.swing.undo.AbstractUndoableEdit
UndoableEdit.addEdit(javax.swing.undo.UndoableEdit)
public void end()
canUndo()
,
canRedo()
public boolean canUndo()
canUndo
in class AbstractUndoableEdit
isInProgress()
public boolean canRedo()
canRedo
in class AbstractUndoableEdit
isInProgress()
public boolean isInProgress()
end()
public boolean isSignificant()
isSignificant
in class AbstractUndoableEdit
javax.swing.undo.AbstractUndoableEdit
UndoableEdit.isSignificant()
public String getPresentationName()
getPresentationName
in class AbstractUndoableEdit
javax.swing.undo.AbstractUndoableEdit
AbstractUndoableEdit.getUndoPresentationName()
,
AbstractUndoableEdit.getRedoPresentationName()
public String getUndoPresentationName()
getUndoPresentationName
in class AbstractUndoableEdit
javax.swing.undo.AbstractUndoableEdit
AbstractUndoableEdit.getPresentationName()
public String getRedoPresentationName()
getRedoPresentationName
in class AbstractUndoableEdit
javax.swing.undo.AbstractUndoableEdit
AbstractUndoableEdit.getPresentationName()
public String toString()
toString
in class AbstractUndoableEdit
|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.