|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.viewmanagement.ACombination
public abstract class ACombination
Abstract definition of a combination. The combination connects triggers and effects and is itself a triggerlistener. Triggers will call its notifyTrigger() to inform a listening combination about a new event. The combination will then receive a TriggerEventObject with information. A combination has two main methods, evaluate() and execute(). evaluate() should determine whether or not the combination should be executed. Here e.g. a number of triggers could be connected or other conditions considered before executing. execute will be called if evaluate returns true. execute() is the place where the desired effects should be initialized, set up and finally executed themselves.
Constructor Summary | |
---|---|
ACombination()
|
Method Summary | |
---|---|
abstract boolean |
evaluate(TriggerEventObject triggerEvent)
Abstract method to evaluate certain conditions chosen by the developer that should delay or trigger the execution of the combination. |
abstract void |
execute()
Abstract method to execute the combination. |
void |
finalize()
Finalizes the combination, removes it as listener from its triggers. |
EditPart |
getEditPart(EObject eObject)
Find an GEF EditPart that corresponds to an semantic model EObject. |
static EditPart |
getRootEPAsParent()
Helper method for translateToEditPart to get a parent element from which to start the search |
protected abstract List<ATrigger> |
getTriggers()
Abstract method that returns the triggers that are of importance for this combination. |
void |
initialize()
Initializes the combination and registers it as listener to the triggers of interest. |
boolean |
isActive()
|
void |
notifyTrigger(TriggerEventObject triggerEvent)
This is called whenever a trigger the combination is listening to has a new event |
protected void |
resetHashedEditParts()
Reset hashed edit parts. |
void |
setActive(boolean active)
Sets the status of the combination |
EditPart |
translateToEditPart(String elementURIFragment,
EditPart parent)
Deprecated. with this method, adressing of transitions is not possible. Adressing should be done with EObjects. Use getEditPart(EObject eObject) instead. |
void |
undoEffects()
Removes the last effect when shutting down the View Management, if needed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ACombination()
Method Detail |
---|
public abstract boolean evaluate(TriggerEventObject triggerEvent)
triggerEvent
- delivered by a trigger, contains necessary information for the combination
public abstract void execute()
protected abstract List<ATrigger> getTriggers()
public void undoEffects()
public final boolean isActive()
public final void setActive(boolean active)
active
- new statuspublic final void initialize()
public final void finalize()
finalize
in class Object
protected void resetHashedEditParts()
public final void notifyTrigger(TriggerEventObject triggerEvent)
notifyTrigger
in interface ITriggerListener
triggerEvent
- the object to be deliveredpublic static final EditPart getRootEPAsParent()
public final EditPart translateToEditPart(String elementURIFragment, EditPart parent)
elementURIFragment
- given e.g. by a triggerparent
- element from which to start the search. Can be specified if known in order to
speed up the search, but may be null. Then it'll be replaced by the rootEditPart
by calling getRootEPAsParent
public final EditPart getEditPart(EObject eObject)
eObject
- the semantic object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |