public class ColumnFormat extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ColumnFormat.ColumnBuilder
Builder for a single TableColumn.
|
static class |
ColumnFormat.ColumnPixelDataBuilder
A fluent API for manipulating a
ColumnPixelData . |
static class |
ColumnFormat.ColumnWeightDataBuilder
A fluent API for manipulating a
ColumnWeightData . |
Modifier and Type | Field and Description |
---|---|
protected List<ColumnFormat.ColumnBuilder> |
columnBuilders |
protected boolean |
headerVisible |
protected boolean |
linesVisible |
protected int |
style |
Modifier | Constructor and Description |
---|---|
protected |
ColumnFormat() |
Modifier and Type | Method and Description |
---|---|
ColumnFormat.ColumnBuilder |
addColumn()
Adds a column to the table.
|
static ColumnFormat |
builder()
Creates a
TableFormat with the given style bits. |
Table |
buildTable(Composite parent)
Builds a
Table with the specified columns and layout. |
protected static Table |
buildTable(Composite parent,
int style,
boolean linesVisible,
boolean headerVisible,
List<? extends ColumnFormat.ColumnBuilder> columnBuilders)
Builds a table with the given columns.
|
Tree |
buildTree(Composite parent)
Builds a
Tree with the specified columns and layout. |
protected static Tree |
buildTree(Composite parent,
int style,
boolean linesVisible,
boolean headerVisible,
List<? extends ColumnFormat.ColumnBuilder> columnBuilders)
Builds a table with the given columns.
|
List<ColumnFormat.ColumnBuilder> |
getColumns()
Returns the columns array.
|
int |
getStyle()
Returns the style of this format.
|
ColumnFormat |
setHeaderVisible(boolean headerVisible)
Sets the header to be visible, defaults to true.
|
ColumnFormat |
setLinesVisible(boolean linesVisible)
Sets the lines to be visible, defaults to true.
|
ColumnFormat |
setStyle(int style)
Sets the SWT style flags.
|
protected int style
protected boolean linesVisible
protected boolean headerVisible
protected final List<ColumnFormat.ColumnBuilder> columnBuilders
public static ColumnFormat builder()
Creates a TableFormat
with the given style bits.
public int getStyle()
Returns the style of this format. Allows utilities that require a certain flag (e.g. SWT.VIRTUAL) to do error-checking.
public ColumnFormat setStyle(int style)
Sets the SWT style flags.
public ColumnFormat setLinesVisible(boolean linesVisible)
Sets the lines to be visible, defaults to true.
public ColumnFormat setHeaderVisible(boolean headerVisible)
Sets the header to be visible, defaults to true.
public ColumnFormat.ColumnBuilder addColumn()
Adds a column to the table.
public List<ColumnFormat.ColumnBuilder> getColumns()
Returns the columns array.
public Table buildTable(Composite parent)
Builds a Table
with the specified columns and layout.
public Tree buildTree(Composite parent)
Builds a Tree
with the specified columns and layout.
protected static Table buildTable(Composite parent, int style, boolean linesVisible, boolean headerVisible, List<? extends ColumnFormat.ColumnBuilder> columnBuilders)
Builds a table with the given columns.
protected static Tree buildTree(Composite parent, int style, boolean linesVisible, boolean headerVisible, List<? extends ColumnFormat.ColumnBuilder> columnBuilders)
Builds a table with the given columns.