de.cau.cs.kieler.core.kivi
Interface ITrigger

All Known Implementing Classes:
AbstractTrigger, ButtonTrigger, DiagramTrigger, EffectTrigger, KSBasETrigger, ModelChangeTrigger, PartTrigger, ReInitDiagramDoneTrigger, SelectionTrigger, SignalFlowTrigger, StateActivityTrigger, StateMachineSimulationTrigger, TestTriggerA, TestTriggerB, TestTriggerSpammer, TestTriggerSpammerSynchronized, XtextBasedEditorActivationChangeTrigger

public interface ITrigger

A trigger listens to editor events and informs the view management about these.

Rating red

Method Summary
 boolean isActive()
          Checks whether the trigger is active or not.
 void register()
          Called when the trigger is activated, e.g., if KIVi is (re-)activated or the first ICombination being fired by such a trigger is loaded.
 void setActive(boolean a)
          Called by the view management to register or unregister this trigger.
 void trigger(ITriggerState triggerState)
          Inform the view management about an event.
 void unregister()
          Called when the trigger is deactivated, e.g., if the whole KIVi is deactivated.
 

Method Detail

trigger

void trigger(ITriggerState triggerState)
Inform the view management about an event. Call this method when the specific trigger implementation has detected an event.

Parameters:
triggerState - new instance of the corresponding trigger state class

setActive

void setActive(boolean a)
Called by the view management to register or unregister this trigger.

Parameters:
a - true if registering

isActive

boolean isActive()
Checks whether the trigger is active or not.

Returns:
true if active

register

void register()
Called when the trigger is activated, e.g., if KIVi is (re-)activated or the first ICombination being fired by such a trigger is loaded. Registers itself where necessary.


unregister

void unregister()
Called when the trigger is deactivated, e.g., if the whole KIVi is deactivated. Unregisters itself where necessary.