Package com.diffplug.common.swt
Class ColumnFormat
java.lang.Object
com.diffplug.common.swt.ColumnFormat
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for a single TableColumn.static classA fluent API for manipulating aColumnPixelData.static classA fluent API for manipulating aColumnWeightData. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<ColumnFormat.ColumnBuilder>protected booleanprotected booleanprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a column to the table.static ColumnFormatbuilder()Creates a `TableFormat` with the given style bits.buildTable(Composite parent) Builds aTablewith the specified columns and layout.protected static TablebuildTable(Composite parent, int style, boolean linesVisible, boolean headerVisible, List<? extends ColumnFormat.ColumnBuilder> columnBuilders) Builds a table with the given columns.Builds aTreewith the specified columns and layout.protected static TreebuildTree(Composite parent, int style, boolean linesVisible, boolean headerVisible, List<? extends ColumnFormat.ColumnBuilder> columnBuilders) Builds a table with the given columns.Returns the columns array.intgetStyle()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 aTablewith the specified columns and layout. -
buildTree
Builds aTreewith 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.
-