de.cau.cs.kieler.synccharts.kivi
Class ArrowEffect

java.lang.Object
  extended by de.cau.cs.kieler.core.kivi.AbstractEffect
      extended by de.cau.cs.kieler.synccharts.kivi.ArrowEffect
All Implemented Interfaces:
IEffect

public class ArrowEffect
extends AbstractEffect

Draws a transient arrow from source to target edit part.

Rating red

Constructor Summary
ArrowEffect()
          Default constructor.
ArrowEffect(EObject s, EObject t, Color c, boolean connectionLayer)
          Create a new arrow effect for the given source and target EObject.
 
Method Summary
 void execute()
          Execute the effect.
 boolean isMergeable()
          Determines whether this effect can be merged with previously scheduled effects.
 IEffect merge(IEffect other)
          Merge this effect with another effect.
 void undo()
          Attempt to undo the effect.
 
Methods inherited from class de.cau.cs.kieler.core.kivi.AbstractEffect
schedule, scheduleUndo, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArrowEffect

public ArrowEffect()
Default constructor.


ArrowEffect

public ArrowEffect(EObject s,
                   EObject t,
                   Color c,
                   boolean connectionLayer)
Create a new arrow effect for the given source and target EObject. Attempts to find appropriate edit parts, will not do anything if either can not be found.

Parameters:
s - the source EObject
t - the target EObject
c - the color to paint the arrow with
connectionLayer - true if the connection layer shall be used for drawing on instead of the figure of the source's parent
Method Detail

execute

public void execute()
Execute the effect. FIXME handle collapsed target states/superstates.


undo

public void undo()
Attempt to undo the effect.

Specified by:
undo in interface IEffect
Overrides:
undo in class AbstractEffect

isMergeable

public boolean isMergeable()
Description copied from class: AbstractEffect
Determines whether this effect can be merged with previously scheduled effects.

Specified by:
isMergeable in interface IEffect
Overrides:
isMergeable in class AbstractEffect
Returns:
true if it can be merged, false if no search through the effect queue is necessary

merge

public IEffect merge(IEffect other)
Description copied from class: AbstractEffect
Merge this effect with another effect. Will return null if the effects can not be merged.

Specified by:
merge in interface IEffect
Overrides:
merge in class AbstractEffect
Parameters:
other - the effect to merge with
Returns:
the newly merged effect, or null if no merge was possible.