Class VGrid.VColumn<T>
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.grid.Grid.Column<T>
org.vaadin.firitin.components.grid.VGrid.VColumn<T>
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasStyle, Serializable
public static class VGrid.VColumn<T>
extends com.vaadin.flow.component.grid.Grid.Column<T>
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<com.vaadin.flow.component.grid.Grid.Column<?>> com.vaadin.flow.component.Componentdefault Stringcom.vaadin.flow.component.grid.Grid<?> getGrid()com.vaadin.flow.component.Componentdefault Stringcom.vaadin.flow.dom.StylegetStyle()default com.vaadin.flow.component.grid.ColumnTextAlignprotected booleandefault booleanisFrozen()default booleandefault booleanprotected voidmoveFooterContent(com.vaadin.flow.component.grid.AbstractColumn<?> arg0) protected voidmoveHeaderContent(com.vaadin.flow.component.grid.AbstractColumn<?> arg0) <C extends com.vaadin.flow.component.Component>
VGrid.VColumn<T> setComponentRenderer(com.vaadin.flow.function.ValueProvider<T, C> componentProvider) Replaces the way this column is rendered with a component, leaving the rest of the column configuration untouched.protected voidsetFooterComponent(com.vaadin.flow.component.Component arg0) default com.vaadin.flow.component.grid.Grid.Column<T> setFooterPartName(String arg0) protected voidsetFooterText(String arg0) default com.vaadin.flow.component.grid.Grid.Column<T> setFrozen(boolean arg0) default com.vaadin.flow.component.grid.Grid.Column<T> setFrozenToEnd(boolean arg0) protected voidsetHeaderComponent(com.vaadin.flow.component.Component arg0) default com.vaadin.flow.component.grid.Grid.Column<T> setHeaderPartName(String arg0) protected voidsetHeaderText(String arg0) default com.vaadin.flow.component.grid.Grid.Column<T> setResizable(boolean arg0) protected voidsetSortingIndicators(boolean arg0) default com.vaadin.flow.component.grid.Grid.Column<T> setTextAlign(com.vaadin.flow.component.grid.ColumnTextAlign arg0) voidsetVisible(boolean arg0) protected voidupdateSortingIndicators(boolean arg0) withKey(PropertyRef<T, ?> property) Sets the key of this column, using a method reference to the getter of the property instead of a string.withRenderer(com.vaadin.flow.data.renderer.Renderer<T> renderer) Replaces the renderer of this column, leaving the rest of the column configuration untouched.final VGrid.VColumn<T> withSortProperties(PropertyRef<T, ?>... properties) Sets the properties this column is sorted by in the backend, using method references to their getters instead of property name strings.Methods inherited from class com.vaadin.flow.component.grid.Grid.Column
destroyDataGenerators, getBottomLevelColumn, getComparator, getEditorComponent, getElement, getFlexGrow, getInternalId, getKey, getPartNameGenerator, getRenderer, getSortOrder, getTooltipGenerator, getWidth, isAutoWidth, isRowHeader, isSortable, setAutoWidth, setComparator, setComparator, setEditorComponent, setEditorComponent, setFlexGrow, setFooter, setFooter, setHeader, setHeader, setPartNameGenerator, setRenderer, setRowHeader, setSortable, setSortOrderProvider, setSortProperty, setTooltipGenerator, setWidthMethods inherited from class com.vaadin.flow.component.Component
addListener, bindVisible, findAncestor, fireEvent, from, get, getChildren, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestIdMethods inherited from class 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.HasStyle
addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Field Details
-
grid
protected final com.vaadin.flow.component.grid.Grid<?> grid
-
-
Constructor Details
-
VColumn
public VColumn(com.vaadin.flow.component.grid.Grid<T> grid, String columnId, com.vaadin.flow.data.renderer.Renderer<T> renderer) Constructs a new Column for use inside a Grid.- 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
-
withSortProperties
Sets the properties this column is sorted by in the backend, using method references to their getters instead of property name strings.- Parameters:
properties- method references to the getters of the sort properties- Returns:
- this column, for further configuration
-
withKey
Sets the key of this column, using a method reference to the getter of the property instead of a string.- Parameters:
property- a method reference to the getter of the property- Returns:
- this column, for further configuration
-
setComponentRenderer
public <C extends com.vaadin.flow.component.Component> VGrid.VColumn<T> setComponentRenderer(com.vaadin.flow.function.ValueProvider<T, C> componentProvider) Replaces the way this column is rendered with a component, leaving the rest of the column configuration untouched.- Type Parameters:
C- the component type- Parameters:
componentProvider- creates the component to show for a row- Returns:
- this column, for further configuration
-
withRenderer
Replaces the renderer of this column, leaving the rest of the column configuration untouched.- Parameters:
renderer- the new renderer- Returns:
- this column, for further configuration
-
setKey
- Overrides:
setKeyin classcom.vaadin.flow.component.grid.Grid.Column<T>
-
getStyle
public com.vaadin.flow.dom.Style getStyle() -
getGrid
public com.vaadin.flow.component.grid.Grid<?> getGrid() -
setVisible
public void setVisible(boolean arg0) - Overrides:
setVisiblein classcom.vaadin.flow.component.Component
-
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<T> setTextAlign(com.vaadin.flow.component.grid.ColumnTextAlign arg0) -
getTextAlign
@Synchronize("text-align-changed") default com.vaadin.flow.component.grid.ColumnTextAlign getTextAlign() -
setHeaderPartName
-
getHeaderPartName
-