Package org.eclipse.jface.layout
Class TableColumnLayout
- java.lang.Object
-
- org.eclipse.swt.widgets.Layout
-
- org.eclipse.jface.layout.AbstractColumnLayout
-
- org.eclipse.jface.layout.TableColumnLayout
-
public class TableColumnLayout extends AbstractColumnLayout
The TableColumnLayout is theLayout
used to maintainTableColumn
sizes in aTable
.You can only add the
Layout
to a container whose only child is theTable
control you want theLayout
applied to. Don't assign the layout directly theTable
- Since:
- 3.3
-
-
Field Summary
-
Fields inherited from class org.eclipse.jface.layout.AbstractColumnLayout
LAYOUT_DATA
-
-
Constructor Summary
Constructors Constructor Description TableColumnLayout()
Creates a new table column layout.TableColumnLayout(boolean adjustForScrollBar)
Creates a new table column layout.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
getColumnCount(Scrollable tableTree)
Get the number of columns for the receiver.protected ColumnLayoutData
getLayoutData(Scrollable tableTree, int columnIndex)
Get the layout data for a columnprotected void
setColumnWidths(Scrollable tableTree, int[] widths)
Set the widths of the columns.protected void
updateColumnData(Widget column)
Update the layout data for a column-
Methods inherited from class org.eclipse.jface.layout.AbstractColumnLayout
computeSize, getColumnTrim, layout, setColumnData
-
Methods inherited from class org.eclipse.swt.widgets.Layout
flushCache
-
-
-
-
Constructor Detail
-
TableColumnLayout
public TableColumnLayout()
Creates a new table column layout.
-
TableColumnLayout
public TableColumnLayout(boolean adjustForScrollBar)
Creates a new table column layout.- Parameters:
adjustForScrollBar
-true
if the layout should reserve space for the vertical scroll bar- Since:
- 3.12
-
-
Method Detail
-
getColumnCount
protected int getColumnCount(Scrollable tableTree)
Get the number of columns for the receiver.- Specified by:
getColumnCount
in classAbstractColumnLayout
- Parameters:
tableTree
- the control- Returns:
- the number of columns
- Since:
- 3.5
-
setColumnWidths
protected void setColumnWidths(Scrollable tableTree, int[] widths)
Set the widths of the columns.- Specified by:
setColumnWidths
in classAbstractColumnLayout
- Parameters:
tableTree
- the controlwidths
- the widths of the column- Since:
- 3.5
-
getLayoutData
protected ColumnLayoutData getLayoutData(Scrollable tableTree, int columnIndex)
Get the layout data for a column- Specified by:
getLayoutData
in classAbstractColumnLayout
- Parameters:
tableTree
- the controlcolumnIndex
- the column index- Returns:
- the layout data, might not null
- Since:
- 3.5
-
updateColumnData
protected void updateColumnData(Widget column)
Description copied from class:AbstractColumnLayout
Update the layout data for a column- Specified by:
updateColumnData
in classAbstractColumnLayout
- Parameters:
column
- the column- Since:
- 3.5
-
-