|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.draw2d.AbstractLayout | +--org.eclipse.draw2d.XYLayout
This class implements the LayoutManager
interface using the XY Layout algorithm. This lays out the components
using the layout constraints as defined by each component.
Field Summary | |
protected Map |
constraints
|
Fields inherited from class org.eclipse.draw2d.AbstractLayout |
preferredSize |
Constructor Summary | |
XYLayout()
|
Method Summary | |
protected Dimension |
calculatePreferredSize(IFigure f,
int wHint,
int hHint)
Calculates and returns the preferred size of the input figure. |
Object |
getConstraint(IFigure figure)
Returns the constraint for the given figure. |
Point |
getOrigin(IFigure parent)
|
void |
layout(IFigure parent)
Lays out the given figure. |
void |
remove(IFigure figure)
Removes the given figure from this LayoutManager's list of figures. |
void |
setConstraint(IFigure figure,
Object newConstraint)
Sets the layout constraint of the given figure. |
Methods inherited from class org.eclipse.draw2d.AbstractLayout |
calculatePreferredSize, getBorderPreferredSize, getMinimumSize, getMinimumSize, getPreferredSize, getPreferredSize, invalidate, invalidate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Map constraints
Constructor Detail |
public XYLayout()
Method Detail |
public void setConstraint(IFigure figure, Object newConstraint)
setConstraint
in interface LayoutManager
setConstraint
in class AbstractLayout
figure
- Figure for which the constarint is being set.newConstraint
- Constraint for the input figure.getConstraint(IFigure)
protected Dimension calculatePreferredSize(IFigure f, int wHint, int hHint)
calculatePreferredSize
in class AbstractLayout
f
- Figure for which the preferred size is required.wHint
- The width hinthHint
- The height hint
public Object getConstraint(IFigure figure)
AbstractLayout
getConstraint
in interface LayoutManager
getConstraint
in class AbstractLayout
figure
- The figure
public Point getOrigin(IFigure parent)
public void layout(IFigure parent)
LayoutManager
parent
- The figurepublic void remove(IFigure figure)
AbstractLayout
remove
in interface LayoutManager
remove
in class AbstractLayout
figure
- The figure to remove
|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |