|
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
A simple implementation of Command.
This software is distributed under the Berkeley Software License.
Revisions: - SATIN-v1.0-1.0.0, Jun 22 1999, JH Created class - SATIN-v1.0-1.1.0, Dec 09 1999, JH Updated CommandImpl for SATINv2. Modified the enable/disable to be a counting semaphore. Renamed doit() to run(). Made commands that can execute() themselves. - 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 | |
CommandImpl()
|
Method Summary | |
boolean |
addEdit(UndoableEdit anEdit)
|
boolean |
canRedo()
Override this method in the subclass. |
boolean |
canUndo()
Override this method in the subclass. |
static String |
debug()
|
void |
die()
Override this method in the subclass. |
void |
disable()
This method is implemented for all subclasses in the superclass. |
void |
enable()
This method is implemented for all subclasses in the superclass. |
void |
execute()
Checks if the command is enabled or not, and executes the command if it is enabled, setting the execution time in the process. |
long |
getExecutionTime()
Get the system time this command was first executed. |
String |
getPresentationName()
Override this method in the subclass. |
String |
getRedoPresentationName()
You don't have to override this method in the subclass. |
String |
getUndoPresentationName()
You don't have to override this method in the subclass. |
boolean |
isDisabled()
This method is implemented for all subclasses in the superclass. |
boolean |
isEnabled()
This method is implemented for all subclasses in the superclass. |
boolean |
isSignificant()
Override this method in the subclass. |
void |
redo()
Override this method in the subclass. |
boolean |
replaceEdit(UndoableEdit anEdit)
|
protected abstract void |
run()
This method is called by execute() if the command is enabled. |
void |
setExecutionTime()
Set the time this command was executed to the current time. |
void |
setExecutionTime(long l)
Set the time this command was executed to the specified time. |
String |
toString()
|
void |
undo()
Override this method in the subclass. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CommandImpl()
Method Detail |
public final boolean isEnabled()
isEnabled
in interface Command
edu.berkeley.guir.lib.satin.command.Command
public final boolean isDisabled()
isDisabled
in interface Command
edu.berkeley.guir.lib.satin.command.Command
public void enable()
enable
in interface Command
public void disable()
disable
in interface Command
public boolean addEdit(UndoableEdit anEdit)
addEdit
in interface UndoableEdit
public boolean replaceEdit(UndoableEdit anEdit)
replaceEdit
in interface UndoableEdit
public void setExecutionTime()
Command
setExecutionTime
in interface Command
public void setExecutionTime(long l)
Command
setExecutionTime
in interface Command
edu.berkeley.guir.lib.satin.command.Command
l
- is the time to set the execution time to.public long getExecutionTime()
Command
getExecutionTime
in interface Command
edu.berkeley.guir.lib.satin.command.Command
public String getPresentationName()
getPresentationName
in interface UndoableEdit
public String getRedoPresentationName()
getRedoPresentationName
in interface UndoableEdit
public String getUndoPresentationName()
getUndoPresentationName
in interface UndoableEdit
public boolean canRedo()
canRedo
in interface UndoableEdit
public boolean canUndo()
canUndo
in interface UndoableEdit
public boolean isSignificant()
isSignificant
in interface UndoableEdit
public void redo()
redo
in interface UndoableEdit
public void undo()
undo
in interface UndoableEdit
public void die()
die
in interface UndoableEdit
public final void execute()
execute
in interface Command
Command.execute()
protected abstract void run()
public String toString()
toString
in class Object
public static String debug()
|
Copyright Information | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |