Package com.vaadin.ui

Class FormLayout

    • Method Detail

      • setExpandRatio

        @Deprecated
        public void setExpandRatio​(Component component,
                                   float ratio)
        Deprecated.
        This method currently has no effect as expand ratios are not implemented in FormLayout
        Description copied from class: AbstractOrderedLayout

        This method is used to control how excess space in layout is distributed among components. Excess space may exist if layout is sized and contained non relatively sized components don't consume all available space.

        Example how to distribute 1:3 (33%) for component1 and 2:3 (67%) for component2 : layout.setExpandRatio(component1, 1);
        layout.setExpandRatio(component2, 2);

        If no ratios have been set, the excess space is distributed evenly among all components.

        Note, that width or height (depending on orientation) needs to be defined for this method to have any effect.

        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)
        See Also:
        Sizeable
      • getExpandRatio

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

        protected FormLayoutState getState()
        Description copied from class: AbstractComponent
        Returns the shared state bean with information to be sent from the server to the client. Subclasses should override this method and set any relevant fields of the state returned by super.getState().
        Overrides:
        getState in class AbstractOrderedLayout
        Returns:
        updated component shared state