|
Eclipse GEF 3.8.0.201206112118 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gef.commands.Command
public abstract class Command
An Abstract implementation of Command
.
Constructor Summary | |
---|---|
Command()
Constructs a Command with no label. |
|
Command(String label)
Constructs a Command with the specified label. |
Method Summary | |
---|---|
boolean |
canExecute()
|
boolean |
canUndo()
|
Command |
chain(Command command)
Returns a Command that represents the chaining of a specified Command to this Command. |
void |
dispose()
This is called to indicate that the Command will not be used
again. |
void |
execute()
executes the Command. |
String |
getDebugLabel()
|
String |
getLabel()
|
void |
redo()
Re-executes the Command. |
void |
setDebugLabel(String label)
Sets the debug label for this command |
void |
setLabel(String label)
Sets the label used to describe this command to the User. |
void |
undo()
Undoes the changes performed during execute() . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Command()
public Command(String label)
label
- the Command's labelMethod Detail |
---|
public boolean canExecute()
true
if the command can be executedpublic boolean canUndo()
true
if the command can be undone. This method
should only be called after execute()
or
redo()
has been called.public Command chain(Command command)
execute()
after
this command has executed, and it will undo()
before this
Command is undone.
command
- null
or the Command being chained
public void dispose()
Command
will not be used
again. The Command may be in any state (executed, undone or redone) when
dispose is called. The Command should not be referenced in any way after
it has been disposed.
public void execute()
public String getDebugLabel()
public String getLabel()
public void redo()
undo()
has been called.
public void setDebugLabel(String label)
label
- a description used for debugging onlypublic void setLabel(String label)
label
- the labelpublic void undo()
execute()
. This method
should only be called after execute
has been called, and
only when canUndo()
returns true
.
canUndo()
|
Eclipse GEF 3.8.0.201206112118 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |