public class ResizableGridRowLayout extends GridRowLayout
Use a ResizableGridRowLayout when you have used a ResizableGridHeaderLayout on the Header object. ResizableGridRowLayout gets all of its layout settings from the ResizableGridHeaderLayout object, so there is no need to set any additional layout information on the ResizableGridRowLayout itself.
CELL_BORDER_WIDTH
Constructor and Description |
---|
ResizableGridRowLayout()
Constructor ResizableGridRowLayout.
|
Modifier and Type | Method and Description |
---|---|
protected org.eclipse.swt.graphics.Point |
computeSize(org.eclipse.swt.widgets.Composite composite,
int wHint,
int hHint,
boolean flushCache) |
protected org.eclipse.swt.widgets.Widget |
getColumnAt(org.eclipse.swt.widgets.Composite rowOrHeader,
int offset)
Return the SWT Widget representing the specified column.
|
int |
getSumOfAllWeights()
Returns the sum of all the weights in the weights property
|
int[] |
getWeights()
Method getWeights.
|
boolean |
isFittingHorizontally()
Method isFittingHorizontally.
|
protected void |
layout(org.eclipse.swt.widgets.Composite composite,
boolean flushCache) |
AbstractGridRowLayout |
setFittingHorizontally(boolean fittingHorizontally)
Method setFittingHorizontally.
|
AbstractGridRowLayout |
setWeights(int[] weights)
Method setWeights.
|
computeColumnSize, computeMaxHeight, getNumColumns, setBounds
getAvailableWidth, isWidthWiderThanAllColumns
public ResizableGridRowLayout()
protected org.eclipse.swt.graphics.Point computeSize(org.eclipse.swt.widgets.Composite composite, int wHint, int hHint, boolean flushCache)
computeSize
in class AbstractGridRowLayout
protected void layout(org.eclipse.swt.widgets.Composite composite, boolean flushCache)
layout
in class AbstractGridRowLayout
public int[] getWeights()
AbstractGridRowLayout
If !isFittingHorizontally, returns an array where each element is the minimum width in pixels of the corresponding column.
getWeights
in class AbstractGridRowLayout
public AbstractGridRowLayout setWeights(int[] weights)
AbstractGridRowLayout
If !isFittingHorizontally, specifies an array where each element is the minimum width in pixels of the corresponding column.
This property is ignored if the programmer has set a layout manager on the header and/or the row prototype objects.
The number of elements in the array must match the number of columns and if isFittingHorizontally, the sum of all elements must equal 100. If either of these constraints is not true, this property will be ignored and all columns will be created equal in width.
setWeights
in class AbstractGridRowLayout
weights
- the weights to use if the CompositeTable is automatically
laying out controls.public int getSumOfAllWeights()
AbstractGridRowLayout
getSumOfAllWeights
in class AbstractGridRowLayout
public boolean isFittingHorizontally()
AbstractGridRowLayout
isFittingHorizontally
in class AbstractGridRowLayout
public AbstractGridRowLayout setFittingHorizontally(boolean fittingHorizontally)
AbstractGridRowLayout
setFittingHorizontally
in class AbstractGridRowLayout
fittingHorizontally
- true if the table's actual width is set to equal the visible
width; false otherwise.protected org.eclipse.swt.widgets.Widget getColumnAt(org.eclipse.swt.widgets.Composite rowOrHeader, int offset)
AbstractGridRowLayout
getColumnAt
in class GridRowLayout
rowOrHeader
- The header or row objectoffset
- The column's offset.