Class FormLayout.FormItem
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.formlayout.FormLayout.FormItem
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.ClickNotifier<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
- Enclosing class:
- FormLayout
@Tag("vaadin-form-item")
@NpmPackage(value="@vaadin/form-layout",
version="25.0.0-alpha19")
@JsModule("@vaadin/form-layout/src/vaadin-form-item.js")
public static class FormLayout.FormItem
extends com.vaadin.flow.component.Component
implements com.vaadin.flow.component.HasComponents, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.ClickNotifier<FormLayout.FormItem>
Server-side component for the
<vaadin-form-item> element. Used to
wrap components for display in a FormLayout.- Author:
- Vaadin Ltd
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddToLabel(com.vaadin.flow.component.Component... components) Adds the given components as children of this component at the slot 'label'.voidremove(com.vaadin.flow.component.Component... components) Removes the given child components from this component.voidRemoves all contents from this component, this includes child components, text content as well as child elements that have been added directly to this component using theElementAPI.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, 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.ClickNotifier
addClickListener, addClickShortcut, addDoubleClickListener, addSingleClickListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasComponents
add, add, add, addComponentAsFirst, addComponentAtIndex, removeMethods 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.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Constructor Details
-
FormItem
public FormItem()Constructs an empty FormItem. Components to wrap can be added after construction withHasComponents.add(Component...).- See Also:
-
HasComponents.add(Component...)
-
FormItem
public FormItem(com.vaadin.flow.component.Component... components) Constructs a FormItem with the given initial components to wrap. Additional components can be added after construction withHasComponents.add(Component...).- Parameters:
components- the initial components to wrap as a form item.- See Also:
-
HasComponents.add(Component...)
-
-
Method Details
-
addToLabel
protected void addToLabel(com.vaadin.flow.component.Component... components) Adds the given components as children of this component at the slot 'label'.- Parameters:
components- The components to add.- See Also:
-
removeAll
public void removeAll()Removes all contents from this component, this includes child components, text content as well as child elements that have been added directly to this component using theElementAPI.- Specified by:
removeAllin interfacecom.vaadin.flow.component.HasComponents
-
remove
public void remove(com.vaadin.flow.component.Component... components) Removes the given child components from this component.- Specified by:
removein interfacecom.vaadin.flow.component.HasComponents- Parameters:
components- The components to remove.- Throws:
IllegalArgumentException- if any of the components is not a child of this component.
-