public class GridLayout
extends org.eclipse.draw2d.AbstractHintLayout
GridData
feature, as well. All child
IFigures are expected to have a GridData
as a constraint.Constructor and Description |
---|
GridLayout()
The default constructor.
|
GridLayout(int rows,
int columns)
A non-default constructor.
|
Modifier and Type | Method and Description |
---|---|
GridData |
getConstraint(org.eclipse.draw2d.IFigure child) |
int |
getHorizontalSpacing()
Gets how many pixels are put between child IFigures horizontally.
|
int |
getVerticalSpacing()
Gets how many pixels are put between child IFigures vertically.
|
void |
layout(org.eclipse.draw2d.IFigure container)
Applies a rectangle-based layout to the container.
|
void |
setConstraint(org.eclipse.draw2d.IFigure figure,
java.lang.Object newConstraint)
Sets the layout constraint of the given figure.
|
void |
setHorizontalSpacing(int horizontalSpacing)
Sets how many pixels are put between child IFigures horizontally.
|
void |
setVerticalSpacing(int verticalSpacing)
Sets how many pixels are put between child IFigures vertically.
|
getMinimumSize, getPreferredSize, invalidate
public GridLayout()
public GridLayout(int rows, int columns)
rows
- The number of rows in the layout.columns
- The number of columns in the layout.public int getHorizontalSpacing()
public int getVerticalSpacing()
public void setHorizontalSpacing(int horizontalSpacing)
horizontalSpacing
- The horizontal spacing for this layout. This can be positive
or negative.public void setVerticalSpacing(int verticalSpacing)
verticalSpacing
- The vertically spacing for this layout. This can be positive
or negative.public GridData getConstraint(org.eclipse.draw2d.IFigure child)
getConstraint
in interface org.eclipse.draw2d.LayoutManager
getConstraint
in class org.eclipse.draw2d.AbstractLayout
public void setConstraint(org.eclipse.draw2d.IFigure figure, java.lang.Object newConstraint)
GridData
.setConstraint
in interface org.eclipse.draw2d.LayoutManager
setConstraint
in class org.eclipse.draw2d.AbstractLayout
LayoutManager.setConstraint(IFigure, Object)
public void layout(org.eclipse.draw2d.IFigure container)