Class SubListSelector<T>

  • All Implemented Interfaces:
    com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasValue<com.vaadin.flow.component.HasValue.ValueChangeEvent<List<T>>,​List<T>>, Serializable

    public class SubListSelector<T>
    extends com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.VerticalLayout>
    implements com.vaadin.flow.component.HasValue<com.vaadin.flow.component.HasValue.ValueChangeEvent<List<T>>,​List<T>>, com.vaadin.flow.component.HasSize
    A field to pick a list of objects from a superset.

    Usage example: selecting runners to a relay team.

    See Also:
    Serialized Form
    • Nested Class Summary

      • 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

      Fields 
      Modifier and Type Field Description
      protected com.vaadin.flow.component.combobox.ComboBox<T> addToSelectionCb  
      protected com.vaadin.flow.component.grid.Grid<T> grid  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addDeleteButtonColumn()  
      com.vaadin.flow.shared.Registration addValueChangeListener​(com.vaadin.flow.component.HasValue.ValueChangeListener<? super com.vaadin.flow.component.HasValue.ValueChangeEvent<List<T>>> listener)  
      protected void configureGridColumns()  
      protected T createValueFromString​(String detail)  
      List<T> getValue()  
      boolean isReadOnly()  
      boolean isRequiredIndicatorVisible()  
      void setAvailableOptions​(List<T> options)  
      void setItemLabelGenerator​(com.vaadin.flow.component.ItemLabelGenerator<T> itemLabelGenerator)  
      void setReadOnly​(boolean readOnly)  
      void setRequiredIndicatorVisible​(boolean requiredIndicatorVisible)  
      void setValue​(List<T> value)  
      • Methods inherited from class com.vaadin.flow.component.Composite

        getChildren, getContent, getElement, initContent
      • Methods inherited from class com.vaadin.flow.component.Component

        addListener, fireEvent, from, get, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisible
      • 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.HasElement

        getElement
      • Methods inherited from interface com.vaadin.flow.component.HasSize

        getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull
      • Methods inherited from interface com.vaadin.flow.component.HasValue

        clear, getEmptyValue, getOptionalValue, isEmpty
    • Field Detail

      • addToSelectionCb

        protected com.vaadin.flow.component.combobox.ComboBox<T> addToSelectionCb
      • grid

        protected com.vaadin.flow.component.grid.Grid<T> grid
    • Constructor Detail

      • SubListSelector

        public SubListSelector​(Class<T> clazz)
    • Method Detail

      • setItemLabelGenerator

        public void setItemLabelGenerator​(com.vaadin.flow.component.ItemLabelGenerator<T> itemLabelGenerator)
      • createValueFromString

        protected T createValueFromString​(String detail)
      • configureGridColumns

        protected void configureGridColumns()
      • addDeleteButtonColumn

        protected void addDeleteButtonColumn()
      • setAvailableOptions

        public void setAvailableOptions​(List<T> options)
      • setValue

        public void setValue​(List<T> value)
        Specified by:
        setValue in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.HasValue.ValueChangeEvent<List<T>>,​List<T>>
      • getValue

        public List<T> getValue()
        Specified by:
        getValue in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.HasValue.ValueChangeEvent<List<T>>,​List<T>>
      • addValueChangeListener

        public com.vaadin.flow.shared.Registration addValueChangeListener​(com.vaadin.flow.component.HasValue.ValueChangeListener<? super com.vaadin.flow.component.HasValue.ValueChangeEvent<List<T>>> listener)
        Specified by:
        addValueChangeListener in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.HasValue.ValueChangeEvent<List<T>>,​List<T>>
      • setReadOnly

        public void setReadOnly​(boolean readOnly)
        Specified by:
        setReadOnly in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.HasValue.ValueChangeEvent<List<T>>,​List<T>>
      • isReadOnly

        public boolean isReadOnly()
        Specified by:
        isReadOnly in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.HasValue.ValueChangeEvent<List<T>>,​List<T>>
      • setRequiredIndicatorVisible

        public void setRequiredIndicatorVisible​(boolean requiredIndicatorVisible)
        Specified by:
        setRequiredIndicatorVisible in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.HasValue.ValueChangeEvent<List<T>>,​List<T>>
      • isRequiredIndicatorVisible

        public boolean isRequiredIndicatorVisible()
        Specified by:
        isRequiredIndicatorVisible in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.HasValue.ValueChangeEvent<List<T>>,​List<T>>