Elexis API documentation
Version 2.1.6 as of December 11 2011

de.ralfebert.rcputils.tables
Class TableViewerBuilder

java.lang.Object
  extended by de.ralfebert.rcputils.tables.TableViewerBuilder

public class TableViewerBuilder
extends java.lang.Object

A convenient builder class for creating TableViewers with support for nested properties, sorting and editing.

Author:
Ralf Ebert
See Also:
http://www.ralfebert.de/blog/eclipsercp/tableviewerbuilder/

Constructor Summary
TableViewerBuilder(Composite parent)
          Creates a new TableViewerBuilder with default SWT styles.
TableViewerBuilder(Composite parent, int style)
          Creates a new TableViewerBuilder.
 
Method Summary
 ColumnBuilder createColumn(java.lang.String columnHeaderText)
          Creates a new ColumnBuilder that can be used to configure the table column.
 Table getTable()
          Returns the SWT Table.
 TableViewer getTableViewer()
          Returns the JFace TableViewer.
 void setInput(java.util.Collection<?> input)
          Sets the given collection as input object and an ArrayContentProvider as content provider for the TableViewer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableViewerBuilder

public TableViewerBuilder(Composite parent,
                          int style)
Creates a new TableViewerBuilder. This instantly creates a Table widget and a TableViewer. The given parent Composite needs to be empty, because `TableColumnLayout` is used internally.


TableViewerBuilder

public TableViewerBuilder(Composite parent)
Creates a new TableViewerBuilder with default SWT styles.

Method Detail

createColumn

public ColumnBuilder createColumn(java.lang.String columnHeaderText)
Creates a new ColumnBuilder that can be used to configure the table column. When you have finished configuring the column, call build() on the ColumnBuilder to create the actual column.


setInput

public void setInput(java.util.Collection<?> input)
Sets the given collection as input object and an ArrayContentProvider as content provider for the TableViewer.


getTableViewer

public TableViewer getTableViewer()
Returns the JFace TableViewer.


getTable

public Table getTable()
Returns the SWT Table.


Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis