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.ResponsiveStep s 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, updateStyles
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCssSize, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull
add, add, addComponentAsFirst, addComponentAtIndex, remove, removeAll
isEnabled, setEnabled
getElement
addClickListener, addClickShortcut
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
addAttachListener
addDetachListener
public 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 null
colspan
- 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.ResponsiveStep
s used to configure this layout.FormLayout.ResponsiveStep
s used to configure this layoutFormLayout.ResponsiveStep
public void setResponsiveSteps(List<FormLayout.ResponsiveStep> steps)
steps
- list of FormLayout.ResponsiveStep
s to setFormLayout.ResponsiveStep
public void setResponsiveSteps(FormLayout.ResponsiveStep... steps)
steps
- the FormLayout.ResponsiveStep
s to setFormLayout.ResponsiveStep
public 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 © 2021. All rights reserved.