|
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 UndoableEditdie(),
undo(),
redo()
public void redo()
throws CannotRedoException
redo in interface UndoableEditcanRedo()public boolean canRedo()
canRedo in interface UndoableEditdie(),
undo(),
redo()public boolean addEdit(UndoableEdit anEdit)
addEdit in interface UndoableEditUndoableEdit.addEdit(javax.swing.undo.UndoableEdit)public boolean replaceEdit(UndoableEdit anEdit)
replaceEdit in interface UndoableEditUndoableEdit.replaceEdit(javax.swing.undo.UndoableEdit)public boolean isSignificant()
isSignificant in interface UndoableEditUndoableEdit.isSignificant()public String getPresentationName()
getPresentationName in interface UndoableEditgetUndoPresentationName(),
getRedoPresentationName()public String getUndoPresentationName()
getUndoPresentationName in interface UndoableEditgetPresentationName()public String getRedoPresentationName()
getRedoPresentationName in interface UndoableEditgetPresentationName()public String toString()
toString in class Object
|
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 Oracle and/or its affiliates, in the US and other countries.
Copyright © 1995, 2010 Oracle and/or its affiliates. All rights reserved.