Class LabelComponentFormItem

  • All Implemented Interfaces:
    com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.formlayout.FormLayout.FormItem>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasComponents, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasStyle, Serializable

    public class LabelComponentFormItem
    extends com.vaadin.flow.component.formlayout.FormLayout.FormItem
    FormItem that only has one component as label. The label shares the required and invalid state with the component.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      LabelComponentFormItem​(com.vaadin.flow.component.Component component, com.vaadin.flow.component.html.Label label)
      Constructs a new LabelComponentFormItem which inherits required status indicator from the component wrapped in it.
      LabelComponentFormItem​(com.vaadin.flow.component.Component component, String label)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.vaadin.flow.component.Component getComponent()  
      com.vaadin.flow.component.html.Label getLabel()  
      void setLabel​(String text)  
      String toString()  
      • Methods inherited from class com.vaadin.flow.component.formlayout.FormLayout.FormItem

        remove, removeAll
      • Methods inherited from class com.vaadin.flow.component.formlayout.GeneratedVaadinFormItem

        addToLabel
      • Methods 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, scrollIntoView, set, setElement, setId, setVisible
      • Methods inherited from interface com.vaadin.flow.component.AttachNotifier

        addAttachListener
      • Methods inherited from interface com.vaadin.flow.component.ClickNotifier

        addClickListener, addClickShortcut
      • Methods inherited from interface com.vaadin.flow.component.DetachNotifier

        addDetachListener
      • Methods inherited from interface com.vaadin.flow.component.HasComponents

        add, add, add, addComponentAsFirst, addComponentAtIndex, remove
      • Methods inherited from interface com.vaadin.flow.component.HasElement

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

        isEnabled, setEnabled
      • Methods inherited from interface com.vaadin.flow.component.HasStyle

        addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
    • Constructor Detail

      • LabelComponentFormItem

        public LabelComponentFormItem​(com.vaadin.flow.component.Component component,
                                      String label)
      • LabelComponentFormItem

        public LabelComponentFormItem​(com.vaadin.flow.component.Component component,
                                      com.vaadin.flow.component.html.Label label)
        Constructs a new LabelComponentFormItem which inherits required status indicator from the component wrapped in it.
        Parameters:
        component - The field component
        label - The label
    • Method Detail

      • getComponent

        public com.vaadin.flow.component.Component getComponent()
      • getLabel

        public com.vaadin.flow.component.html.Label getLabel()
      • setLabel

        public void setLabel​(String text)