|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
| 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
UIDefaultsprotected static final String RedoName
UIDefaults| Constructor Detail |
public AbstractUndoableEdit()
| Method Detail |
public void die()
die in interface UndoableEditjavax.swing.undo.UndoableEditCompoundEdit.die()
public void undo()
throws CannotUndoException
undo in interface UndoableEditcanUndo()public boolean canUndo()
canUndo in interface UndoableEdit
public void redo()
throws CannotRedoException
redo in interface UndoableEditcanRedo()public boolean canRedo()
canRedo in interface UndoableEditpublic boolean addEdit(UndoableEdit anEdit)
addEdit in interface UndoableEditpublic boolean replaceEdit(UndoableEdit anEdit)
replaceEdit in interface UndoableEditpublic boolean isSignificant()
isSignificant in interface UndoableEditUndoableEdit.isSignificant()public String getPresentationName()
getPresentationName in interface UndoableEditpublic String getUndoPresentationName()
getUndoPresentationName in interface UndoableEditgetPresentationName()public String getRedoPresentationName()
getRedoPresentationName in interface UndoableEditgetPresentationName()public String toString()
|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
| 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-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.