|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcreek.cke.command.CreekCommand
Defines the abstract class to be extended by all command classes in Visualizer. Provides a way of executing commands and being able to undo/redo them later. This class defines an additional method for performing the command for the first time.
Field Summary | |
protected boolean |
canUndoRedo
Indicates if this command and be undone/redone. |
protected CreekDocument |
document
The document this command is associated with. |
Constructor Summary | |
CreekCommand(CreekDocument doc)
Creates a new CreekCommand object associated with the given document object. |
Method Summary | |
boolean |
canRedo()
True if it is still possible to redo this operation. |
boolean |
canUndo()
True if it is still possible to undo this operation. |
CreekDocument |
getDocument()
Returns the document this command was performed on. |
abstract boolean |
perform()
Do the command for the first time. |
void |
replaced()
Indicates this object has been replaced by another. |
void |
setDocument(CreekDocument doc)
Our document has been changed on us. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.undo.UndoableEdit |
addEdit, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, redo, replaceEdit, undo |
Field Detail |
protected CreekDocument document
protected boolean canUndoRedo
Constructor Detail |
public CreekCommand(CreekDocument doc)
doc
- document we are performed onMethod Detail |
public boolean canRedo()
canRedo
in interface javax.swing.undo.UndoableEdit
public boolean canUndo()
canUndo
in interface javax.swing.undo.UndoableEdit
public CreekDocument getDocument()
public abstract boolean perform()
public void setDocument(CreekDocument doc)
public void replaced()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |