Package com.diffplug.common.swt.jface
Class ColumnViewerFormat<T>
- java.lang.Object
-
- com.diffplug.common.swt.jface.ColumnViewerFormat<T>
-
public class ColumnViewerFormat<T> extends java.lang.ObjectFluent API for creatingTableViewers andTreeViewers with a certain format.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classColumnViewerFormat.ColumnBuilder<T>Builder for a single TableColumn.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnViewerFormat.ColumnBuilder<T>addColumn()Adds a column to the table.ColumnFormatasColumnFormat()Returns as a regular non-viewer format.static <T> ColumnViewerFormat<T>builder()Creates a `TableFormat` with the given style bits.TableViewerbuildTable(Composite parent)Builds aTableVieweron the given parent.TreeViewerbuildTree(Composite parent)Builds aTreeVieweron the given parent.java.util.List<ColumnViewerFormat.ColumnBuilder<T>>getColumns()Returns the columns array.ColumnViewerFormat<T>setHeaderVisible(boolean headerVisible)Sets the lines to be visible, defaults to true.ColumnViewerFormat<T>setLinesVisible(boolean linesVisible)Sets the lines to be visible, defaults to true.ColumnViewerFormat<T>setStyle(int style)Sets the SWT style flags.ColumnViewerFormat<T>setUseHashLookup(boolean useHashLookup)Sets the whether the viewer is accelerated by a hashtable, defaults to true.
-
-
-
Method Detail
-
builder
public static <T> ColumnViewerFormat<T> builder()
Creates a `TableFormat` with the given style bits.
-
setStyle
public ColumnViewerFormat<T> setStyle(int style)
Sets the SWT style flags.
-
setLinesVisible
public ColumnViewerFormat<T> setLinesVisible(boolean linesVisible)
Sets the lines to be visible, defaults to true.
-
setHeaderVisible
public ColumnViewerFormat<T> setHeaderVisible(boolean headerVisible)
Sets the lines to be visible, defaults to true.
-
setUseHashLookup
public ColumnViewerFormat<T> setUseHashLookup(boolean useHashLookup)
Sets the whether the viewer is accelerated by a hashtable, defaults to true.
-
addColumn
public ColumnViewerFormat.ColumnBuilder<T> addColumn()
Adds a column to the table.
-
buildTable
public TableViewer buildTable(Composite parent)
Builds aTableVieweron the given parent.
-
buildTree
public TreeViewer buildTree(Composite parent)
Builds aTreeVieweron the given parent.
-
getColumns
public java.util.List<ColumnViewerFormat.ColumnBuilder<T>> getColumns()
Returns the columns array.
-
asColumnFormat
public ColumnFormat asColumnFormat()
Returns as a regular non-viewer format.
-
-