org.topcased.draw2d.layout
Class BorderAttachedLayout
java.lang.Object
org.eclipse.draw2d.AbstractLayout
org.eclipse.draw2d.XYLayout
org.topcased.draw2d.layout.BorderAttachedLayout
- All Implemented Interfaces:
- org.eclipse.draw2d.LayoutManager
public class BorderAttachedLayout
- extends org.eclipse.draw2d.XYLayout
This class implements the LayoutManager
interface
using the BorderAttachedLayout algorithm. This lays out the components using
the layout constraints as defined by each component. Components may be
attached to a border or not.
Creation : 13 oct. 2005
Fields inherited from class org.eclipse.draw2d.XYLayout |
constraints |
Fields inherited from class org.eclipse.draw2d.AbstractLayout |
isObservingVisibility, preferredSize |
Method Summary |
protected org.eclipse.draw2d.geometry.Dimension |
calculatePreferredSize(org.eclipse.draw2d.IFigure f,
int wHint,
int hHint)
Calculates and returns the preferred size of the input figure. |
java.lang.Object |
getConstraint(org.eclipse.draw2d.IFigure figure)
|
void |
layout(org.eclipse.draw2d.IFigure container)
Implements the algorithm to layout the components of the given container
figure. |
Methods inherited from class org.eclipse.draw2d.XYLayout |
getOrigin, remove, setConstraint |
Methods inherited from class org.eclipse.draw2d.AbstractLayout |
calculatePreferredSize, getBorderPreferredSize, getMinimumSize, getMinimumSize, getPreferredSize, getPreferredSize, invalidate, invalidate, isObservingVisibility, setObserveVisibility |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BorderAttachedLayout
public BorderAttachedLayout()
- The Constructor
calculatePreferredSize
protected org.eclipse.draw2d.geometry.Dimension calculatePreferredSize(org.eclipse.draw2d.IFigure f,
int wHint,
int hHint)
- Calculates and returns the preferred size of the input figure. Since in
BorderAttachedLayout the location of the child should be changed, the
preferred size would be the dimension of the clientArea.
- Overrides:
calculatePreferredSize
in class org.eclipse.draw2d.XYLayout
- Since:
- 2.0
- See Also:
XYLayout.calculatePreferredSize(IFigure, int, int)
layout
public void layout(org.eclipse.draw2d.IFigure container)
- Implements the algorithm to layout the components of the given container
figure. Each component is laid out using its own layout constraint
specifying its size and position and eventually its attachment to a
border.
- Specified by:
layout
in interface org.eclipse.draw2d.LayoutManager
- Overrides:
layout
in class org.eclipse.draw2d.XYLayout
- See Also:
LayoutManager.layout(org.eclipse.draw2d.IFigure)
getConstraint
public java.lang.Object getConstraint(org.eclipse.draw2d.IFigure figure)
- Specified by:
getConstraint
in interface org.eclipse.draw2d.LayoutManager
- Overrides:
getConstraint
in class org.eclipse.draw2d.XYLayout
- See Also:
XYLayout.getConstraint(org.eclipse.draw2d.IFigure)
Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.