|
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
An abstract implementation of UndoableEdit, implementing simple responses to all boolean methods in that interface.
Field Summary | |
protected static String |
RedoName
String returned by getRedoPresentationName() |
protected static String |
UndoName
String returned by getUndoPresentationName() |
Constructor Summary | |
AbstractUndoableEdit()
|
Method Summary | |
boolean |
addEdit(UndoableEdit anEdit)
This default implementation returns false. |
boolean |
canRedo()
Returns true if this edit is alive and hasBeenDone is false. |
boolean |
canUndo()
Returns true if this edit is alive and hasBeenDone is true. |
void |
die()
Sets alive to false. |
String |
getPresentationName()
This default implementation returns "". |
String |
getRedoPresentationName()
If getPresentationName() returns "", returns AbstractUndoableEdit.RedoName. |
String |
getUndoPresentationName()
If getPresentationName() returns "", returns AbstractUndoableEdit.UndoName. |
boolean |
isSignificant()
This default implementation returns true. |
void |
redo()
Throws CannotRedoException if canRedo() returns false. |
boolean |
replaceEdit(UndoableEdit anEdit)
This default implementation returns false. |
String |
toString()
Returns a string that displays and identifies this object's properties. |
void |
undo()
Throws CannotUndoException if canUndo() returns false. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final String UndoName
protected static final String RedoName
Constructor Detail |
public AbstractUndoableEdit()
Method Detail |
public void die()
die
in interface UndoableEdit
javax.swing.undo.UndoableEdit
CompoundEdit.die()
public void undo() throws CannotUndoException
undo
in interface UndoableEdit
canUndo()
public boolean canUndo()
canUndo
in interface UndoableEdit
die()
,
undo()
,
redo()
public void redo() throws CannotRedoException
redo
in interface UndoableEdit
canRedo()
public boolean canRedo()
canRedo
in interface UndoableEdit
die()
,
undo()
,
redo()
public boolean addEdit(UndoableEdit anEdit)
addEdit
in interface UndoableEdit
UndoableEdit.addEdit(javax.swing.undo.UndoableEdit)
public boolean replaceEdit(UndoableEdit anEdit)
replaceEdit
in interface UndoableEdit
UndoableEdit.replaceEdit(javax.swing.undo.UndoableEdit)
public boolean isSignificant()
isSignificant
in interface UndoableEdit
UndoableEdit.isSignificant()
public String getPresentationName()
getPresentationName
in interface UndoableEdit
getUndoPresentationName()
,
getRedoPresentationName()
public String getUndoPresentationName()
getUndoPresentationName
in interface UndoableEdit
getPresentationName()
public String getRedoPresentationName()
getRedoPresentationName
in interface UndoableEdit
getPresentationName()
public String toString()
toString
in class Object
|
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.