|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sysord.mad.ui.swt.ModelAction
public abstract class ModelAction
A ModelAction is an action with the goal to execute operations on the model.
The WidgetValueListener
and the ActivatableAdapter
s will be deactivated
before the execution and re-activated after.
Constructor Summary | |
---|---|
ModelAction(com.sysord.mad.widget.WidgetValueListener<?> valueListener,
com.sysord.emf.tools.misc.ActivatableAdapter... adapters)
Construct a new ModelAction. |
Method Summary | |
---|---|
protected abstract void |
action()
The model action to execute. |
protected boolean |
canRun()
Indicates if this ModelAction can be run. |
void |
execute()
Execute the defined action in an async SWT operation if the canRun()
method returns true . |
protected java.lang.Object |
getLock()
Provides an Object's instance for lock purposes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModelAction(com.sysord.mad.widget.WidgetValueListener<?> valueListener, com.sysord.emf.tools.misc.ActivatableAdapter... adapters)
valueListener
- adapters
- Method Detail |
---|
public void execute()
canRun()
method returns true
.
protected abstract void action()
protected boolean canRun()
ModelAction
can be run.
This method return true
by default, and should be overridden in subclasses
if this action is conditional.
true
if this ModelAction
can be run; false
otherwise.protected java.lang.Object getLock()
Return this
by default.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |