Package com.storedobject.ui
Class FormSection
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.HtmlComponent
com.vaadin.flow.component.HtmlContainer
com.vaadin.flow.component.html.Div
com.storedobject.ui.Card.Cell
com.storedobject.ui.Card.Row
com.storedobject.ui.FormSection
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.html.Div>,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasComponents,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasOrderedComponents,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.HasText,Serializable
Represents a section of a form, designed as a horizontal row layout for
arranging components. A
FormSection typically includes a name
component and a styled line, which can also be customized in terms of span
and height.- Author:
- Syam
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTheEndclass is a specialized subclass ofCard.Line, intended to represent a terminating component or marker within a layout structure.Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasText
com.vaadin.flow.component.HasText.WhiteSpace -
Constructor Summary
ConstructorsConstructorDescriptionConstructs aFormSectionwith a default column span of 2.FormSection(int span) Constructs aFormSectionwith the specified number of column spans and an empty name.FormSection(com.vaadin.flow.component.Component name) Constructs a FormSection with the specified component as its name.FormSection(com.vaadin.flow.component.Component name, int span) Constructs a FormSection with a specified name component and column span.FormSection(String name) Constructs a new FormSection with the specified name.FormSection(String name, int span) Constructs a new FormSection with the specified name and span. -
Method Summary
Modifier and TypeMethodDescriptiongetLine()Retrieves the line associated with the card.com.vaadin.flow.component.ComponentgetName()Retrieves the name component associated with this instance.voidsetColumnSpan(int span) Sets the column span attribute for the current element.voidsetName(com.vaadin.flow.component.Component name) Sets the name component for this object and updates its layout.voidUpdates the name property with the provided value.Methods inherited from class com.storedobject.ui.Card.Cell
alignBottom, alignCenter, alignTop, justifyCenter, justifyLeft, justifyRight, setGapMethods inherited from class com.vaadin.flow.component.HtmlComponent
getTitle, setTitleMethods 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, remove, remove, removeAllMethods 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.HasOrderedComponents
getChildren, getComponentAt, getComponentCount, indexOf, replaceMethods 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, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.HasText
getText, getWhiteSpace, setText, setWhiteSpace
-
Constructor Details
-
FormSection
public FormSection()Constructs aFormSectionwith a default column span of 2. Delegates to the constructor that accepts a single integer parameter, defaulting the column span when unspecified. -
FormSection
Constructs a new FormSection with the specified name. This constructor initializes the object with a default column span of 2.- Parameters:
name- the name of the form section
-
FormSection
public FormSection(com.vaadin.flow.component.Component name) Constructs a FormSection with the specified component as its name. This constructor initializes the object with a default column span of 2.- Parameters:
name- the component to be used as the name or label for the section
-
FormSection
public FormSection(int span) Constructs aFormSectionwith the specified number of column spans and an empty name.- Parameters:
span- the number of column spans; if less than 1, it defaults to 2
-
FormSection
Constructs a new FormSection with the specified name and span.- Parameters:
name- the name of the form sectionspan- the number of columns or space the form section spans
-
FormSection
public FormSection(com.vaadin.flow.component.Component name, int span) Constructs a FormSection with a specified name component and column span.- Parameters:
name- the component to be used as the name or label for the section.span- the number of columns the section should span.
-
-
Method Details
-
setColumnSpan
public void setColumnSpan(int span) Sets the column span attribute for the current element. The column span determines how many columns the element should span across in a grid or table layout. If the provided span is less than 1, a default value of 2 will be used.- Parameters:
span- the desired number of columns the element should span. Must be a positive integer; if less than 1, defaults to 2.
-
getName
public com.vaadin.flow.component.Component getName()Retrieves the name component associated with this instance.- Returns:
- the name component
-
setName
public void setName(com.vaadin.flow.component.Component name) Sets the name component for this object and updates its layout.- Parameters:
name- the Component to be set as the name; can be null
-
setName
Updates the name property with the provided value. Depending on the type of the current name property, this method will either modify its content or assign a new value.- Parameters:
name- the new name to be set for this instance
-
getLine
Retrieves the line associated with the card.- Returns:
- the line of type Card.Line
-