Package io.jmix.flowui.component.grid
Class DataGridColumn<E>
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.grid.Grid.Column<E>
io.jmix.flowui.component.grid.DataGridColumn<E>
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier
,com.vaadin.flow.component.DetachNotifier
,com.vaadin.flow.component.HasElement
,com.vaadin.flow.component.HasStyle
,Serializable
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class DataGridColumn<E>
extends com.vaadin.flow.component.grid.Grid.Column<E>
implements org.springframework.context.ApplicationContextAware
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
protected DataGridHeaderFilter
protected final com.vaadin.flow.component.grid.Grid<?>
-
Constructor Summary
ConstructorDescriptionDataGridColumn
(com.vaadin.flow.component.grid.Grid<E> grid, String columnId, com.vaadin.flow.data.renderer.Renderer<E> renderer) Constructs a new DataGridColumn for use inside aDataGrid
. -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.Registration
addColumnVisibilityChangedListener
(com.vaadin.flow.component.ComponentEventListener<DataGridColumnVisibilityChangedEvent<E>> listener) Add listener for event of column visibility changeprotected List<com.vaadin.flow.component.grid.Grid.Column<?>>
com.vaadin.flow.component.Component
default String
com.vaadin.flow.component.grid.Grid<?>
getGrid()
com.vaadin.flow.component.Component
default String
default com.vaadin.flow.component.grid.ColumnTextAlign
protected boolean
boolean
default boolean
isFrozen()
default boolean
default boolean
protected void
moveFooterContent
(com.vaadin.flow.component.grid.AbstractColumn<?> arg0) protected void
moveHeaderContent
(com.vaadin.flow.component.grid.AbstractColumn<?> arg0) void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) com.vaadin.flow.component.grid.Grid.Column<E>
setClassNameGenerator
(com.vaadin.flow.function.SerializableFunction<E, String> classNameGenerator) void
setFilterable
(boolean filterable) Sets the filtering for a column.protected void
setFooterComponent
(com.vaadin.flow.component.Component arg0) default com.vaadin.flow.component.grid.Grid.Column<E>
setFooterPartName
(String arg0) protected void
setFooterText
(String arg0) default com.vaadin.flow.component.grid.Grid.Column<E>
setFrozen
(boolean arg0) default com.vaadin.flow.component.grid.Grid.Column<E>
setFrozenToEnd
(boolean arg0) com.vaadin.flow.component.grid.Grid.Column<E>
setHeader
(com.vaadin.flow.component.Component headerComponent) com.vaadin.flow.component.grid.Grid.Column<E>
protected void
setHeaderComponent
(com.vaadin.flow.component.Component arg0) default com.vaadin.flow.component.grid.Grid.Column<E>
setHeaderPartName
(String arg0) protected void
setHeaderText
(String arg0) default com.vaadin.flow.component.grid.Grid.Column<E>
setResizable
(boolean arg0) protected void
setSortingIndicators
(boolean arg0) default com.vaadin.flow.component.grid.Grid.Column<E>
setTextAlign
(com.vaadin.flow.component.grid.ColumnTextAlign arg0) void
setVisible
(boolean visible) protected void
updateSortingIndicators
(boolean arg0) Methods inherited from class com.vaadin.flow.component.grid.Grid.Column
destroyDataGenerators, getBottomLevelColumn, getClassNameGenerator, getComparator, getEditorComponent, getElement, getFlexGrow, getInternalId, getKey, getPartNameGenerator, getRenderer, getSortOrder, getTooltipGenerator, getWidth, isAutoWidth, isRowHeader, isSortable, setAutoWidth, setComparator, setComparator, setEditorComponent, setEditorComponent, setFlexGrow, setFooter, setFooter, setKey, setPartNameGenerator, setRenderer, setRowHeader, setSortable, setSortOrderProvider, setSortProperty, setTooltipGenerator, setWidth
Methods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Field Details
-
dataGridFilter
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
grid
protected final com.vaadin.flow.component.grid.Grid<?> grid
-
-
Constructor Details
-
DataGridColumn
public DataGridColumn(com.vaadin.flow.component.grid.Grid<E> grid, String columnId, com.vaadin.flow.data.renderer.Renderer<E> renderer) Constructs a new DataGridColumn for use inside aDataGrid
.- Parameters:
grid
- the grid this column is attached tocolumnId
- unique identifier of this columnrenderer
- the renderer to use in this column, must not benull
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
setClassNameGenerator
public com.vaadin.flow.component.grid.Grid.Column<E> setClassNameGenerator(com.vaadin.flow.function.SerializableFunction<E, String> classNameGenerator) - Overrides:
setClassNameGenerator
in classcom.vaadin.flow.component.grid.Grid.Column<E>
-
setFilterable
public void setFilterable(boolean filterable) Sets the filtering for a column. If the filtering is enabled, a filter button will be added to the column header. The filtering is disabled by default.- Parameters:
filterable
- whether to add a filter to the header
-
isFilterable
public boolean isFilterable()- Returns:
true
if the filter is added to the column header,false
otherwise
-
setHeader
- Overrides:
setHeader
in classcom.vaadin.flow.component.grid.Grid.Column<E>
-
setHeader
public com.vaadin.flow.component.grid.Grid.Column<E> setHeader(com.vaadin.flow.component.Component headerComponent) - Overrides:
setHeader
in classcom.vaadin.flow.component.grid.Grid.Column<E>
-
setVisible
public void setVisible(boolean visible) -
addColumnVisibilityChangedListener
public com.vaadin.flow.shared.Registration addColumnVisibilityChangedListener(com.vaadin.flow.component.ComponentEventListener<DataGridColumnVisibilityChangedEvent<E>> listener) Add listener for event of column visibility change- Parameters:
listener
- the listener to add- Returns:
- a registration handle to remove the listener
-
getGrid
public com.vaadin.flow.component.grid.Grid<?> getGrid() -
getHeaderText
-
setHeaderText
-
getHeaderComponent
public com.vaadin.flow.component.Component getHeaderComponent() -
setHeaderComponent
protected void setHeaderComponent(com.vaadin.flow.component.Component arg0) -
moveHeaderContent
protected void moveHeaderContent(com.vaadin.flow.component.grid.AbstractColumn<?> arg0) -
updateSortingIndicators
protected void updateSortingIndicators(boolean arg0) -
setSortingIndicators
protected void setSortingIndicators(boolean arg0) -
hasSortingIndicators
protected boolean hasSortingIndicators() -
getBottomChildColumns
-
setResizable
-
isResizable
@Synchronize("resizable-changed") default boolean isResizable() -
setFrozen
-
isFrozen
@Synchronize("frozen-changed") default boolean isFrozen() -
setFrozenToEnd
-
isFrozenToEnd
@Synchronize("frozen-to-end-changed") default boolean isFrozenToEnd() -
setTextAlign
default com.vaadin.flow.component.grid.Grid.Column<E> setTextAlign(com.vaadin.flow.component.grid.ColumnTextAlign arg0) -
getTextAlign
@Synchronize("text-align-changed") default com.vaadin.flow.component.grid.ColumnTextAlign getTextAlign() -
setHeaderPartName
-
getHeaderPartName
-