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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DelegatingLayout
public DelegatingLayout()
calculatePreferredSize
protected Dimension calculatePreferredSize(IFigure parent,
int wHint,
int hHint)
- 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.
- Specified by:
calculatePreferredSize
in class AbstractLayout
- Parameters:
parent
- the figure whose preferred size is being calculatedwHint
- the width hinthHint
- the height hint
- Returns:
- the preferred size
- Since:
- 2.0
layout
public void layout(IFigure parent)
- Lays out the given figure's children based on their
Locator
constraint.
- Parameters:
parent
- the figure whose children should be layed out
setConstraint
public void setConstraint(IFigure figure,
Object constraint)
- Sets the constraint for the given figure.
- Specified by:
setConstraint
in interface LayoutManager
- Overrides:
setConstraint
in class AbstractLayout
- Parameters:
figure
- the figure whose contraint is being setconstraint
- the new constraint
Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.