Enum SectionLayoutDefinition
- java.lang.Object
-
- java.lang.Enum<SectionLayoutDefinition>
-
- org.linkki.core.ui.creation.section.SectionLayoutDefinition
-
- All Implemented Interfaces:
Serializable,Comparable<SectionLayoutDefinition>,LinkkiLayoutDefinition
public enum SectionLayoutDefinition extends Enum<SectionLayoutDefinition> implements LinkkiLayoutDefinition
Defines how UI components are added to anLinkkiSection.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEFAULTUsesFormItemComponentWrappersfor section content.LABEL_ON_TOPUsesLabelComponentWrapperfor section content.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcreateChildren(Object parentComponent, Object pmo, BindingContext bindingContext)protected abstract VaadinComponentWrappercreateComponentWrapperAndAddComponentToSection(BaseSection section, com.vaadin.flow.component.html.Label label, com.vaadin.flow.component.Component component)Creates the component wrapper for the givenLabelandComponentand adds it to the givenBaseSection.static SectionLayoutDefinitionvalueOf(String name)Returns the enum constant of this type with the specified name.static SectionLayoutDefinition[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEFAULT
public static final SectionLayoutDefinition DEFAULT
UsesFormItemComponentWrappersfor section content. Labels are shown aside of the components.
-
LABEL_ON_TOP
public static final SectionLayoutDefinition LABEL_ON_TOP
UsesLabelComponentWrapperfor section content. Labels are shown on top of the components.
-
-
Method Detail
-
values
public static SectionLayoutDefinition[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SectionLayoutDefinition c : SectionLayoutDefinition.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SectionLayoutDefinition valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
createChildren
public void createChildren(Object parentComponent, Object pmo, BindingContext bindingContext)
The parent component must be an
LinkkiSection.- Specified by:
createChildrenin interfaceLinkkiLayoutDefinition- Throws:
ClassCastException- if the parent component is not anLinkkiSection.
-
createComponentWrapperAndAddComponentToSection
protected abstract VaadinComponentWrapper createComponentWrapperAndAddComponentToSection(BaseSection section, com.vaadin.flow.component.html.Label label, com.vaadin.flow.component.Component component)
Creates the component wrapper for the givenLabelandComponentand adds it to the givenBaseSection.Note that it is necessary to add the component directly to the section in this method. In case of a
FormItemComponentWrapper, theLabelComponentFormItemhas to be added to the section, and not the givenComponentitself. However, it is not possible to retrieve the createdLabelComponentFormItemfrom theFormItemComponentWrapperafter creation. Thus, theLabelComponentFormItemhas to be added to the section before it is returned.
-
-