Class GridLayout<T>
java.lang.Object
com.vaadin.flow.component.Component
io.jmix.flowui.kit.component.gridlayout.JmixGridLayout<T>
io.jmix.flowui.component.gridlayout.GridLayout<T>
- Type Parameters:
T- the type of the items displayed in this layout
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasComponents,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,com.vaadin.flow.data.binder.HasItemComponents<T>,com.vaadin.flow.data.provider.HasDataView<T,,Void, GridLayoutDataView<T>> com.vaadin.flow.data.provider.HasListDataView<T,,GridLayoutListDataView<T>> SupportsDataProvider<T>,SupportsItemsContainer<T>,SupportsItemsEnum<T>,Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware
public class GridLayout<T>
extends JmixGridLayout<T>
implements SupportsDataProvider<T>, SupportsItemsContainer<T>, SupportsItemsEnum<T>, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
Represents a customizable grid layout component for displaying data in a grid-based format.
Provides integration with data sources to support data binding, items enumeration, and other features.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.flow.data.binder.HasItemComponents
com.vaadin.flow.data.binder.HasItemComponents.ItemComponent<T extends Object> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextprotected DataViewDelegate<GridLayout<T>,T> protected MetadataToolsFields inherited from class io.jmix.flowui.kit.component.gridlayout.JmixGridLayout
dataProvider, dataProviderListenerRegistration, itemLabelGenerator, itemRenderer, items, lastFetchedDataSize, lastNotifiedDataSize, sizeRequest -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected StringapplyDefaultValueFormat(T item) protected voidprotected voidbindDataProvider(com.vaadin.flow.data.provider.DataProvider<T, ?> dataProvider) protected DataViewDelegate<GridLayout<T>,T> com.vaadin.flow.data.provider.DataProvider<T,?> Gets the data provider used by thisJmixGridLayout.protected voidvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) Sets a generic data provider for theJmixGridLayoutto use and returns the baseGridLayoutDataViewthat provides API to get information on the items.Sets an in-memory data provider for theJmixGridLayoutto use.Sets aListDataProviderfor theJmixGridLayoutto use and returns aListDataViewthat provides information and allows operation on the items.voidsetItems(CollectionContainer<T> container) Sets items from the passedCollectionContainer.voidSets items from the passedEnumClass.Methods inherited from class io.jmix.flowui.kit.component.gridlayout.JmixGridLayout
createItemComponent, fireSizeEvent, getColumnMinWidth, getGap, getGenericDataView, getItemComponents, getItemId, getItemLabelGenerator, getItemRenderer, getListDataView, handleDataChange, onAttach, onDetach, rebuild, refresh, refreshContent, runBeforeClientResponse, setColumnMinWidth, setDataProvider, setGap, setItemLabelGenerator, setRenderer, setupDataProviderListenerMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasComponents
add, add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAllMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledMethods inherited from interface com.vaadin.flow.data.binder.HasItemComponents
addComponents, getItemPosition, prependComponentsMethods inherited from interface com.vaadin.flow.data.provider.HasListDataView
setItems, setItemsMethods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Field Details
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
metadataTools
-
dataViewDelegate
-
-
Constructor Details
-
GridLayout
public GridLayout()
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
autowireDependencies
protected void autowireDependencies() -
initComponent
protected void initComponent() -
applyDefaultValueFormat
-
setItems
Description copied from interface:SupportsItemsContainerSets items from the passedCollectionContainer.- Specified by:
setItemsin interfaceSupportsItemsContainer<T>- Parameters:
container- aCollectionContainerto be used as items source- See Also:
-
setItems
Description copied from interface:SupportsItemsEnumSets items from the passedEnumClass.- Specified by:
setItemsin interfaceSupportsItemsEnum<T>- Parameters:
itemsEnum- aEnumClassto be used as items source- See Also:
-
setItems
public GridLayoutDataView<T> setItems(com.vaadin.flow.data.provider.DataProvider<T, Void> dataProvider) Description copied from class:JmixGridLayoutSets a generic data provider for theJmixGridLayoutto use and returns the baseGridLayoutDataViewthat provides API to get information on the items.This method should be used only when the data provider type is not either
ListDataProviderorBackEndDataProvider.- Specified by:
setItemsin interfacecom.vaadin.flow.data.provider.HasDataView<T,Void, GridLayoutDataView<T>> - Overrides:
setItemsin classJmixGridLayout<T>- Parameters:
dataProvider- DataProvider instance to use, notnull- Returns:
GridLayoutDataViewproviding information on the data
-
setItems
public GridLayoutDataView<T> setItems(com.vaadin.flow.data.provider.InMemoryDataProvider<T> inMemoryDataProvider) Description copied from class:JmixGridLayoutSets an in-memory data provider for theJmixGridLayoutto use.Note! Using a
ListDataProviderinstead of aInMemoryDataProvideris recommended to get access toGridLayoutListDataViewAPI by usingHasListDataView.setItems(ListDataProvider).- Specified by:
setItemsin interfacecom.vaadin.flow.data.provider.HasDataView<T,Void, GridLayoutDataView<T>> - Overrides:
setItemsin classJmixGridLayout<T>- Parameters:
inMemoryDataProvider- data provider to use, notnull- Returns:
GridLayoutDataViewproviding information on the data
-
setItems
public GridLayoutListDataView<T> setItems(com.vaadin.flow.data.provider.ListDataProvider<T> listDataProvider) Description copied from class:JmixGridLayoutSets aListDataProviderfor theJmixGridLayoutto use and returns aListDataViewthat provides information and allows operation on the items.- Specified by:
setItemsin interfacecom.vaadin.flow.data.provider.HasListDataView<T,GridLayoutListDataView<T>> - Overrides:
setItemsin classJmixGridLayout<T>- Parameters:
listDataProvider- ListDataProvider providing items to theJmixGridLayout.- Returns:
GridLayoutListDataViewproviding access to the items
-
bindDataProvider
-
getDataProvider
Description copied from class:JmixGridLayoutGets the data provider used by thisJmixGridLayout.To get information and control over the items in the
JmixGridLayout, use eitherJmixGridLayout.getListDataView()orJmixGridLayout.getGenericDataView()instead.- Specified by:
getDataProviderin interfaceSupportsDataProvider<T>- Overrides:
getDataProviderin classJmixGridLayout<T>- Returns:
- the data provider used by this
JmixGridLayout
-
createItemsDelegate
-