public class

DataTable

extends Composite
implements HasAction
java.lang.Object
   ↳ com.google.gwt.user.client.ui.UIObject
     ↳ com.google.gwt.user.client.ui.Widget
       ↳ com.google.gwt.user.client.ui.Composite
         ↳ com.atlassian.gwt.client.DataTable<T>

Summary

[Expand]
Inherited Constants
From class com.google.gwt.user.client.ui.UIObject
Public Constructors
DataTable(String id, DataSource<T> dataSource)
Public Methods
void addColumnConfig(ColumnConfig<T> config)
Adds a column configuration for the data table.
void addHeader()
Adds the header row for the data table based on the column configurations added to the table.
void addRow(T obj, boolean selectRow)
Adds a row to end of the table with the given object.
void clearRows()
Clears the table data rows.
void fetchAndDisplay()
Fetches the data using the configured datasource and displays the data in the table body based on the column configurations.
List<T> getData()
String getId()
void setAction(Action action)
void setDataSource(DataSource<T> dataSource)
void setDataSourceCallback(DataSourceCallback<T> delegateCallback)
Sets the data source callback function that will be excuted when fetchData(DataSourceCallback) is called.
void setHoverClassName(String hoverClassName)
Sets the class name which will be set on row hover.
void setSelectFirstRow(boolean selectFirstRow)
If set to true, the first row will be selected automatically once the data has been loaded in the table.
void setSelectedClassName(String selectedClassName)
Sets the class name which will be set on row select.
void setSelectionHandler(DataTableSelectionHandler handler)
Sets the seleciton handler which will be invoked on row select.
void setShowSpinner(boolean showSpinner)
[Expand]
Inherited Methods
From class com.google.gwt.user.client.ui.Composite
From class com.google.gwt.user.client.ui.Widget
From class com.google.gwt.user.client.ui.UIObject
From class java.lang.Object
From interface com.atlassian.gwt.HasAction
From interface com.google.gwt.event.shared.HasHandlers
From interface com.google.gwt.user.client.EventListener

Public Constructors

public DataTable (String id, DataSource<T> dataSource)

Public Methods

public void addColumnConfig (ColumnConfig<T> config)

Adds a column configuration for the data table.

See Also

public void addHeader ()

Adds the header row for the data table based on the column configurations added to the table.

public void addRow (T obj, boolean selectRow)

Adds a row to end of the table with the given object. Objects added are also added to the data list (returned by getData(), so care must be taken to ensure added objects are of the same type. If selectRow is true, then the added row will be selected automatically.

public void clearRows ()

Clears the table data rows.

public void fetchAndDisplay ()

Fetches the data using the configured datasource and displays the data in the table body based on the column configurations.

See Also
  • #setColumnConfigs(List)

public List<T> getData ()

public String getId ()

public void setAction (Action action)

public void setDataSource (DataSource<T> dataSource)

public void setDataSourceCallback (DataSourceCallback<T> delegateCallback)

Sets the data source callback function that will be excuted when fetchData(DataSourceCallback) is called.

public void setHoverClassName (String hoverClassName)

Sets the class name which will be set on row hover.

public void setSelectFirstRow (boolean selectFirstRow)

If set to true, the first row will be selected automatically once the data has been loaded in the table.

public void setSelectedClassName (String selectedClassName)

Sets the class name which will be set on row select.

public void setSelectionHandler (DataTableSelectionHandler handler)

Sets the seleciton handler which will be invoked on row select.

public void setShowSpinner (boolean showSpinner)