T
- public abstract class AbstractDataView<T> extends Object implements DataView<T>
Modifier and Type | Field and Description |
---|---|
protected JsTableElement |
$table |
protected com.google.gwt.event.shared.HandlerRegistration |
attachHandler |
protected Column<T,?> |
autoSortColumn |
protected Components<CategoryComponent> |
categories |
protected ComponentFactory<? extends CategoryComponent,String> |
categoryFactory |
protected int |
categoryHeight |
protected List<Column<T,?>> |
columns |
protected gwt.material.design.jquery.client.api.JQueryElement |
container |
protected DataSource<T> |
dataSource |
protected DataDisplay<T> |
display |
protected TableRow |
headerRow |
protected List<TableHeader> |
headers |
protected String |
height |
protected String |
id |
protected com.google.gwt.view.client.ProvidesKey<T> |
keyProvider |
protected int |
longPressDuration |
protected gwt.material.design.jquery.client.api.JQueryElement |
maskElement |
static String |
maskHtml |
static String |
ORPHAN_PATTERN |
protected Components<RowComponent<T>> |
pendingRows |
protected gwt.material.design.client.ui.MaterialProgress |
progressWidget |
protected com.google.gwt.view.client.Range |
range |
protected boolean |
redraw |
protected boolean |
redrawCategories |
protected Renderer<T> |
renderer |
protected boolean |
rendering |
protected RowComponentFactory<T> |
rowFactory |
protected Components<RowComponent<T>> |
rows |
protected SortContext<T> |
sortContext |
protected JsTableSubHeaders |
subheaderLib |
protected Table |
table |
protected gwt.material.design.jquery.client.api.JQueryElement |
tableBody |
protected gwt.material.design.client.base.MaterialWidget |
tbody |
protected gwt.material.design.client.base.MaterialWidget |
thead |
protected gwt.material.design.jquery.client.api.JQueryElement |
topPanel |
protected int |
totalRows |
static String |
transitionEvents |
Constructor and Description |
---|
AbstractDataView() |
AbstractDataView(com.google.gwt.view.client.ProvidesKey<T> keyProvider) |
AbstractDataView(String id) |
AbstractDataView(String id,
com.google.gwt.view.client.ProvidesKey<T> keyProvider) |
Modifier and Type | Method and Description |
---|---|
void |
addCategory(CategoryComponent category)
Explicitly add a
CategoryComponent , which will be drawn to the table. |
void |
addCategory(String category)
Explicitly add a category, which will be drawn to the table.
|
void |
addColumn(Column<T,?> column)
Add a new column to the data view.
|
void |
addColumn(Column<T,?> column,
String header)
Add a new column to the data view.
|
protected void |
addHeader(int index,
TableHeader header) |
protected TableSubHeader |
bindCategoryEvents(TableSubHeader category) |
protected CategoryComponent |
buildCategoryComponent(RowComponent<T> row) |
protected CategoryComponent |
buildCategoryComponent(String categoryName) |
protected RowComponent<T> |
buildRowComponent(T data) |
void |
clearCategories()
Clear all categories.
|
protected void |
clearExpansions() |
void |
clearRows(boolean clearData)
Clear data rows.
|
void |
clearRowsAndCategories(boolean clearData)
Clear all rows and categories.
|
void |
closeCategory(CategoryComponent category)
Close an existing Category.
|
void |
closeCategory(String categoryName)
Close an existing Category.
|
void |
deselectRow(com.google.gwt.dom.client.Element row,
boolean fireEvent)
Unselect a selected row.
|
void |
destroy()
Destroy the data view.
|
void |
disableCategory(String categoryName)
Disable a data view category.
|
protected boolean |
doSort(SortContext<T> sortContext,
Components<RowComponent<T>> rows)
Perform a sort on the a set of
RowComponent 's. |
void |
enableCategory(String categoryName)
Enable a data view category.
|
void |
fireEvent(com.google.gwt.event.shared.GwtEvent<?> event) |
protected Column<T,?> |
getAutoSortColumn()
Get the auto sorting column, or null if no column is auto sorting.
|
protected int |
getCalculatedRowHeight() |
List<CategoryComponent> |
getCategories()
Get all registered category components.
|
CategoryComponent |
getCategory(String name)
Get a stored data category by name.
|
ComponentFactory<? extends CategoryComponent,String> |
getCategoryFactory() |
int |
getCategoryHeight() |
protected int |
getCategoryRowCount(String category) |
int |
getColumnCount()
Get the number of columns in the table.
|
int |
getColumnOffset()
Get the offset column index (used when selection mode is on).
|
List<Column<T,?>> |
getColumns()
Get the current defined columns.
|
com.google.gwt.user.client.ui.Widget |
getContainer()
Get the displays main container.
|
protected List<T> |
getData() |
DataSource<T> |
getDataSource()
Get the configured data source.
|
List<TableHeader> |
getHeaders()
Get the list of rendered header widgets.
|
String |
getHeight()
Get the table body height.
|
protected List<CategoryComponent> |
getHiddenCategories() |
String |
getId()
Get the data views id.
|
com.google.gwt.view.client.ProvidesKey<T> |
getKeyProvider() |
int |
getLongPressDuration()
Get the long press duration requirement.
|
protected T |
getModelByRowElement(com.google.gwt.dom.client.Element rowElement) |
protected List<T> |
getModelsByRowElements(List<com.google.gwt.dom.client.Element> rowElements) |
List<CategoryComponent> |
getOpenCategories()
Get all the open
CategoryComponent 's or null if categories are disabled. |
protected CategoryComponent.OrphanCategoryComponent |
getOrphansCategory()
Get the
CategoryComponent.OrphanCategoryComponent for orphan rows. |
protected List<CategoryComponent> |
getPassedCategories() |
gwt.material.design.client.ui.MaterialProgress |
getProgressWidget()
Get the data views progress widget.
|
Renderer<T> |
getRenderer() |
RowComponent<T> |
getRow(int index)
Get a row by its rendered index.
|
RowComponent<T> |
getRow(T model)
Get a row by its representing model.
|
RowComponent<T> |
getRowByModel(T model)
Get a models
RowComponent or null if not found. |
int |
getRowCount()
Get the exact count of all rows.
|
protected com.google.gwt.dom.client.Element |
getRowElementByModel(T model) |
RowComponentFactory<T> |
getRowFactory()
Get the views row factory.
|
int |
getRowHeight()
Get the maximum row height.
|
protected int |
getRowIndexByElement(com.google.gwt.dom.client.Element rowElement) |
List<RowComponent<T>> |
getRows()
Get all data views
RowComponent 's. |
protected List<RowComponent<T>> |
getRowsByCategory(Components<RowComponent<T>> rows,
CategoryComponent category) |
List<T> |
getSelectedRowModels(boolean visibleOnly)
Get all the selected row models.
|
SelectionType |
getSelectionType()
Get the data views row selection type.
|
SortContext<T> |
getSortContext()
Get the data views current sort context, or null if no sort context is applied.
|
JsTableSubHeaders |
getSubheaderLib()
Get the subheader library API.
|
protected TableSubHeader |
getTableSubHeader(gwt.material.design.jquery.client.api.JQueryElement elem)
Get a stored data categories subheader by jquery element.
|
protected TableSubHeader |
getTableSubHeader(String name)
Get a stored data categories subheader by name.
|
int |
getTotalRows()
Get the configured total rows count.
|
Object |
getValueKey(T value)
Get the key for the specified value.
|
protected List<CategoryComponent> |
getVisibleCategories() |
int |
getVisibleItemCount()
Get the visible item count of the data view.
|
com.google.gwt.view.client.Range |
getVisibleRange()
Get the range of visible rows.
|
boolean |
hasCategory(String categoryName)
Has this data view got an existing
CategoryComponent with given name. |
boolean |
hasDeselectedRows(boolean visibleOnly)
Does this view have unselected rows.
|
boolean |
hasSelectedRows(boolean visibleOnly)
Does this view have selected rows.
|
void |
insertColumn(int beforeIndex,
Column<T,?> column,
String header)
Inserts a column into the table at the specified index.
|
boolean |
isCategoryEmpty(CategoryComponent category)
Check if a category has data to provide.
|
boolean |
isHeaderVisible(int colIndex)
Check if a header with the given index is visible.
|
boolean |
isLoadMask()
Is the data views loading mask applied.
|
boolean |
isRedraw()
Is redrawing the data view.
|
boolean |
isRendering()
Is the data view rendering.
|
boolean |
isSetup()
Is the data view setup.
|
boolean |
isShiftDown() |
boolean |
isUseCategories()
Is the data view using categories where possible.
|
boolean |
isUseLoadOverlay()
Is the data view using loading overlay mask.
|
boolean |
isUseRowExpansion()
Is the data view using row expansion.
|
boolean |
isUseStickyHeader()
True if we are using sticky table header.
|
protected boolean |
isWithinView(int start,
int length) |
protected boolean |
isWithinView(int start,
int length,
boolean canOverflow) |
void |
loaded(int startIndex,
List<T> data)
Data views loader has loaded data for use.
|
protected boolean |
maybeApplyAutoSortColumn()
Check and apply the auto sort column
Column.setAutoSort(boolean)
if no sort has been invoked. |
protected void |
onConstructed()
Called after the data view is constructed.
|
protected void |
onSetup(TableScaffolding scaffolding) |
void |
openCategory(CategoryComponent category)
Open an existing Category.
|
void |
openCategory(String categoryName)
Open an existing Category.
|
protected void |
prepareRows()
Prepare all row specific functionality.
|
void |
refresh()
Invoke a view refresh.
|
protected void |
reindexColumns() |
void |
removeColumn(int colIndex)
Remove an existing column by index.
|
void |
removeColumn(int colIndex,
boolean hardRemove) |
void |
removeColumns()
Remove all columns.
|
protected void |
removeHeader(int index) |
void |
render(Components<Component<?>> components)
Render the data view components to DOM.
|
protected void |
renderCategory(CategoryComponent category) |
void |
renderColumn(Column<T,?> column) |
protected void |
renderColumns() |
protected void |
renderComponent(Component<?> component) |
protected boolean |
renderRows(Components<RowComponent<T>> rows)
Compile list of
RowComponent 's and invoke a render. |
void |
selectAllRows(boolean select)
Select or deselect all rows.
|
void |
selectAllRows(boolean select,
boolean fireEvent)
Select or deselect all rows.
|
void |
selectRow(com.google.gwt.dom.client.Element row,
boolean fireEvent)
Select a given row.
|
void |
setCategoryFactory(ComponentFactory<? extends CategoryComponent,String> categoryFactory)
Set your own custom
CategoryComponentFactory to generate your categories. |
void |
setDataSource(DataSource<T> dataSource)
Set a
DataSource for data loading. |
void |
setDisplay(DataDisplay<T> display)
Set the data views display view.
|
void |
setHeight(String height)
Set the table body height.
|
void |
setLoadMask(boolean loadMask)
Set the data views loading mask.
|
void |
setLongPressDuration(int longPressDuration)
Set the long press duration requirement.
|
void |
setRedraw(boolean redraw)
Set redraw data view elements.
|
protected void |
setRedrawCategories(boolean redrawCategories) |
void |
setRenderer(Renderer<T> renderer)
Set your own custom renderer.
|
void |
setRowData(int start,
List<? extends T> values)
Set values associated with the rows in the visible range.
|
void |
setRowFactory(RowComponentFactory<T> rowFactory)
Set your own custom
RowComponentFactory to generate your row components. |
void |
setRowHeight(int rowHeight)
Set maximum row height.
|
void |
setSelectionType(SelectionType selectionType)
Set the data views row selection type.
|
void |
setTotalRows(int totalRows)
Set the total row count.
|
void |
setup(TableScaffolding scaffolding)
Setup the data view.
|
protected void |
setupHeaderSelectionBox() |
protected void |
setupShiftDetection() |
protected void |
setupStickyHeader() |
protected void |
setupSubHeaders() |
void |
setUseCategories(boolean useCategories)
Allow the data view to generate categories,
or use added categories for row data.
|
void |
setUseLoadOverlay(boolean useLoadOverlay)
Use the loading overlay mask.
|
void |
setUseRowExpansion(boolean useRowExpansion)
Use row expansion functionality, giving the user
a way to expand rows for extra information.
|
void |
setUseStickyHeader(boolean stickyHeader)
Enable the use of sticky table header bar.
|
void |
setVisibleRange(int start,
int length)
Set the visible range or rows.
|
void |
setVisibleRange(com.google.gwt.view.client.Range range)
Set the visible range or rows.
|
protected void |
setVisibleRange(com.google.gwt.view.client.Range range,
boolean forceRangeChangeEvent) |
void |
sort(Column<T,?> column)
Sort a column.
|
void |
sort(Column<T,?> column,
SortDir dir)
Sort a column.
|
protected Components<RowComponent<T>> |
sort(Components<RowComponent<T>> rows,
TableHeader th,
Column<T,?> column,
int index) |
protected Components<RowComponent<T>> |
sort(Components<RowComponent<T>> rows,
TableHeader th,
Column<T,?> column,
int index,
boolean renderRows) |
protected Components<RowComponent<T>> |
sort(Components<RowComponent<T>> rows,
TableHeader th,
Column<T,?> column,
int index,
SortDir dir) |
protected Components<RowComponent<T>> |
sort(Components<RowComponent<T>> rows,
TableHeader th,
Column<T,?> column,
int index,
SortDir dir,
boolean renderRows) |
void |
sort(int columnIndex)
Sort a column matching the given index (the index excludes the selection box row).
|
void |
sort(int columnIndex,
SortDir dir)
Sort a column matching the given index (the index excludes the selection box row).
|
void |
toggleRowSelect(gwt.material.design.jquery.client.api.Event event,
com.google.gwt.dom.client.Element row)
Select a row by given element.
|
void |
toggleRowSelect(gwt.material.design.jquery.client.api.Event event,
com.google.gwt.dom.client.Element row,
boolean fireEvent)
Select a row by given element.
|
void |
updateCheckAllInputState() |
protected void |
updateCheckAllInputState(gwt.material.design.jquery.client.api.JQueryElement input) |
void |
updateRow(T model)
Update a models row within the table.
|
protected void |
updateSortContext(TableHeader th,
Column<T,?> column) |
protected void |
updateSortContext(TableHeader th,
Column<T,?> column,
SortDir dir) |
protected DataDisplay<T> display
protected DataSource<T> dataSource
protected SortContext<T> sortContext
protected Column<T,?> autoSortColumn
protected RowComponentFactory<T> rowFactory
protected ComponentFactory<? extends CategoryComponent,String> categoryFactory
protected com.google.gwt.view.client.ProvidesKey<T> keyProvider
protected JsTableSubHeaders subheaderLib
protected int categoryHeight
protected boolean rendering
protected boolean redraw
protected boolean redrawCategories
protected gwt.material.design.client.base.MaterialWidget thead
protected gwt.material.design.client.base.MaterialWidget tbody
protected gwt.material.design.client.ui.MaterialProgress progressWidget
protected gwt.material.design.jquery.client.api.JQueryElement container
protected JsTableElement $table
protected gwt.material.design.jquery.client.api.JQueryElement maskElement
protected gwt.material.design.jquery.client.api.JQueryElement tableBody
protected gwt.material.design.jquery.client.api.JQueryElement topPanel
protected com.google.gwt.view.client.Range range
protected int totalRows
protected int longPressDuration
protected final Components<RowComponent<T>> rows
protected final Components<RowComponent<T>> pendingRows
protected final Components<CategoryComponent> categories
protected final List<TableHeader> headers
protected com.google.gwt.event.shared.HandlerRegistration attachHandler
public static final String ORPHAN_PATTERN
public static final String maskHtml
public static final String transitionEvents
public AbstractDataView()
public AbstractDataView(String id)
public AbstractDataView(com.google.gwt.view.client.ProvidesKey<T> keyProvider)
public AbstractDataView(String id, com.google.gwt.view.client.ProvidesKey<T> keyProvider)
protected void onConstructed()
setup(TableScaffolding)
.public void render(Components<Component<?>> components)
DataView
protected boolean renderRows(Components<RowComponent<T>> rows)
RowComponent
's and invoke a render.
Controls the building of category components and custom components.
Which then render(Components)
is invoked to perform DOM render.
Rows which are already rendered are reprocessed based on their equals method.
If the data is equal to the row in the same index it use the existing row.rows
- list of rows to be rendered against the existing rows.protected void renderComponent(Component<?> component)
protected void renderColumns()
public void renderColumn(Column<T,?> column)
public void setRenderer(Renderer<T> renderer)
HasRenderer
BaseRenderer
for the standard rendering.setRenderer
in interface HasRenderer<T>
public Renderer<T> getRenderer()
public void setDataSource(DataSource<T> dataSource)
HasDataSource
DataSource
for data loading.setDataSource
in interface HasDataSource<T>
public DataSource<T> getDataSource()
HasDataSource
getDataSource
in interface HasDataSource<T>
public JsTableSubHeaders getSubheaderLib()
DataView
getSubheaderLib
in interface DataView<T>
public void setup(TableScaffolding scaffolding) throws Exception
DataView
protected void onSetup(TableScaffolding scaffolding)
protected void prepareRows()
protected void setupStickyHeader()
protected void setupSubHeaders()
protected boolean isWithinView(int start, int length)
protected boolean isWithinView(int start, int length, boolean canOverflow)
public int getRowCount()
HasRows
getRowCount
in interface HasRows<T>
public com.google.gwt.view.client.Range getVisibleRange()
HasRows
getVisibleRange
in interface HasRows<T>
HasRows.setVisibleRange(Range)
,
HasRows.setVisibleRange(int, int)
public void setVisibleRange(int start, int length)
HasRows
HasRows.setVisibleRange(Range)
.setVisibleRange
in interface HasRows<T>
start
- the start indexlength
- the lengthHasRows.getVisibleRange()
public void setVisibleRange(com.google.gwt.view.client.Range range)
HasRows
setVisibleRange
in interface HasRows<T>
range
- the visible rangeHasRows.getVisibleRange()
protected void setVisibleRange(com.google.gwt.view.client.Range range, boolean forceRangeChangeEvent)
public boolean isHeaderVisible(int colIndex)
DataView
isHeaderVisible
in interface DataView<T>
public void addColumn(Column<T,?> column)
HasColumns
addColumn
in interface HasColumns<T>
column
- the column objectpublic void addColumn(Column<T,?> column, String header)
HasColumns
addColumn
in interface HasColumns<T>
column
- the column objectpublic void insertColumn(int beforeIndex, Column<T,?> column, String header)
HasColumns
insertColumn
in interface HasColumns<T>
beforeIndex
- the index to insert the columncolumn
- the column to be addedprotected void updateSortContext(TableHeader th, Column<T,?> column)
protected void updateSortContext(TableHeader th, Column<T,?> column, SortDir dir)
public void sort(int columnIndex)
HasColumns
sort
in interface HasColumns<T>
columnIndex
- valid index to the user added Column
s.public void sort(int columnIndex, SortDir dir)
HasColumns
sort
in interface HasColumns<T>
columnIndex
- valid index to the user added Column
s.dir
- the sort direction or null for auto reversing.public void sort(Column<T,?> column)
HasColumns
sort
in interface HasColumns<T>
column
- matching column that was added via ##addColumn(Column)
.public void sort(Column<T,?> column, SortDir dir)
HasColumns
sort
in interface HasColumns<T>
column
- matching column that was added via ##addColumn(Column)
.dir
- the sort direction or null for auto reversing.protected Components<RowComponent<T>> sort(Components<RowComponent<T>> rows, TableHeader th, Column<T,?> column, int index)
protected Components<RowComponent<T>> sort(Components<RowComponent<T>> rows, TableHeader th, Column<T,?> column, int index, SortDir dir)
protected Components<RowComponent<T>> sort(Components<RowComponent<T>> rows, TableHeader th, Column<T,?> column, int index, boolean renderRows)
protected Components<RowComponent<T>> sort(Components<RowComponent<T>> rows, TableHeader th, Column<T,?> column, int index, SortDir dir, boolean renderRows)
protected boolean doSort(SortContext<T> sortContext, Components<RowComponent<T>> rows)
RowComponent
's.
Sorting will check for each components category and sort per category if found.public void removeColumn(int colIndex)
HasColumns
removeColumn
in interface HasColumns<T>
colIndex
- the columns placement indexpublic void removeColumn(int colIndex, boolean hardRemove)
public void removeColumns()
HasColumns
removeColumns
in interface HasColumns<T>
public List<Column<T,?>> getColumns()
HasColumns
getColumns
in interface HasColumns<T>
public int getColumnOffset()
HasColumns
getColumnOffset
in interface HasColumns<T>
public int getColumnCount()
public SelectionType getSelectionType()
HasRows
getSelectionType
in interface HasRows<T>
public void setSelectionType(SelectionType selectionType)
HasRows
setSelectionType
in interface HasRows<T>
protected void setupHeaderSelectionBox()
protected void setupShiftDetection()
protected void reindexColumns()
public boolean isSetup()
DataView
public boolean isRendering()
DataView
isRendering
in interface DataView<T>
public void setUseStickyHeader(boolean stickyHeader)
ViewSettings
setUseStickyHeader
in interface ViewSettings
public boolean isUseStickyHeader()
ViewSettings
isUseStickyHeader
in interface ViewSettings
public void selectAllRows(boolean select)
HasRows
selectAllRows
in interface HasRows<T>
select
- true will select, false with deselectpublic void selectAllRows(boolean select, boolean fireEvent)
HasRows
selectAllRows
in interface HasRows<T>
select
- true will select, false with deselectfireEvent
- fire the '' event.public void toggleRowSelect(gwt.material.design.jquery.client.api.Event event, com.google.gwt.dom.client.Element row)
event
- sourced even (can be null)row
- element of the row selectionpublic void toggleRowSelect(gwt.material.design.jquery.client.api.Event event, com.google.gwt.dom.client.Element row, boolean fireEvent)
event
- sourced even (can be null)row
- element of the row selectionfireEvent
- fire the row select event.public void selectRow(com.google.gwt.dom.client.Element row, boolean fireEvent)
HasRows
public void deselectRow(com.google.gwt.dom.client.Element row, boolean fireEvent)
HasRows
deselectRow
in interface HasRows<T>
public boolean hasDeselectedRows(boolean visibleOnly)
HasRows
hasDeselectedRows
in interface HasRows<T>
visibleOnly
- should we restrict this check to visible rows only.public boolean hasSelectedRows(boolean visibleOnly)
HasRows
hasSelectedRows
in interface HasRows<T>
visibleOnly
- should we restrict this check to visible rows only.public List<T> getSelectedRowModels(boolean visibleOnly)
HasRows
getSelectedRowModels
in interface HasRows<T>
visibleOnly
- should we restrict this check to visible rows only.public void setRowData(int start, List<? extends T> values)
HasRows
setRowData
in interface HasRows<T>
start
- the start index of the datavalues
- the values within the rangeprotected boolean maybeApplyAutoSortColumn()
Column.setAutoSort(boolean)
if no sort has been invoked.protected Column<T,?> getAutoSortColumn()
public ComponentFactory<? extends CategoryComponent,String> getCategoryFactory()
protected RowComponent<T> buildRowComponent(T data)
protected CategoryComponent buildCategoryComponent(RowComponent<T> row)
protected CategoryComponent buildCategoryComponent(String categoryName)
public Object getValueKey(T value)
value
- the valuepublic com.google.gwt.view.client.ProvidesKey<T> getKeyProvider()
getKeyProvider
in interface com.google.gwt.view.client.HasKeyProvider<T>
public int getVisibleItemCount()
DataView
getVisibleItemCount
in interface DataView<T>
public int getRowHeight()
HasRows
getRowHeight
in interface HasRows<T>
public void setRowHeight(int rowHeight)
HasRows
setRowHeight
in interface HasRows<T>
protected int getCalculatedRowHeight()
public void addCategory(String category)
HasCategories
addCategory
in interface HasCategories
category
- The category name.public void addCategory(CategoryComponent category)
HasCategories
CategoryComponent
, which will be drawn to the table.
If the category already exists then it will be ignored.addCategory
in interface HasCategories
category
- The category data defined.protected void renderCategory(CategoryComponent category)
public boolean hasCategory(String categoryName)
HasCategories
CategoryComponent
with given name.hasCategory
in interface HasCategories
public void disableCategory(String categoryName)
HasCategories
disableCategory
in interface HasCategories
public void enableCategory(String categoryName)
HasCategories
enableCategory
in interface HasCategories
public List<CategoryComponent> getCategories()
HasCategories
getCategories
in interface HasCategories
public List<CategoryComponent> getOpenCategories()
HasCategories
CategoryComponent
's or null if categories are disabled.getOpenCategories
in interface HasCategories
public boolean isCategoryEmpty(CategoryComponent category)
HasCategories
isCategoryEmpty
in interface HasCategories
public SortContext<T> getSortContext()
DataView
getSortContext
in interface DataView<T>
public boolean isRedraw()
DataView
public void setRedraw(boolean redraw)
DataView
public void updateRow(T model)
HasRows
public RowComponent<T> getRow(T model)
HasRows
public RowComponent<T> getRow(int index)
HasRows
public RowComponent<T> getRowByModel(T model)
HasRows
RowComponent
or null if not found.getRowByModel
in interface HasRows<T>
model
- a model with a valid equals
method.RowComponent
.protected int getRowIndexByElement(com.google.gwt.dom.client.Element rowElement)
protected com.google.gwt.dom.client.Element getRowElementByModel(T model)
protected T getModelByRowElement(com.google.gwt.dom.client.Element rowElement)
protected List<T> getModelsByRowElements(List<com.google.gwt.dom.client.Element> rowElements)
protected List<RowComponent<T>> getRowsByCategory(Components<RowComponent<T>> rows, CategoryComponent category)
protected List<CategoryComponent> getHiddenCategories()
protected List<CategoryComponent> getVisibleCategories()
protected List<CategoryComponent> getPassedCategories()
public void setRowFactory(RowComponentFactory<T> rowFactory)
HasRows
RowComponentFactory
to generate your row components.setRowFactory
in interface HasRows<T>
public RowComponentFactory<T> getRowFactory()
HasRows
getRowFactory
in interface HasRows<T>
public void setCategoryFactory(ComponentFactory<? extends CategoryComponent,String> categoryFactory)
HasCategories
CategoryComponentFactory
to generate your categories.setCategoryFactory
in interface HasCategories
public void setLoadMask(boolean loadMask)
DataView
setLoadMask
in interface DataView<T>
public boolean isLoadMask()
DataView
isLoadMask
in interface DataView<T>
public gwt.material.design.client.ui.MaterialProgress getProgressWidget()
DataView
getProgressWidget
in interface DataView<T>
public int getTotalRows()
HasRows
getTotalRows
in interface HasRows<T>
public void setTotalRows(int totalRows)
HasRows
setTotalRows
in interface HasRows<T>
public boolean isUseCategories()
ViewSettings
isUseCategories
in interface ViewSettings
public void setUseCategories(boolean useCategories)
ViewSettings
setUseCategories
in interface ViewSettings
public boolean isUseLoadOverlay()
ViewSettings
isUseLoadOverlay
in interface ViewSettings
public void setUseLoadOverlay(boolean useLoadOverlay)
ViewSettings
setUseLoadOverlay
in interface ViewSettings
public boolean isUseRowExpansion()
ViewSettings
isUseRowExpansion
in interface ViewSettings
public void setUseRowExpansion(boolean useRowExpansion)
ViewSettings
setUseRowExpansion
in interface ViewSettings
public int getLongPressDuration()
ViewSettings
getLongPressDuration
in interface ViewSettings
public void setLongPressDuration(int longPressDuration)
ViewSettings
setLongPressDuration
in interface ViewSettings
public void loaded(int startIndex, List<T> data)
HasDataSource
loaded
in interface HasDataSource<T>
public com.google.gwt.user.client.ui.Widget getContainer()
DataView
getContainer
in interface DataView<T>
public void setDisplay(DataDisplay<T> display)
DataView
setDisplay
in interface DataView<T>
public final void fireEvent(com.google.gwt.event.shared.GwtEvent<?> event)
fireEvent
in interface com.google.gwt.event.shared.HasHandlers
protected TableSubHeader bindCategoryEvents(TableSubHeader category)
public void updateCheckAllInputState()
protected void updateCheckAllInputState(gwt.material.design.jquery.client.api.JQueryElement input)
public List<RowComponent<T>> getRows()
HasRows
RowComponent
's.public CategoryComponent getCategory(String name)
getCategory
in interface HasCategories
name
- name of the category component.protected CategoryComponent.OrphanCategoryComponent getOrphansCategory()
CategoryComponent.OrphanCategoryComponent
for orphan rows.public int getCategoryHeight()
public void openCategory(String categoryName)
HasCategories
openCategory
in interface HasCategories
public void openCategory(CategoryComponent category)
HasCategories
openCategory
in interface HasCategories
public void closeCategory(String categoryName)
HasCategories
closeCategory
in interface HasCategories
public void closeCategory(CategoryComponent category)
HasCategories
closeCategory
in interface HasCategories
protected TableSubHeader getTableSubHeader(String name)
protected TableSubHeader getTableSubHeader(gwt.material.design.jquery.client.api.JQueryElement elem)
protected void clearExpansions()
public void clearRows(boolean clearData)
HasRows
public void clearCategories()
HasCategories
clearCategories
in interface HasCategories
public void clearRowsAndCategories(boolean clearData)
HasCategories
clearRowsAndCategories
in interface HasCategories
clearData
- should we also clear the stored data.public List<TableHeader> getHeaders()
DataView
getHeaders
in interface DataView<T>
protected void addHeader(int index, TableHeader header)
protected void removeHeader(int index)
protected int getCategoryRowCount(String category)
protected void setRedrawCategories(boolean redrawCategories)
public void setHeight(String height)
ViewSettings
setHeight
in interface ViewSettings
public String getHeight()
ViewSettings
getHeight
in interface ViewSettings
public boolean isShiftDown()
Copyright © 2018. All rights reserved.