de.cau.cs.kieler.viewmanagement.effects
Class LayoutEffect

java.lang.Object
  extended by de.cau.cs.kieler.viewmanagement.AEffect
      extended by de.cau.cs.kieler.viewmanagement.effects.LayoutEffect

public class LayoutEffect
extends AEffect

The effect that is used to perform auto layout

Rating red

Constructor Summary
LayoutEffect()
           
 
Method Summary
 void execute()
          Performs auto layout by simply calling the layout method from DiagramLayoutManager.
 void setParameters(Object parameters)
          Sets the effect parameters.
 void setTarget(EditPart target)
          Sets the target ShapeEditPart
 
Methods inherited from class de.cau.cs.kieler.viewmanagement.AEffect
getAffectedObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutEffect

public LayoutEffect()
Method Detail

execute

public final void execute()
Performs auto layout by simply calling the layout method from DiagramLayoutManager. It must be called in a safe thread, because it changes the notation model and hence must go through the EMF transaction mechanism. When this execute is called from a weird thread, e.g. when the notation model is in a read-only context, you might otherwise get an IllegalStateException. So here layout is called from within the display thread.

Specified by:
execute in class AEffect

setParameters

public final void setParameters(Object parameters)
Sets the effect parameters. In this special case the parameter is an IEditorPart

Overrides:
setParameters in class AEffect
Parameters:
parameters - the parameters

setTarget

public final void setTarget(EditPart target)
Sets the target ShapeEditPart

Overrides:
setTarget in class AEffect
Parameters:
target - the target of the effect