|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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>
public class DataTable<T>
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Field Summary |
---|
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
DataTable(java.lang.String id,
DataSource<T> dataSource)
|
Method Summary | |
---|---|
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. |
java.util.List<T> |
getData()
|
java.lang.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 DataSource.fetchData(DataSourceCallback) is called. |
void |
setHoverClassName(java.lang.String hoverClassName)
Sets the class name which will be set on row hover. |
void |
setSelectedClassName(java.lang.String selectedClassName)
Sets the class name which will be set on row select. |
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 |
setSelectionHandler(DataTableSelectionHandler handler)
Sets the seleciton handler which will be invoked on row select. |
void |
setShowSpinner(boolean showSpinner)
|
Methods inherited from class com.google.gwt.user.client.ui.Composite |
---|
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, setWidget |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addDomHandler, addHandler, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DataTable(java.lang.String id, DataSource<T> dataSource)
Method Detail |
---|
public void setShowSpinner(boolean showSpinner)
public void setDataSource(DataSource<T> dataSource)
public void setDataSourceCallback(DataSourceCallback<T> delegateCallback)
DataSource.fetchData(DataSourceCallback)
is called.
public void setSelectFirstRow(boolean selectFirstRow)
public void setHoverClassName(java.lang.String hoverClassName)
public void setSelectedClassName(java.lang.String selectedClassName)
public void setSelectionHandler(DataTableSelectionHandler handler)
public java.lang.String getId()
public java.util.List<T> getData()
public void addColumnConfig(ColumnConfig<T> config)
ColumnConfig
public void clearRows()
public void fetchAndDisplay()
#setColumnConfigs(List)
public void addRow(T obj, boolean selectRow)
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 addHeader()
addColumnConfig(ColumnConfig)
public void setAction(Action action)
setAction
in interface HasAction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |