Package org.eclipse.draw2d
Class DelegatingLayout
java.lang.Object
org.eclipse.draw2d.AbstractLayout
org.eclipse.draw2d.DelegatingLayout
- All Implemented Interfaces:
LayoutManager
-
Field Summary
Fields inherited from class org.eclipse.draw2d.AbstractLayout
isObservingVisibility, preferredSize
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Dimension
calculatePreferredSize
(IFigure parent, int wHint, int hHint) Calculates the preferred size of the given Figure.getConstraint
(IFigure child) Returns the constraint for the given figure.void
Lays out the given figure's children based on theirLocator
constraint.void
Removes the locator for 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, getMinimumSize, getMinimumSize, getPreferredSize, getPreferredSize, invalidate, invalidate, isObservingVisibility, setObserveVisibility
-
Constructor Details
-
DelegatingLayout
public DelegatingLayout()
-
-
Method Details
-
calculatePreferredSize
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 classAbstractLayout
- Parameters:
parent
- the figure whose preferred size is being calculatedwHint
- the width hinthHint
- the height hint- Returns:
- the preferred size
- Since:
- 2.0
-
getConstraint
Description copied from class:AbstractLayout
Returns the constraint for the given figure.- Specified by:
getConstraint
in interfaceLayoutManager
- Overrides:
getConstraint
in classAbstractLayout
- Parameters:
child
- The figure- Returns:
- The constraint
- See Also:
-
layout
Lays out the given figure's children based on theirLocator
constraint.- Parameters:
parent
- the figure whose children should be layed out
-
remove
Removes the locator for the given figure.- Specified by:
remove
in interfaceLayoutManager
- Overrides:
remove
in classAbstractLayout
- Parameters:
child
- the child being removed
-
setConstraint
Sets the constraint for the given figure.- Specified by:
setConstraint
in interfaceLayoutManager
- Overrides:
setConstraint
in classAbstractLayout
- Parameters:
figure
- the figure whose contraint is being setconstraint
- the new constraint
-