Draw2D v2.0

org.eclipse.draw2d
Class DelegatingLayout

java.lang.Object
  |
  +--org.eclipse.draw2d.AbstractLayout
        |
        +--org.eclipse.draw2d.DelegatingLayout
All Implemented Interfaces:
LayoutManager

public class DelegatingLayout
extends AbstractLayout

Figures using a DelegatingLayout as their layout manager give location responsibilities to their children. The children of a Figure using a DelegatingLayout should have a Locator as a constraint whose relocate method is responsible for placing the child.


Constructor Summary
DelegatingLayout()
           
 
Method Summary
protected  Dimension calculatePreferredSize(IFigure parent)
          Calculates the preferred size of the given Figure.
 void layout(IFigure parent)
          Lays out the given figure.
 void setConstraint(IFigure figure, Object constraint)
          Sets the constraint for the given figure.
 
Methods inherited from class org.eclipse.draw2d.AbstractLayout
calculatePreferredSize, getBorderPreferredSize, getConstraint, getMinimumSize, getPreferredSize, getPreferredSize, invalidate, invalidate, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingLayout

public DelegatingLayout()
Method Detail

calculatePreferredSize

protected Dimension calculatePreferredSize(IFigure parent)
Calculates the preferred size of the given Figure. For the DelegatingLayout, this is the largest width and height values of the passed Figure's children.
Overrides:
calculatePreferredSize in class AbstractLayout
Since:
2.0

layout

public void layout(IFigure parent)
Description copied from interface: LayoutManager
Lays out the given figure.

setConstraint

public void setConstraint(IFigure figure,
                          Object constraint)
Description copied from class: AbstractLayout
Sets the constraint for the given figure.
Overrides:
setConstraint in class AbstractLayout

Draw2D v2.0