Class GridPro.EditColumn<T>
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.grid.Grid.Column<T>
-
- com.vaadin.flow.component.gridpro.GridPro.EditColumn<T>
-
- Type Parameters:
T- type of the underlying grid this column is compatible with
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,Serializable
@Tag("vaadin-grid-pro-edit-column") @NpmPackage(value="@vaadin/polymer-legacy-adapter", version="23.6.3") @JsModule("@vaadin/polymer-legacy-adapter/style-modules.js") public static class GridPro.EditColumn<T> extends Grid.Column<T>Server-side component for the<vaadin-grid-edit-column>element.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.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected com.vaadin.flow.dom.ElementfooterTemplateprotected Grid<?>gridprotected com.vaadin.flow.dom.ElementheaderTemplate
-
Constructor Summary
Constructors Constructor Description EditColumn(GridPro<T> grid, String columnId, com.vaadin.flow.data.renderer.Renderer<T> renderer)Constructs a new Column for use inside a Grid.
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Deprecated Methods Modifier and Type Method Description protected StringaddGridSorter(String arg0)protected List<Grid.Column<?>>getBottomChildColumns()protected com.vaadin.flow.component.HasValueAndElementgetEditorField()protected StringgetEditorType()Gets the type of the editor that is used for modifying cell value.com.vaadin.flow.component.ComponentgetFooterComponent()protected com.vaadin.flow.data.renderer.Renderer<?>getFooterRenderer()Deprecated.StringgetFooterText()Grid<?>getGrid()com.vaadin.flow.component.ComponentgetHeaderComponent()protected com.vaadin.flow.data.renderer.Renderer<?>getHeaderRenderer()Deprecated.StringgetHeaderText()protected ItemUpdater<T,String>getItemUpdater()Gets the itemUpdater function that will be called on item changed.protected List<String>getOptions()Gets the list of options that is used for select type of the editor.default ColumnTextAligngetTextAlign()com.vaadin.flow.function.ValueProvider<T,?>getValueProvider()protected booleanhasSortingIndicators()default booleanisFrozen()default booleanisFrozenToEnd()default booleanisResizable()protected voidmoveFooterContent(com.vaadin.flow.component.grid.AbstractColumn<?> arg0)protected voidmoveHeaderContent(com.vaadin.flow.component.grid.AbstractColumn<?> arg0)protected voidsetEditorField(com.vaadin.flow.component.HasValueAndElement editorField)protected GridPro.EditColumn<T>setEditorType(EditorType type)Sets the type of the editor that is used for modifying cell value.protected voidsetFooterComponent(com.vaadin.flow.component.Component arg0)protected voidsetFooterRenderer(com.vaadin.flow.data.renderer.Renderer<?> arg0)Deprecated.protected voidsetFooterText(String arg0)default TsetFrozen(boolean arg0)default TsetFrozenToEnd(boolean arg0)protected voidsetHeaderComponent(com.vaadin.flow.component.Component arg0)protected voidsetHeaderRenderer(com.vaadin.flow.data.renderer.Renderer<?> arg0)Deprecated.protected voidsetHeaderText(String arg0)protected GridPro.EditColumn<T>setItemUpdater(ItemUpdater<T,String> itemUpdater)Sets the itemUpdater function that will be called on item changed.protected GridPro.EditColumn<T>setOptions(List<String> options)Sets the list of options that is used for select type of the editor.default TsetResizable(boolean arg0)protected voidsetSortingIndicators(boolean arg0)default TsetTextAlign(ColumnTextAlign arg0)voidsetValueProvider(com.vaadin.flow.function.ValueProvider<T,?> valueProvider)voidsetVisible(boolean arg0)protected voidupdateSortingIndicators(boolean arg0)-
Methods inherited from class com.vaadin.flow.component.grid.Grid.Column
destroyDataGenerators, getBottomLevelColumn, getClassNameGenerator, getComparator, getEditorComponent, getElement, getFlexGrow, getInternalId, getKey, getRenderer, getSortOrder, getTooltipGenerator, getWidth, isAutoWidth, isSortable, setAutoWidth, setClassNameGenerator, setComparator, setComparator, setEditorComponent, setEditorComponent, setFlexGrow, setFooter, setFooter, setHeader, setHeader, setKey, 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, scrollIntoView, set, setElement, setId
-
-
-
-
Field Detail
-
grid
protected final Grid<?> grid
-
headerTemplate
protected com.vaadin.flow.dom.Element headerTemplate
-
footerTemplate
protected com.vaadin.flow.dom.Element footerTemplate
-
-
Constructor Detail
-
EditColumn
public EditColumn(GridPro<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 Detail
-
setItemUpdater
protected GridPro.EditColumn<T> setItemUpdater(ItemUpdater<T,String> itemUpdater)
Sets the itemUpdater function that will be called on item changed.- Parameters:
itemUpdater- the callback function that is called when item is changed. It receives two arguments: item and newValue.- Returns:
- this column instance
-
getItemUpdater
protected ItemUpdater<T,String> getItemUpdater()
Gets the itemUpdater function that will be called on item changed.- Returns:
- the instance of itemUpdater for this column
-
getEditorField
protected com.vaadin.flow.component.HasValueAndElement getEditorField()
-
setEditorField
protected void setEditorField(com.vaadin.flow.component.HasValueAndElement editorField)
-
setEditorType
protected GridPro.EditColumn<T> setEditorType(EditorType type)
Sets the type of the editor that is used for modifying cell value.- Parameters:
type- the type of the editor- Returns:
- this column instance
- See Also:
EditorType
-
getEditorType
@Synchronize("editor-type-changed") protected String getEditorType()Gets the type of the editor that is used for modifying cell value.- Returns:
- the editor type
-
setOptions
protected GridPro.EditColumn<T> setOptions(List<String> options)
Sets the list of options that is used for select type of the editor.- Parameters:
options- the list of options- Returns:
- this column instance
-
getOptions
@Synchronize("editor-options-changed") protected List<String> getOptions()Gets the list of options that is used for select type of the editor.- Returns:
- the list of options
-
getValueProvider
public com.vaadin.flow.function.ValueProvider<T,?> getValueProvider()
-
setValueProvider
public void setValueProvider(com.vaadin.flow.function.ValueProvider<T,?> valueProvider)
-
getGrid
public Grid<?> getGrid()
-
setVisible
public void setVisible(boolean arg0)
- Overrides:
setVisiblein classcom.vaadin.flow.component.Component
-
setHeaderRenderer
@Deprecated protected void setHeaderRenderer(com.vaadin.flow.data.renderer.Renderer<?> arg0)
Deprecated.
-
setFooterRenderer
@Deprecated protected void setFooterRenderer(com.vaadin.flow.data.renderer.Renderer<?> arg0)
Deprecated.
-
getHeaderText
public String getHeaderText()
-
setHeaderText
protected void setHeaderText(String arg0)
-
getFooterText
public String getFooterText()
-
setFooterText
protected void setFooterText(String arg0)
-
getHeaderComponent
public com.vaadin.flow.component.Component getHeaderComponent()
-
setHeaderComponent
protected void setHeaderComponent(com.vaadin.flow.component.Component arg0)
-
getFooterComponent
public com.vaadin.flow.component.Component getFooterComponent()
-
setFooterComponent
protected void setFooterComponent(com.vaadin.flow.component.Component arg0)
-
getHeaderRenderer
@Deprecated protected com.vaadin.flow.data.renderer.Renderer<?> getHeaderRenderer()
Deprecated.
-
getFooterRenderer
@Deprecated protected com.vaadin.flow.data.renderer.Renderer<?> getFooterRenderer()
Deprecated.
-
moveHeaderContent
protected void moveHeaderContent(com.vaadin.flow.component.grid.AbstractColumn<?> arg0)
-
moveFooterContent
protected void moveFooterContent(com.vaadin.flow.component.grid.AbstractColumn<?> arg0)
-
updateSortingIndicators
protected void updateSortingIndicators(boolean arg0)
-
setSortingIndicators
protected void setSortingIndicators(boolean arg0)
-
hasSortingIndicators
protected boolean hasSortingIndicators()
-
getBottomChildColumns
protected List<Grid.Column<?>> getBottomChildColumns()
-
setResizable
public default T setResizable(boolean arg0)
-
isResizable
@Synchronize("resizable-changed") public default boolean isResizable()
-
setFrozen
public default T setFrozen(boolean arg0)
-
isFrozen
@Synchronize("frozen-changed") public default boolean isFrozen()
-
setFrozenToEnd
public default T setFrozenToEnd(boolean arg0)
-
isFrozenToEnd
@Synchronize("frozen-to-end-changed") public default boolean isFrozenToEnd()
-
setTextAlign
public default T setTextAlign(ColumnTextAlign arg0)
-
getTextAlign
@Synchronize("text-align-changed") public default ColumnTextAlign getTextAlign()
-
-