public class EasyGrid<T>
extends com.vaadin.flow.component.grid.Grid<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
EasyGrid.EditableColumn<T,X> |
com.vaadin.flow.component.grid.Grid.AbstractGridExtension<T>, com.vaadin.flow.component.grid.Grid.Column<T>, com.vaadin.flow.component.grid.Grid.DataCommunicatorBuilder<T,U extends com.vaadin.flow.data.provider.ArrayUpdater>, com.vaadin.flow.component.grid.Grid.SelectionMode, com.vaadin.flow.component.grid.Grid.UpdateQueue| Modifier and Type | Method and Description |
|---|---|
protected <C extends com.vaadin.flow.component.grid.Grid.Column<T>> |
addColumn(String propertyName,
BiFunction<com.vaadin.flow.data.renderer.Renderer<T>,String,C> columnFactory) |
void |
addColumnDecorators(ColumnDecorator decorator) |
void |
addColumnValueProviderFactory(ColumnValueMapper valueProviderFactory) |
EasyGrid.EditableColumn<T,?> |
addEditableColumn(String propertyName)
Adds a new editable column for the given property name.
|
EasyGrid.EditableColumn<T,?> |
addEditableColumn(String propertyName,
com.vaadin.flow.data.renderer.Renderer<T> renderer) |
<X> EasyGrid.EditableColumn<T,X> |
addEditableColumn(String propertyName,
com.vaadin.flow.function.ValueProvider<T,X> valueProvider)
Adds a new editable column for the given property name,
with a value provider for rendering the read-mode values.
|
void |
addFieldFactoryRegistry(FieldFactory<?> fieldFactory) |
protected com.vaadin.flow.component.grid.editor.Editor<T> |
createEditor() |
protected BiFunction<com.vaadin.flow.data.renderer.Renderer<T>,String,EasyGrid.EditableColumn<T,?>> |
getEditableColumnFactory(String propertyName) |
protected BeanPropertyDefinition<T,?> |
getPropertyDefinition(String propertyName) |
protected <V> com.vaadin.flow.function.SerializableFunction<V,?> |
getValueMapper(com.vaadin.flow.data.binder.PropertyDefinition<T,V> property) |
addColumn, addColumn, addColumn, addColumn, addColumn, addColumn, addColumn, addColumn, addColumnReorderListener, addColumnResizeListener, addColumns, addComponentColumn, addContextMenu, addDataGenerator, addDragEndListener, addDragStartListener, addDropListener, addFirstHeaderRow, addItemClickListener, addItemDoubleClickListener, addSelectionListener, addSortListener, addThemeVariants, addValueProvider, appendFooterRow, appendHeaderRow, asMultiSelect, asSingleSelect, compareMaybeComparables, createColumn, createColumnId, createDefaultArrayUpdater, createSortingComparator, deselect, deselectAll, getArrayUpdater, getBeanType, getClassNameGenerator, getColumnByKey, getColumnLayers, getColumns, getDataCommunicator, getDataProvider, getDefaultColumnFactory, getDefaultHeaderRow, getDragFilter, getDropFilter, getDropMode, getEditor, getFooterRows, getHeaderRows, getPageSize, getPropertySet, getSelectedItems, getSelectionModel, getSortOrder, getUniqueKeyProperty, getUniqueKeyProvider, initConnector, insertColumnLayer, isColumnReorderingAllowed, isDetailsVisible, isDetailsVisibleOnClick, isHeightByRows, isMultiSort, isRowsDraggable, isVerticalScrollingEnabled, onDataProviderChange, onEnabledStateChanged, prependFooterRow, prependHeaderRow, recalculateColumnWidths, removeAllColumns, removeColumn, removeColumnByKey, removeColumnLayer, removeColumns, removeDataGenerator, removeThemeVariants, scrollToEnd, scrollToIndex, scrollToStart, select, setClassNameGenerator, setColumnKey, setColumnOrder, setColumnOrder, setColumnReorderingAllowed, setColumns, setDataProvider, setDetailsVisible, setDetailsVisibleOnClick, setDragDataGenerator, setDragFilter, setDropFilter, setDropMode, setHeightByRows, setItemDetailsRenderer, setMultiSort, setPageSize, setRowsDraggable, setSelectionDragDetails, setSelectionMode, setSelectionModel, setSortableColumns, setUniqueKeyProperty, setUniqueKeyProvider, setVerticalScrollingEnabled, sort, updateSelectionModeOnClientaddListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isTemplateMapped, isVisible, onAttach, onDetach, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNamegetHeight, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, setHeight, setHeightFull, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidthFulladdFocusShortcut, blur, focus, getTabIndex, setTabIndexpublic void addFieldFactoryRegistry(FieldFactory<?> fieldFactory)
public void addColumnDecorators(ColumnDecorator decorator)
public void addColumnValueProviderFactory(ColumnValueMapper valueProviderFactory)
protected com.vaadin.flow.component.grid.editor.Editor<T> createEditor()
createEditor in class com.vaadin.flow.component.grid.Grid<T>protected BiFunction<com.vaadin.flow.data.renderer.Renderer<T>,String,EasyGrid.EditableColumn<T,?>> getEditableColumnFactory(String propertyName)
public EasyGrid.EditableColumn<T,?> addEditableColumn(String propertyName)
column key and the property caption will be used as the
column header.
You can add columns for nested properties with dot notation, eg.
"property.nestedProperty"
If the property is Comparable, the created column is sortable by
default. This can be changed with the Column#setSortable(boolean)
method.
Note: This method can only be used for an EasyGrid created
from a bean type with EasyGrid(Class).
Every added column sends data to the client side regardless of its
visibility state. Don't add a new column at all or use
Grid.removeColumn(Column) to avoid sending extra data.
propertyName - the property name of the new column, not nullGrid.addColumn(String),
Grid.removeColumn(Column)public <X> EasyGrid.EditableColumn<T,X> addEditableColumn(String propertyName, com.vaadin.flow.function.ValueProvider<T,X> valueProvider)
column key and the property caption will be used as the
column header.
You can add columns for nested properties with dot notation, eg.
"property.nestedProperty"
If the property is Comparable, the created column is sortable by
default. This can be changed with the Column#setSortable(boolean)
method.
valueProvider - the value providerGrid.addComponentColumn(ValueProvider),
Grid.addColumn(Renderer),
Grid.removeColumn(Column),
Grid.getDefaultColumnFactory(),
Grid.addColumn(ValueProvider, BiFunction)public EasyGrid.EditableColumn<T,?> addEditableColumn(String propertyName, com.vaadin.flow.data.renderer.Renderer<T> renderer)
protected <C extends com.vaadin.flow.component.grid.Grid.Column<T>> C addColumn(String propertyName, BiFunction<com.vaadin.flow.data.renderer.Renderer<T>,String,C> columnFactory)
protected <V> com.vaadin.flow.function.SerializableFunction<V,?> getValueMapper(com.vaadin.flow.data.binder.PropertyDefinition<T,V> property)
protected final BeanPropertyDefinition<T,?> getPropertyDefinition(String propertyName)
Copyright © 2020 Flowing Code. All rights reserved.