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

All Known Implementing Classes:
AbstractEffect, AnalysisEffect, ArrowEffect, CompartmentCollapseExpandEffect, GmfShowHideEffect, GraphitiHighlightEffect, HighlightEffect, HighlightSJInstructionEffect, HighlightSJMarkerEffect, LayoutEffect, MenuItemEnableStateEffect, PanningEffect, PointerEffect, PrintEffect, RefreshGMFEditPoliciesEffect, ReorderEffect, SetOptionsEffect, ShowHideEffect, TestEffectA, TestEffectSlow, TransformationEffect, UndoEffect, UnlockEffect, UpdateVisibilityEffect, XtendTransformationEffect

public interface IEffect

An effect executes some type of view management action, usually a visual change of the graphical model. haf: The execute and undo methods get called by the EffectsWorker thread and are expected to do something on the UI thread. Avoid working on the UI thread in an Effects *Constructor*, as it will be called in another thread causing an UI-thread Deadlock!

Rating red

Method Summary
 void execute()
          Execute the effect.
 boolean isMergeable()
          Determines whether this effect can be merged with previously scheduled effects.
 IEffect merge(IEffect otherEffect)
          Merge this effect with another effect.
 void schedule()
          Schedule the effect for execution.
 void scheduleUndo()
          Schedule the effect to be undone.
 void undo()
          Attempt to undo the effect.
 

Method Detail

execute

void execute()
Execute the effect.


schedule

void schedule()
Schedule the effect for execution.


undo

void undo()
Attempt to undo the effect.


scheduleUndo

void scheduleUndo()
Schedule the effect to be undone.


isMergeable

boolean isMergeable()
Determines whether this effect can be merged with previously scheduled effects.

Returns:
true if it can be merged, false if no search through the effect queue is necessary

merge

IEffect merge(IEffect otherEffect)
Merge this effect with another effect. Will return null if the effects can not be merged.

Parameters:
otherEffect - the effect to merge with
Returns:
the newly merged effect, or null if no merge was possible.