Class JmixTwinColumn<V>
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.AbstractField<JmixTwinColumn<V>,Collection<V>>
 
io.jmix.flowui.kit.component.twincolumn.JmixTwinColumn<V>
- All Implemented Interfaces:
- com.vaadin.flow.component.AttachNotifier,- com.vaadin.flow.component.DetachNotifier,- com.vaadin.flow.component.HasAriaLabel,- com.vaadin.flow.component.HasElement,- com.vaadin.flow.component.HasEnabled,- com.vaadin.flow.component.HasHelper,- com.vaadin.flow.component.HasLabel,- com.vaadin.flow.component.HasSize,- com.vaadin.flow.component.HasStyle,- com.vaadin.flow.component.HasTheme,- com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixTwinColumn<V>,,- Collection<V>>, - Collection<V>> - com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixTwinColumn<V>,,- Collection<V>>, - Collection<V>> - com.vaadin.flow.component.shared.HasThemeVariant<TwinColumnVariant>,- com.vaadin.flow.data.provider.HasDataView<V,,- Void, - TwinColumnDataView<V>> - com.vaadin.flow.data.provider.HasListDataView<V,,- TwinColumnListDataView<V>> - Serializable
- Direct Known Subclasses:
- TwinColumn
@Tag("jmix-twin-column")
@JsModule("./src/twin-column/jmix-twin-column.js")
public class JmixTwinColumn<V>
extends com.vaadin.flow.component.AbstractField<JmixTwinColumn<V>,Collection<V>>
implements com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasHelper, com.vaadin.flow.component.HasAriaLabel, com.vaadin.flow.component.HasLabel, com.vaadin.flow.component.shared.HasThemeVariant<TwinColumnVariant>, com.vaadin.flow.data.provider.HasListDataView<V,TwinColumnListDataView<V>>, com.vaadin.flow.data.provider.HasDataView<V,Void,TwinColumnDataView<V>>    
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class com.vaadin.flow.component.AbstractFieldcom.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,V extends Object> Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasValuecom.vaadin.flow.component.HasValue.ValueChangeEvent<V extends Object>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected com.vaadin.flow.component.orderedlayout.VerticalLayoutprotected com.vaadin.flow.component.button.Buttonprotected com.vaadin.flow.component.button.Buttonprotected com.vaadin.flow.component.listbox.MultiSelectListBox<V>protected com.vaadin.flow.component.html.NativeLabelprotected booleanprotected booleanprotected com.vaadin.flow.component.button.Buttonprotected com.vaadin.flow.component.listbox.MultiSelectListBox<V>protected com.vaadin.flow.component.html.NativeLabelprotected com.vaadin.flow.component.button.Button
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected StringapplyColumnItemLabelFormat(V value) protected voidcolumnItemDoubleClicked(com.vaadin.flow.component.listbox.MultiSelectListBox<V> from, com.vaadin.flow.component.listbox.MultiSelectListBox<V> to, Integer itemIndex) protected com.vaadin.flow.component.button.ButtoncreateButton(String className, com.vaadin.flow.component.icon.Icon icon, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button>> clickListener) protected voidprotected com.vaadin.flow.component.listbox.MultiSelectListBox<V>protected com.vaadin.flow.component.html.NativeLabelprotected voidprotected voidprotected voidcom.vaadin.flow.data.provider.DataProvider<V,?> protected voidprotected voidonDataChange(com.vaadin.flow.data.provider.DataChangeEvent<V> event) protected voidrecreateItems(Collection<V> newItems) protected voidsetDataProvider(com.vaadin.flow.data.provider.DataProvider<V, ?> dataProvider) voidvoidsetItemLabelGenerator(com.vaadin.flow.component.ItemLabelGenerator<V> itemLabelGenerator) voidsetItemsColumnLabel(String itemsColumnLabel) Label text for the items column.voidsetMaxHeight(String maxHeight) voidsetMaxWidth(String maxWidth) voidsetMinHeight(String minHeight) voidsetMinWidth(String minWidth) protected voidsetPresentationValue(Collection<V> newPresentationValue) voidsetReadOnly(boolean readOnly) voidsetReorderable(Boolean reorderable) Settingtruekeeps original items order in both columns.voidsetSelectAllButtonsVisible(Boolean selectAllButtonsVisible) Component provides the ability to select or deselect all items.voidsetSelectedItemsColumnLabel(String selectedItemsColumnLabel) Label text for the selected items column.voidprotected voidupdateColumnLabelPadding(com.vaadin.flow.component.html.NativeLabel label) protected voidupdateValueInternal(Collection<V> value) Methods inherited from class com.vaadin.flow.component.AbstractFieldaddValueChangeListener, getEmptyValue, getValue, isEmpty, setModelValue, setValue, valueEqualsMethods inherited from class com.vaadin.flow.component.ComponentaddListener, findAncestor, fireEvent, from, get, getChildren, getElement, 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, setVisibleMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifieraddAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifieraddDetachListenerMethods inherited from interface com.vaadin.flow.component.HasAriaLabelgetAriaLabel, getAriaLabelledBy, setAriaLabel, setAriaLabelledByMethods inherited from interface com.vaadin.flow.component.HasElementgetElementMethods inherited from interface com.vaadin.flow.component.HasEnabledisEnabled, setEnabledMethods inherited from interface com.vaadin.flow.component.HasHelpergetHelperComponent, getHelperText, setHelperComponent, setHelperTextMethods inherited from interface com.vaadin.flow.component.HasLabelgetLabel, setLabelMethods inherited from interface com.vaadin.flow.data.provider.HasListDataViewsetItems, setItemsMethods inherited from interface com.vaadin.flow.component.HasSizegetHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeightFull, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyleaddClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.HasThemeaddThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface com.vaadin.flow.component.shared.HasThemeVariantaddThemeVariants, removeThemeVariantsMethods inherited from interface com.vaadin.flow.component.HasValueclear, getOptionalValueMethods inherited from interface com.vaadin.flow.component.HasValueAndElementisReadOnly, isRequiredIndicatorVisible, setRequiredIndicatorVisible
- 
Field Details- 
itemsColumnLabelprotected com.vaadin.flow.component.html.NativeLabel itemsColumnLabel
- 
selectedItemsColumnLabelprotected com.vaadin.flow.component.html.NativeLabel selectedItemsColumnLabel
- 
items
- 
selectedItems
- 
actionsPanelprotected com.vaadin.flow.component.orderedlayout.VerticalLayout actionsPanel
- 
selectItemsprotected com.vaadin.flow.component.button.Button selectItems
- 
selectAllItemsprotected com.vaadin.flow.component.button.Button selectAllItems
- 
deselectItemsprotected com.vaadin.flow.component.button.Button deselectItems
- 
deselectAllItemsprotected com.vaadin.flow.component.button.Button deselectAllItems
- 
itemsData
- 
itemsListeners
- 
selectedItemsListeners
- 
columnToScrollValue
- 
columnsWithSavedScrollPosition
- 
reorderableprotected boolean reorderable
- 
saveAndRestoreColumnsScrollTopPositionprotected boolean saveAndRestoreColumnsScrollTopPosition
 
- 
- 
Constructor Details- 
JmixTwinColumnpublic JmixTwinColumn()
 
- 
- 
Method Details- 
setReorderableSettingtruekeeps original items order in both columns. Settingfalseorganize items in order of their selection or deselection.- Parameters:
- reorderable- keep original order or not
 
- 
isReorderable- Returns:
- trueif component keeps original order of items in both columns
 
- 
setSelectAllButtonsVisibleComponent provides the ability to select or deselect all items. This feature is disabled by default. Settingtrueshows two buttons to select or deselect all items.
- 
isSelectAllButtonsVisible- Returns:
- trueif the buttons for selecting and deselection all items are visible,- falseotherwise
 
- 
setItemsColumnLabelLabel text for the items column. It is placed under the items column
- 
getItemsColumnLabel- Returns:
- the items column label text
 
- 
setSelectedItemsColumnLabelLabel text for the selected items column. It is placed under the selected items column
- 
getSelectedItemsColumnLabel- Returns:
- the selected items column label text
 
- 
setReadOnlypublic void setReadOnly(boolean readOnly) - Specified by:
- setReadOnlyin interface- com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixTwinColumn<V>,- Collection<V>>, - Collection<V>> 
- Specified by:
- setReadOnlyin interface- com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixTwinColumn<V>,- Collection<V>>, - Collection<V>> 
 
- 
setMinWidth- Specified by:
- setMinWidthin interface- com.vaadin.flow.component.HasSize
 
- 
setWidth- Specified by:
- setWidthin interface- com.vaadin.flow.component.HasSize
 
- 
setMaxWidth- Specified by:
- setMaxWidthin interface- com.vaadin.flow.component.HasSize
 
- 
setMinHeight- Specified by:
- setMinHeightin interface- com.vaadin.flow.component.HasSize
 
- 
setHeight- Specified by:
- setHeightin interface- com.vaadin.flow.component.HasSize
 
- 
setMaxHeight- Specified by:
- setMaxHeightin interface- com.vaadin.flow.component.HasSize
 
- 
getDataProvider
- 
setItemspublic TwinColumnListDataView<V> setItems(com.vaadin.flow.data.provider.ListDataProvider<V> dataProvider) - Specified by:
- setItemsin interface- com.vaadin.flow.data.provider.HasListDataView<V,- TwinColumnListDataView<V>> 
 
- 
setItemspublic TwinColumnDataView<V> setItems(com.vaadin.flow.data.provider.DataProvider<V, Void> dataProvider) - Specified by:
- setItemsin interface- com.vaadin.flow.data.provider.HasDataView<V,- Void, - TwinColumnDataView<V>> 
 
- 
setItemspublic TwinColumnDataView<V> setItems(com.vaadin.flow.data.provider.InMemoryDataProvider<V> inMemoryDataProvider) - Specified by:
- setItemsin interface- com.vaadin.flow.data.provider.HasDataView<V,- Void, - TwinColumnDataView<V>> 
 
- 
getGenericDataView- Specified by:
- getGenericDataViewin interface- com.vaadin.flow.data.provider.HasDataView<V,- Void, - TwinColumnDataView<V>> 
 
- 
getListDataView- Specified by:
- getListDataViewin interface- com.vaadin.flow.data.provider.HasListDataView<V,- TwinColumnListDataView<V>> 
 
- 
setItemLabelGeneratorpublic void setItemLabelGenerator(com.vaadin.flow.component.ItemLabelGenerator<V> itemLabelGenerator) 
- 
setDataProvider
- 
setPresentationValue- Specified by:
- setPresentationValuein class- com.vaadin.flow.component.AbstractField<JmixTwinColumn<V>,- Collection<V>> 
 
- 
initComponentprotected void initComponent()
- 
createContentprotected void createContent()
- 
createColumnLabelsprotected void createColumnLabels()
- 
createColumnsprotected void createColumns()
- 
createButtonsPanelprotected void createButtonsPanel()
- 
createColumnLabelprotected com.vaadin.flow.component.html.NativeLabel createColumnLabel()
- 
createColumn
- 
createButtonprotected com.vaadin.flow.component.button.Button createButton(String className, com.vaadin.flow.component.icon.Icon icon, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button>> clickListener) 
- 
onDataChange
- 
columnItemDoubleClicked
- 
recreateItems
- 
updateValueInternal
- 
applyColumnItemLabelFormat
- 
updateColumnLabelPaddingprotected void updateColumnLabelPadding(com.vaadin.flow.component.html.NativeLabel label) 
 
-