public class TreeColumnLayout extends AbstractColumnLayout
Layout
used to maintain TreeColumn
sizes in a
Tree
.
You can only add the Layout
to a container whose only
child is the Tree
control you want the Layout
applied to.
Don't assign the layout directly the Tree
LAYOUT_DATA
Constructor and Description |
---|
TreeColumnLayout() |
Modifier and Type | Method and Description |
---|---|
protected int |
getColumnCount(Scrollable tree)
Get the number of columns for the receiver.
|
protected ColumnLayoutData |
getLayoutData(Scrollable tableTree,
int columnIndex)
Get the layout data for a column
|
protected void |
layout(Composite composite,
boolean flushCache)
Lays out the children of the specified composite
according to this layout.
|
protected void |
setColumnWidths(Scrollable tree,
int[] widths)
Set the widths of the columns.
|
protected void |
updateColumnData(Widget column)
Update the layout data for a column
|
computeSize, getColumnTrim, setColumnData
flushCache
protected void layout(Composite composite, boolean flushCache)
Layout
This method positions and sizes the children of a composite using the layout algorithm encoded by this layout. Children of the composite are positioned in the client area of the composite. The position of the composite is not altered by this method.
When the flush cache hint is true, the layout is instructed to flush any cached values associated with the children. Typically, a layout will cache the preferred sizes of the children to avoid the expense of computing these values each time the widget is laid out.
When layout is triggered explicitly by the programmer the flush cache hint is true. When layout is triggered by a resize, either caused by the programmer or by the user, the hint is false.
layout
in class AbstractColumnLayout
composite
- a composite widget using this layoutflushCache
- true
means flush cached layout valuesprotected int getColumnCount(Scrollable tree)
getColumnCount
in class AbstractColumnLayout
tree
- the controlprotected void setColumnWidths(Scrollable tree, int[] widths)
setColumnWidths
in class AbstractColumnLayout
tree
- the controlwidths
- the widths of the columnprotected ColumnLayoutData getLayoutData(Scrollable tableTree, int columnIndex)
getLayoutData
in class AbstractColumnLayout
tableTree
- the controlcolumnIndex
- the column indexprotected void updateColumnData(Widget column)
updateColumnData
in class AbstractColumnLayout
column
- the column
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.