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 as
UiDataTable
.- Since:
- 1.0.0
-
Nested Class Summary
Nested ClassesNested 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
Modifier and TypeMethodDescriptiondefault void
void
addColumn
(io.github.mmm.value.TypedPropertyPath<V> property) addColumn
(io.github.mmm.value.TypedPropertyPath<V> property, int index) default void
addColumns
(UiColumn<R, ?>... columns) createColumn
(io.github.mmm.value.TypedPropertyPath<V> property) createColumn
(String title, UiAbstractDataWidget.ColumnAdapter<R, V> adapter) getColumn
(int index) int
void
setFilterHandler
(UiAbstractDataTable.FilterHandler<R> filterHandler) void
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 Details
-
getColumnCount
int getColumnCount()- Returns:
- the number of
columns
of this data widget. - See Also:
-
createColumn
- 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
- 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
- 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:
-
addColumn
-
addColumn
-
addColumn
- 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.
-
addColumn
- 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.
-
addColumns
-
sort
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
- 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.
-