|
UC Berkeley Group for User Interface Research Updated November 17, 2000 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--edu.berkeley.guir.lib.satin.command.CommandImpl
|
+--edu.berkeley.guir.lib.satin.command.UndoableCommand
Undoable commands are commands that are meant to be undone only. This is more in spirit with how undo was designed in Java Swing. It assumes that the programmer has already "done" the action, and just wants some way of undoing what they did.
To use this class, subclass it and override the undo method to undo what you want. Just be sure to throw this command into the command queue in the right place, so it can be undone sequentially in the right order.
This software is distributed under the Berkeley Software License.
Revisions: - SATIN-v1.0-1.0.0, Aug 31 1999, JH
Created class
- SATIN-v2.1-1.0.0, Aug 11 2000, JH
Touched for SATIN release
| Inner classes inherited from class edu.berkeley.guir.lib.satin.SatinConstants |
SatinConstants.ObjectPoolAffineTransform, SatinConstants.ObjectPoolPoint2D, SatinConstants.ObjectPoolPolygon2D, SatinConstants.ObjectPoolRectangle2D, SatinConstants.ObjectPoolStringBuffer, SatinConstants.UniqueAffineTransform, SatinConstants.UniquePoint2D, SatinConstants.UniquePolygon2D, SatinConstants.UniqueRectangle2D |
| Constructor Summary | |
UndoableCommand()
|
|
| Method Summary | |
boolean |
canRedo()
Override this method in the subclass. |
boolean |
canUndo()
Override this method in the subclass. |
void |
die()
Override this method in the subclass. |
String |
getPresentationName()
Override this method in the subclass. |
boolean |
isSignificant()
Override this method in the subclass. |
void |
redo()
Obviously we cannot redo, since we don't know what to do in the first place. |
void |
run()
By default, does nothing. |
void |
undo()
Override this method in the subclass. |
| Methods inherited from class edu.berkeley.guir.lib.satin.command.CommandImpl |
addEdit, debug, disable, enable, execute, getExecutionTime, getRedoPresentationName, getUndoPresentationName, isDisabled, isEnabled, replaceEdit, setExecutionTime, setExecutionTime, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public UndoableCommand()
| Method Detail |
public String getPresentationName()
CommandImplgetPresentationName in class CommandImplpublic boolean canRedo()
CommandImplcanRedo in class CommandImplpublic boolean canUndo()
CommandImplcanUndo in class CommandImplpublic boolean isSignificant()
CommandImplisSignificant in class CommandImplpublic void run()
run in class CommandImplpublic void redo()
redo in class CommandImplpublic void undo()
CommandImplundo in class CommandImplpublic void die()
CommandImpldie in class CommandImpl
|
Copyright Information | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||