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

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

public class CompartmentCollapseEffect
extends AEffect

Effect that collapses all compartments that are collapsable, starting from the given object and searching through all its children as well.

Rating red

Constructor Summary
CompartmentCollapseEffect()
          Default constructor of the collapse effect.
 
Method Summary
 void execute()
          Abstract method to execute a specific effect.
 void getResizeableCompartments(IFigure f, List<IFigure> resizableFigures)
          Method to search recursively for resizeable compartments.
 void setTarget(EditPart target)
          Sets the target of the effect
 
Methods inherited from class de.cau.cs.kieler.viewmanagement.AEffect
getAffectedObject, setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompartmentCollapseEffect

public CompartmentCollapseEffect()
Default constructor of the collapse effect. Will take the target and determine whether it or any of tis children are collapseable (of type ResizeableCompartmentFigure) and then collapse them.

Method Detail

execute

public final void execute()
Description copied from class: AEffect
Abstract method to execute a specific effect. Must be implemented by the developer of the effect. Here, you will have to implement the exact behaviour of the effect.

Specified by:
execute in class AEffect

getResizeableCompartments

public final void getResizeableCompartments(IFigure f,
                                            List<IFigure> resizableFigures)
Method to search recursively for resizeable compartments. Examines not only the given figure, but also its children.

Parameters:
f - the initial figure to be examined
resizableFigures - list of resizeable compartments

setTarget

public final void setTarget(EditPart target)
Sets the target of the effect

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