public class FormLayout extends GeneratedVaadinFormLayout<FormLayout> implements HasSize, HasComponents, ClickNotifier<FormLayout>
<vaadin-form-layout> element.| Modifier and Type | Class and Description |
|---|---|
static class |
FormLayout.FormItem
Server-side component for the
<vaadin-form-item> element. |
static class |
FormLayout.ResponsiveStep
A class used in describing the responsive layouting behavior of a
FormLayout. |
| Constructor and Description |
|---|
FormLayout()
Constructs an empty layout.
|
FormLayout(Component... components)
Constructs a FormLayout with the given initial components.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Component component,
int colspan)
Adds a component with the desired colspan.
|
FormLayout.FormItem |
addFormItem(Component field,
Component label)
Convenience method for creating and adding a new FormItem to this layout
that wraps the given field with a component as its label.
|
FormLayout.FormItem |
addFormItem(Component field,
String label)
Convenience method for creating and adding a new FormItem to this layout
that wraps the given field with a label.
|
int |
getColspan(Component component)
Gets the colspan of the given component.
|
List<FormLayout.ResponsiveStep> |
getResponsiveSteps()
Get the list of
FormLayout.ResponsiveSteps used to configure this layout. |
void |
setColspan(Component component,
int colspan)
Sets the colspan of the given component's element.
|
void |
setResponsiveSteps(FormLayout.ResponsiveStep... steps)
Configure the responsive steps used in this layout.
|
void |
setResponsiveSteps(List<FormLayout.ResponsiveStep> steps)
Configure the responsive steps used in this layout.
|
getResponsiveStepsJsonObject, setResponsiveSteps, updateStylesaddListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCssSize, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFulladd, add, addComponentAsFirst, addComponentAtIndex, remove, removeAllisEnabled, setEnabledgetElementaddClickListener, addClickShortcutaddClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameaddAttachListeneraddDetachListenerpublic FormLayout()
HasComponents.add(Component...).public FormLayout(Component... components)
HasComponents.add(Component...).components - the components to addHasComponents.add(Component...)public void setColspan(Component component, int colspan)
add(Component, int).component - the component to set the colspan for, not nullcolspan - the desired colspan for the componentpublic void add(Component component, int colspan)
#add(Component) and setColspan(Component, int)component - the component to addcolspan - the desired colspan for the componentpublic int getColspan(Component component)
component - the component whose colspan is retrievedpublic List<FormLayout.ResponsiveStep> getResponsiveSteps()
FormLayout.ResponsiveSteps used to configure this layout.FormLayout.ResponsiveSteps used to configure this layoutFormLayout.ResponsiveSteppublic void setResponsiveSteps(List<FormLayout.ResponsiveStep> steps)
steps - list of FormLayout.ResponsiveSteps to setFormLayout.ResponsiveSteppublic void setResponsiveSteps(FormLayout.ResponsiveStep... steps)
steps - the FormLayout.ResponsiveSteps to setFormLayout.ResponsiveSteppublic FormLayout.FormItem addFormItem(Component field, String label)
addFormItem(field, new Label(label)).field - the field component to wraplabel - the label text to setaddFormItem(Component, Component)public FormLayout.FormItem addFormItem(Component field, Component label)
field - the field component to wraplabel - the label component to setCopyright © 2025. All rights reserved.