de.cau.cs.kieler.core.kivi
Class AbstractCombination

java.lang.Object
  extended by de.cau.cs.kieler.core.kivi.AbstractCombination
All Implemented Interfaces:
ICombination
Direct Known Subclasses:
HighlightSelectedTransitionsCombination, KSBasECombination, LayoutAfterCollapseCombination, LayoutAfterModelChangedCombination, LayoutAnalysisCombination, LayoutCombination, ShowHierarchyCombination, SignalFlowCombination, SyncChartsCombination

public abstract class AbstractCombination
extends Object
implements ICombination

Abstract base implementation for combinations.

Rating red

Constructor Summary
AbstractCombination()
           
 
Method Summary
protected  void doNothing()
          Called by execute() to make sure previous effects are not undone when an execution wants to perform no changes.
protected  void dontUndo()
          Called by execute() to make sure previous effects are not undone when an execution wants to keep those effects visible indefinitely.
 Class<? extends ITriggerState>[] getTriggerStates()
          Get the array of trigger state classes this combination listens to.
 boolean isActive()
          Check whether this combination is active.
protected  void schedule(IEffect effect)
          Schedule an effect for execution, performs merging against all other effects scheduled during this execution before actually executing the effect.
 void setActive(boolean a)
          Change the active status of this combination.
 List<IEffect> trigger(ITriggerState triggerState)
          Trigger the execution of this combination.
 void undo()
          Attempt to undo all active effects, for example when shutting down view management or when disabling this combination.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCombination

public AbstractCombination()
Method Detail

trigger

public List<IEffect> trigger(ITriggerState triggerState)
Trigger the execution of this combination.

Specified by:
trigger in interface ICombination
Parameters:
triggerState - the trigger state responsible for the triggering
Returns:
the list of effects to execute

schedule

protected void schedule(IEffect effect)
Schedule an effect for execution, performs merging against all other effects scheduled during this execution before actually executing the effect.

Parameters:
effect - the effect to schedule

doNothing

protected void doNothing()
Called by execute() to make sure previous effects are not undone when an execution wants to perform no changes.


dontUndo

protected void dontUndo()
Called by execute() to make sure previous effects are not undone when an execution wants to keep those effects visible indefinitely.


getTriggerStates

public Class<? extends ITriggerState>[] getTriggerStates()
Get the array of trigger state classes this combination listens to. Can be overridden when the default mechanism of registering triggers by implementing evaluate(ConcreteTrigger) is not wanted.

Specified by:
getTriggerStates in interface ICombination
Returns:
array of trigger states

undo

public void undo()
Attempt to undo all active effects, for example when shutting down view management or when disabling this combination.

Specified by:
undo in interface ICombination

isActive

public boolean isActive()
Check whether this combination is active.

Specified by:
isActive in interface ICombination
Returns:
true if the combination is active

setActive

public void setActive(boolean a)
Change the active status of this combination.

Specified by:
setActive in interface ICombination
Parameters:
a - new active status