Package com.diffplug.common.swt
Class ColumnFormat
java.lang.Object
com.diffplug.common.swt.ColumnFormat
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder for a single TableColumn.static class
A fluent API for manipulating aColumnPixelData
.static class
A fluent API for manipulating aColumnWeightData
. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<ColumnFormat.ColumnBuilder>
protected boolean
protected boolean
protected int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a column to the table.static ColumnFormat
builder()
Creates a `TableFormat` with the given style bits.buildTable
(Composite parent) Builds aTable
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.Builds aTree
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.Returns the columns array.int
getStyle()
Returns the style of this format.setHeaderVisible
(boolean headerVisible) Sets the header to be visible, defaults to true.setLinesVisible
(boolean linesVisible) Sets the lines to be visible, defaults to true.setStyle
(int style) Sets the SWT style flags.
-
Field Details
-
style
protected int style -
linesVisible
protected boolean linesVisible -
headerVisible
protected boolean headerVisible -
columnBuilders
-
-
Constructor Details
-
ColumnFormat
protected ColumnFormat()
-
-
Method Details
-
builder
Creates a `TableFormat` with the given style bits. -
getStyle
public int getStyle()Returns the style of this format. Allows utilities that require a certain flag (e.g. SWT.VIRTUAL) to do error-checking. -
setStyle
Sets the SWT style flags. -
setLinesVisible
Sets the lines to be visible, defaults to true. -
setHeaderVisible
Sets the header to be visible, defaults to true. -
addColumn
Adds a column to the table. -
getColumns
Returns the columns array. -
buildTable
Builds aTable
with the specified columns and layout. -
buildTree
Builds aTree
with the specified columns and layout. -
buildTable
protected static Table buildTable(Composite parent, int style, boolean linesVisible, boolean headerVisible, List<? extends ColumnFormat.ColumnBuilder> columnBuilders) Builds a table with the given columns. -
buildTree
protected static Tree buildTree(Composite parent, int style, boolean linesVisible, boolean headerVisible, List<? extends ColumnFormat.ColumnBuilder> columnBuilders) Builds a table with the given columns.
-