Class CardLayout

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

public class CardLayout extends AbstractLayout
Card layout treats each component in the container as a card. Only one card is visible at a time, and the container acts as a stack of cards.
Author:
Vaadin Ltd
See Also:
  • Constructor Details

    • CardLayout

      public CardLayout()
      Constructs a new a CardLayout with no gaps between edges of a container and the current component.
    • CardLayout

      public CardLayout(int hgap, int vgap)
      Constructs a new CardLayout using the provided horizontal and vertical gap between edges of a container and the current component.
      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 the left and right edges of a container and the current component.
      Returns:
      the horizontal gap between the left and right edges of a container and the current component.
    • setHgap

      public void setHgap(int hgap)
      Sets the horizontal gap between the left and right edges of a container and the current component.
      Parameters:
      hgap - the horizontal gap between the left and right edges of a container and the current component.
    • getVgap

      public int getVgap()
      Returns the vertical gap between the top and bottom edges of a container and the current component.
      Returns:
      the vertical gap between the top and bottom edges of a container and the current component
    • setVgap

      public void setVgap(int vgap)
      Sets the vertical gap between the top and bottom edges of a container and the current component.
      Parameters:
      vgap - the vertical gap between the top and bottom edges of a container and the current component
    • first

      public void first()
    • last

      public void last()
    • previous

      public void previous()
    • next

      public void next()
    • show

      public void show(String name)
    • getCards

      public List<com.vaadin.flow.component.Component> getCards()
    • getCurrentCard

      public int getCurrentCard()
    • setCurrentCard

      public void setCurrentCard(int currentCard)