Class FlowLayout

java.lang.Object
com.vaadin.featurepack.desktop.layouts.AbstractLayout
com.vaadin.featurepack.desktop.layouts.FlowLayout
All Implemented Interfaces:
Serializable

public class FlowLayout extends AbstractLayout
Flow layout arranges components in a directional flow.
Author:
Vaadin Ltd
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new FlowLayout with a centered alignment and a default 5-pixels horizontal and vertical gap.
    FlowLayout(int align)
    Constructs a new FlowLayout with the specified alignment and a default 5-pixels horizontal and vertical gap.
    FlowLayout(int align, int hgap, int vgap)
    Constructs a new FlowLayout with the specified alignment and the indicated horizontal and vertical gaps.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getConstraints(com.vaadin.flow.component.Component component)
     
    int
    Returns the horizontal gap between components and between the components and the borders of the container.
    int
    Returns the vertical gap between components and between the components and the borders of the container.
    protected void
    onContainerAttach(com.vaadin.flow.component.AttachEvent event)
     
    void
    setAlignment(int align)
    void
    setConstraints(com.vaadin.flow.component.Component component, Object constraints)
     
    void
    setContainer(com.vaadin.flow.component.Component container)
     
    void
    setHgap(int hgap)
    Sets the horizontal gap between components and between the components and the borders of the container.
    void
    setVgap(int vgap)
    Sets the vertical gap between components and between the components and the borders of the container.

    Methods inherited from class com.vaadin.featurepack.desktop.layouts.AbstractLayout

    addComponent, getComponents, getContainer, onContainerDetach, removeComponent

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FlowLayout

      public FlowLayout()
      Constructs a new FlowLayout with a centered alignment and a default 5-pixels horizontal and vertical gap.
    • FlowLayout

      public FlowLayout(int align)
      Constructs a new FlowLayout with the specified alignment and a default 5-pixels horizontal and vertical gap.
      Parameters:
      align - the alignment value
    • FlowLayout

      public FlowLayout(int align, int hgap, int vgap)
      Constructs a new FlowLayout with the specified alignment and the indicated horizontal and vertical gaps.
      Parameters:
      align - the alignment value
      hgap - the horizontal gap between components and between the components and the borders of the container
      vgap - the vertical gap between components and between the components and the borders of the container
  • Method Details

    • onContainerAttach

      protected void onContainerAttach(com.vaadin.flow.component.AttachEvent event)
      Overrides:
      onContainerAttach in class AbstractLayout
    • setContainer

      public void setContainer(com.vaadin.flow.component.Component container)
      Overrides:
      setContainer in class AbstractLayout
    • getHgap

      public int getHgap()
      Returns the horizontal gap between components and between the components and the borders of the container.
      Returns:
      the horizontal gap between components and between the components and the borders of the container
    • setHgap

      public void setHgap(int hgap)
      Sets the horizontal gap between components and between the components and the borders of the container.
      Parameters:
      hgap - the horizontal gap between components and between the components and the borders of the container
    • getVgap

      public int getVgap()
      Returns the vertical gap between components and between the components and the borders of the container.
      Returns:
      the vertical gap between components and between the components and the borders of the container
    • setVgap

      public void setVgap(int vgap)
      Sets the vertical gap between components and between the components and the borders of the container.
      Parameters:
      vgap - the vertical gap between components and between the components and the borders of the container
    • setConstraints

      public void setConstraints(com.vaadin.flow.component.Component component, Object constraints)
      Specified by:
      setConstraints in class AbstractLayout
      Throws:
      UnsupportedOperationException - FlowLayout does not support constraints
    • getConstraints

      public Object getConstraints(com.vaadin.flow.component.Component component)
      Specified by:
      getConstraints in class AbstractLayout
      Throws:
      UnsupportedOperationException - FlowLayout does not support constraints
    • setAlignment

      public void setAlignment(int align)
      Parameters:
      align -
    • getAlignment

      public int getAlignment()
      Parameters:
      align -