Module io.github.mmm.ui.api.data
Package io.github.mmm.ui.api.widget.data
Interface UiAbstractDataTable<R>
-
- Type Parameters:
R
- type of the data for the rows displayed by this widget. Typically aBean
.
- All Superinterfaces:
AttributeReadAttached
,AttributeReadEnabled
,AttributeReadId
,AttributeReadMultiSelection
,AttributeReadSelection<R>
,AttributeReadSelections<R>
,AttributeReadValid
,AttributeReadVisible
,AttributeWriteEnabled
,AttributeWriteId
,AttributeWriteMultiSelection
,AttributeWriteReadOnly
,AttributeWriteSelection<R>
,AttributeWriteSelections<R>
,AttributeWriteShowRowNumbers
,AttributeWriteTooltip
,AttributeWriteVisible
,io.github.mmm.event.EventSource<UiEvent,UiEventListener>
,UiAbstractDataWidget<R>
,UiRegularWidget
,UiWidget
- All Known Subinterfaces:
UiDataTable<R>
,UiDataTreeTable<R>
public interface UiAbstractDataTable<R> extends UiAbstractDataWidget<R>, AttributeWriteShowRowNumbers
Abstract interface for widgets showing complex data in columns such asUiDataTable
.- Since:
- 1.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
UiAbstractDataTable.FilterHandler<R>
-
Nested classes/interfaces inherited from interface io.github.mmm.ui.api.widget.data.UiAbstractDataWidget
UiAbstractDataWidget.ColumnAdapter<D,C>
-
-
Field Summary
-
Fields inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteMultiSelection
STYLE_SELECTION
-
Fields inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteShowRowNumbers
ROW_NUMBER_HEADER_TITLE, STYLE_ROW_NUMBER
-
Fields inherited from interface io.github.mmm.ui.api.widget.data.UiAbstractDataWidget
STYLE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
addColumn(UiColumn<R,?> column)
void
addColumn(UiColumn<R,?> column, int index)
default <V> UiColumn<R,V>
addColumn(io.github.mmm.value.TypedPropertyPath<V> property)
default <V> UiColumn<R,V>
addColumn(io.github.mmm.value.TypedPropertyPath<V> property, int index)
default void
addColumns(UiColumn<R,?>... columns)
<V> UiColumn<R,V>
createColumn(io.github.mmm.value.TypedPropertyPath<V> property)
<V> UiColumn<R,V>
createColumn(String title, UiAbstractDataWidget.ColumnAdapter<R,V> adapter)
UiColumn<R,?>
getColumn(int index)
int
getColumnCount()
void
setFilterHandler(UiAbstractDataTable.FilterHandler<R> filterHandler)
void
sort(io.github.mmm.base.sort.SortOrder order, UiColumn<R,?>... columns)
This method sorts the data with the givenSortOrder
according to the specifiedUiColumn
s.-
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeReadAttached
isAttached
-
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeReadId
getId
-
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeReadMultiSelection
isMultiSelection
-
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeReadSelection
getSelection
-
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeReadSelections
getSelections
-
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteId
setId
-
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteMultiSelection
setMultiSelection
-
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteSelection
setSelection
-
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteSelections
addSelection, addSelections, setSelections
-
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteShowRowNumbers
isShowRowNumbers, setShowRowNumbers
-
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteTooltip
getTooltip, setTooltip
-
Methods inherited from interface io.github.mmm.event.EventSource
addListener, addListener, addWeakListener, removeListener
-
Methods inherited from interface io.github.mmm.ui.api.widget.data.UiAbstractDataWidget
setRowTemplate
-
Methods inherited from interface io.github.mmm.ui.api.widget.UiWidget
cast, dispose, getModificationTimestamp, getParent, getReadOnlyFixed, getStyles, isDisposed, isEnabled, isEnabled, isFocused, isModified, isReadOnly, isValid, isVisible, isVisible, reset, setEnabled, setEnabled, setFocused, setReadOnly, setReadOnlyFixed, setVisible, setVisible, validate, validate, validate, validateDown, validateUp
-
-
-
-
Method Detail
-
getColumnCount
int getColumnCount()
- Returns:
- the number of
columns
of this data widget. - See Also:
List.size()
-
createColumn
<V> UiColumn<R,V> createColumn(io.github.mmm.value.TypedPropertyPath<V> property)
- Type Parameters:
V
- type of the cell values of theUiColumn
.- Parameters:
property
- theproperty
of the row data.- Returns:
- the new
UiColumn
. - Throws:
RuntimeException
- if the givenproperty
does not belong to the data model of this data widget.
-
createColumn
<V> UiColumn<R,V> createColumn(String title, UiAbstractDataWidget.ColumnAdapter<R,V> adapter)
- Type Parameters:
V
- type of the cell values of theUiColumn
.- Parameters:
title
- thecolumn header title
.adapter
- theUiAbstractDataWidget.ColumnAdapter
giving access to read (and write) the column cell values from the data model.- Returns:
- the new
UiColumn
.
-
getColumn
UiColumn<R,?> getColumn(int index)
- Parameters:
index
- is the index of the requestedUiColumn
. The index corresponds to the index when theUiColumn
has beenadded
. Reordering or hiding columns in the UI has no effect on the index. The value has to be in the range from0
to
.getColumnCount()
- 1- Returns:
- the requested
column
. - See Also:
List.get(int)
-
addColumn
default <V> UiColumn<R,V> addColumn(io.github.mmm.value.TypedPropertyPath<V> property)
- Type Parameters:
V
- type of the cell values of theUiColumn
.- Parameters:
property
- theproperty
of the row data.index
- the index where to add the new column.- Returns:
- the new
UiColumn
. - Throws:
RuntimeException
- if the givenproperty
does not belong to the data model of this data widget.
-
addColumn
default <V> UiColumn<R,V> addColumn(io.github.mmm.value.TypedPropertyPath<V> property, int index)
- Type Parameters:
V
- type of the cell values of theUiColumn
.- Parameters:
property
- theproperty
of the row data.index
- the index where to add the new column.- Returns:
- the new
UiColumn
. - Throws:
RuntimeException
- if the givenproperty
does not belong to the data model of this data widget.
-
sort
void sort(io.github.mmm.base.sort.SortOrder order, UiColumn<R,?>... columns)
This method sorts the data with the givenSortOrder
according to the specifiedUiColumn
s. The sort priority is from the firstUiColumn
(primary sort) to the last (least significant sort). In case all values of the first column are unique additional columns will have no effect on sorting.- Parameters:
order
- is theSortOrder
.columns
- are the columns of this data-list to sort by.
-
setFilterHandler
void setFilterHandler(UiAbstractDataTable.FilterHandler<R> filterHandler)
- Parameters:
filterHandler
- theUiAbstractDataTable.FilterHandler
to customize thefiltering
. Allows to override the filtering for individual columns or the entire table. Custom handling may trigger a server-side search and asynchronously update the data in the table.
-
-