Class FormLayout

    • Field Detail

      • IN_FORM_LAYOUT_THEME

        public static final java.lang.String IN_FORM_LAYOUT_THEME
        See Also:
        Constant Field Values
    • Constructor Detail

      • FormLayout

        public FormLayout()
        Creates a new a FormLayout.
      • FormLayout

        public FormLayout​(com.vaadin.flow.component.Component... children)
        Constructs a FormLayout and adds the given components to it.
        Parameters:
        children - Components to add to the FormLayout
    • Method Detail

      • getExpandRatio

        @Deprecated
        public float getExpandRatio​(com.vaadin.flow.component.Component component)
        Deprecated.
        This method currently has no effect as expand ratios are not implemented in FormLayout.
        Overrides:
        getExpandRatio in class AbstractOrderedLayout
        Parameters:
        component - which expand ratios is requested
        Returns:
        expand ratio of given component, 0.0f by default.
      • setExpandRatio

        public void setExpandRatio​(com.vaadin.flow.component.Component component,
                                   float ratio)
        This method currently has no effect as expand ratios are not implemented in FormLayout.
        Overrides:
        setExpandRatio in class AbstractOrderedLayout
        Parameters:
        component - the component in this layout which expand ratio is to be set
        ratio - new expand ratio (greater or equal to 0)
      • getComponentIndex

        public int getComponentIndex​(com.vaadin.flow.component.Component component)
        Description copied from class: AbstractOrderedLayout
        Returns the index of the given component.
        Overrides:
        getComponentIndex in class AbstractOrderedLayout
        Parameters:
        component - The component to look up.
        Returns:
        The index of the component or -1 if the component is not a child.
      • getComponent

        public com.vaadin.flow.component.Component getComponent​(int index)
                                                         throws java.lang.IndexOutOfBoundsException
        Description copied from class: AbstractOrderedLayout
        Returns the component at the given position.
        Overrides:
        getComponent in class AbstractOrderedLayout
        Parameters:
        index - The position of the component.
        Returns:
        The component at the given index.
        Throws:
        java.lang.IndexOutOfBoundsException - If the index is out of range.
      • addComponent

        public void addComponent​(com.vaadin.flow.component.Component component,
                                 int index)
                          throws java.lang.IndexOutOfBoundsException
        Description copied from class: AbstractOrderedLayout
        Adds a component into indexed position in this container.
        Overrides:
        addComponent in class AbstractOrderedLayout
        Parameters:
        component - the component to be added.
        index - the index of the component position. The components currently in and after the position are shifted forwards.
        Throws:
        java.lang.IndexOutOfBoundsException
      • setSlotClasses

        protected void setSlotClasses()
        This method currently has no effect since the FormLayout has the table as its only child.
        Overrides:
        setSlotClasses in class AbstractOrderedLayout