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>,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>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.component.AbstractField
com.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.HasValue
com.vaadin.flow.component.HasValue.ValueChangeEvent<V extends Object>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>> -
Field Summary
FieldsModifier 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 Summary
Constructors -
Method Summary
Modifier 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 voidprotected voidprotected voidrecreateOptions(Collection<V> newOptions) voidvoidsetMaxHeight(String maxHeight) voidsetMaxWidth(String maxWidth) voidsetMinHeight(String minHeight) voidsetMinWidth(String minWidth) voidsetOptionsColumnLabel(String optionsColumnLabel) Label text for the options column.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.AbstractField
addValueChangeListener, getEmptyValue, getValue, isEmpty, setModelValue, setValue, valueEqualsMethods 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, onAttach, onDetach, 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.HasAriaLabel
getAriaLabel, getAriaLabelledBy, setAriaLabel, setAriaLabelledByMethods 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.component.HasHelper
getHelperComponent, getHelperText, setHelperComponent, setHelperTextMethods inherited from interface com.vaadin.flow.component.HasLabel
getLabel, setLabelMethods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeightFull, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant
addThemeVariants, removeThemeVariantsMethods inherited from interface com.vaadin.flow.component.HasValue
clear, getOptionalValueMethods inherited from interface com.vaadin.flow.component.HasValueAndElement
isReadOnly, isRequiredIndicatorVisible, setRequiredIndicatorVisible
-
Field Details
-
optionsColumnLabel
protected com.vaadin.flow.component.html.NativeLabel optionsColumnLabel -
selectedItemsColumnLabel
protected com.vaadin.flow.component.html.NativeLabel selectedItemsColumnLabel -
options
-
selected
-
actionsPanel
protected com.vaadin.flow.component.orderedlayout.VerticalLayout actionsPanel -
selectItems
protected com.vaadin.flow.component.button.Button selectItems -
selectAllItems
protected com.vaadin.flow.component.button.Button selectAllItems -
deselectItems
protected com.vaadin.flow.component.button.Button deselectItems -
deselectAllItems
protected com.vaadin.flow.component.button.Button deselectAllItems -
optionsData
-
optionsListeners
-
selectedListeners
-
columnToScrollValue
-
columnsWithSavedScrollPosition
-
reorderable
protected boolean reorderable -
saveAndRestoreColumnsScrollTopPosition
protected boolean saveAndRestoreColumnsScrollTopPosition
-
-
Constructor Details
-
JmixTwinColumn
public JmixTwinColumn()
-
-
Method Details
-
setReorderable
Settingtruekeeps 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
-
setSelectAllButtonsVisible
Component 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
-
setOptionsColumnLabel
Label text for the options column. It is placed under the options column -
getOptionsColumnLabel
- Returns:
- the options column label text
-
setSelectedItemsColumnLabel
Label text for the selected items column. It is placed under the selected items column -
getSelectedItemsColumnLabel
- Returns:
- the selected items column label text
-
setReadOnly
public void setReadOnly(boolean readOnly) - Specified by:
setReadOnlyin interfacecom.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixTwinColumn<V>,Collection<V>>, Collection<V>> - Specified by:
setReadOnlyin interfacecom.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixTwinColumn<V>,Collection<V>>, Collection<V>>
-
setMinWidth
- Specified by:
setMinWidthin interfacecom.vaadin.flow.component.HasSize
-
setWidth
- Specified by:
setWidthin interfacecom.vaadin.flow.component.HasSize
-
setMaxWidth
- Specified by:
setMaxWidthin interfacecom.vaadin.flow.component.HasSize
-
setMinHeight
- Specified by:
setMinHeightin interfacecom.vaadin.flow.component.HasSize
-
setHeight
- Specified by:
setHeightin interfacecom.vaadin.flow.component.HasSize
-
setMaxHeight
- Specified by:
setMaxHeightin interfacecom.vaadin.flow.component.HasSize
-
setPresentationValue
- Specified by:
setPresentationValuein classcom.vaadin.flow.component.AbstractField<JmixTwinColumn<V>,Collection<V>>
-
initComponent
protected void initComponent() -
createContent
protected void createContent() -
createColumnLabels
protected void createColumnLabels() -
createColumns
protected void createColumns() -
createButtonsPanel
protected void createButtonsPanel() -
createColumnLabel
protected com.vaadin.flow.component.html.NativeLabel createColumnLabel() -
createColumn
-
createButton
protected 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) -
columnItemDoubleClicked
-
recreateOptions
-
updateValueInternal
-
applyColumnItemLabelFormat
-
updateColumnLabelPadding
protected void updateColumnLabelPadding(com.vaadin.flow.component.html.NativeLabel label)
-