Class BorderLayout

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

public class BorderLayout extends AbstractLayout
Border layout allows to place content into five regions. Each region may contain no more than one component.
Author:
Vaadin Ltd
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The center layout constraint (middle of container).
    static final String
    The component goes at the end of the line direction for the layout (for left-to-right direction, it is located on the right).
    static final String
    The component goes at the beginning of the line direction for the layout (for left-to-right direction, it is located on the left).
    static final String
    The component comes after the last line of the layout's content.
    static final String
    The component comes before the first line of the layout's content.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new a BorderLayout with no gaps between components.
    BorderLayout(int hgap, int vgap)
    Constructs a new BorderLayout using the provided horizontal and vertical gap between components.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addComponent(com.vaadin.flow.component.Component component)
     
    getConstraints(com.vaadin.flow.component.Component component)
     
    int
    Returns the horizontal gap between components.
    int
    Returns the vertical gap between components.
    protected void
    onContainerAttach(com.vaadin.flow.component.AttachEvent event)
     
    void
    removeComponent(com.vaadin.flow.component.Component component)
     
    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.
    void
    setVgap(int vgap)
    Sets the vertical gap between components.

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

    getComponents, getContainer, onContainerDetach

    Methods inherited from class java.lang.Object

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

    • CENTER

      public static final String CENTER
      The center layout constraint (middle of container).
      See Also:
    • PAGE_START

      public static final String PAGE_START
      The component comes before the first line of the layout's content.
      See Also:
    • PAGE_END

      public static final String PAGE_END
      The component comes after the last line of the layout's content.
      See Also:
    • LINE_START

      public static final String LINE_START
      The component goes at the beginning of the line direction for the layout (for left-to-right direction, it is located on the left).
      See Also:
    • LINE_END

      public static final String LINE_END
      The component goes at the end of the line direction for the layout (for left-to-right direction, it is located on the right).
      See Also:
  • Constructor Details

    • BorderLayout

      public BorderLayout()
      Constructs a new a BorderLayout with no gaps between components.
    • BorderLayout

      public BorderLayout(int hgap, int vgap)
      Constructs a new BorderLayout using the provided horizontal and vertical gap between components.
      Parameters:
      hgap - The horizontal gap to set.
      vgap - The vertical gap to set.
      See Also:
  • 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
    • addComponent

      public void addComponent(com.vaadin.flow.component.Component component)
      Overrides:
      addComponent in class AbstractLayout
    • removeComponent

      public void removeComponent(com.vaadin.flow.component.Component component)
      Overrides:
      removeComponent in class AbstractLayout
    • setConstraints

      public void setConstraints(com.vaadin.flow.component.Component component, Object constraints)
      Specified by:
      setConstraints in class AbstractLayout
    • getConstraints

      public Object getConstraints(com.vaadin.flow.component.Component component)
      Specified by:
      getConstraints in class AbstractLayout
    • getHgap

      public int getHgap()
      Returns the horizontal gap between components.
      Returns:
      the horizontal gap between components
    • setHgap

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

      public int getVgap()
      Returns the vertical gap between components.
      Returns:
      the vertical gap between components
    • setVgap

      public void setVgap(int vgap)
      Sets the vertical gap between components.
      Parameters:
      vgap - the vertical gap between components