org.eclipse.cdt.internal.ui.util
Class RowLayouter
java.lang.Object
org.eclipse.cdt.internal.ui.util.RowLayouter
public class RowLayouter
- extends java.lang.Object
Helper class to layout a number of children if the composite uses a GridLayout
.
If the numbers of widgets to be layouted into one row is smaller than the number of columns
defined for the grid layout the helper class assigns a corresponing value to the
GridData.horizontalSpan
field.
Additionally a row layouter manages a default GridData
object for each column.
If set this grid data is used for the widget if it doesn't manage its own grid data object.
Call one of the perform
methods to assign the correct grid data objects to
a set of widgets according to the number of columns passed to the layouter's constructor.
Method Summary |
org.eclipse.swt.layout.GridData |
getGridData(int index)
|
int |
numColumns()
|
void |
perform(org.eclipse.swt.widgets.Control c1)
|
void |
perform(org.eclipse.swt.widgets.Control[] controls,
int spanColumn)
|
void |
perform(org.eclipse.swt.widgets.Control c1,
org.eclipse.swt.widgets.Control c2,
org.eclipse.swt.widgets.Control c3,
int span)
|
void |
perform(org.eclipse.swt.widgets.Control c1,
org.eclipse.swt.widgets.Control c2,
int span)
|
void |
setDefaultGridData(org.eclipse.swt.layout.GridData gd,
int index)
|
void |
setDefaultSpan()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
spanHorizontalAlignment
public int spanHorizontalAlignment
spanGrabExcessHorizontalSpace
public int spanGrabExcessHorizontalSpace
spanHorizontalSpan
public int spanHorizontalSpan
spanHorizontalIndent
public int spanHorizontalIndent
spanWidthHint
public int spanWidthHint
spanVerticalAlignment
public int spanVerticalAlignment
spanGrabExcessVerticalSpace
public int spanGrabExcessVerticalSpace
spanVerticalSpan
public int spanVerticalSpan
spanHeightHint
public int spanHeightHint
RowLayouter
public RowLayouter(int numColumns)
RowLayouter
public RowLayouter(int numColumns,
boolean order)
setDefaultSpan
public void setDefaultSpan()
perform
public void perform(org.eclipse.swt.widgets.Control c1)
perform
public void perform(org.eclipse.swt.widgets.Control c1,
org.eclipse.swt.widgets.Control c2,
int span)
perform
public void perform(org.eclipse.swt.widgets.Control c1,
org.eclipse.swt.widgets.Control c2,
org.eclipse.swt.widgets.Control c3,
int span)
perform
public void perform(org.eclipse.swt.widgets.Control[] controls,
int spanColumn)
setDefaultGridData
public void setDefaultGridData(org.eclipse.swt.layout.GridData gd,
int index)
getGridData
public org.eclipse.swt.layout.GridData getGridData(int index)
numColumns
public int numColumns()