Class BaseCardLayout

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

public class BaseCardLayout extends Object implements Serializable
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:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected List<com.vaadin.flow.component.Component>
     
    protected int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Shows the first card and hides all the others.
    List<com.vaadin.flow.component.Component>
     
    int
     
    void
    Shows the last card and hides all the others.
    void
    Shows the next card and hides all the others.
    void
    Shows the previous card and hides all the others.
    void
    setCurrentCard(int currentCard)
     
    void
    show(String name)
    Shows the component that was added to this layout with the specified name, using
    invalid reference
    #setConstraints(Component, Object)
    .

    Methods inherited from class java.lang.Object

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

    • currentCard

      protected int currentCard
    • cards

      protected List<com.vaadin.flow.component.Component> cards
  • Constructor Details

    • BaseCardLayout

      public BaseCardLayout()
  • Method Details

    • first

      public void first()
      Shows the first card and hides all the others.
    • last

      public void last()
      Shows the last card and hides all the others.
    • previous

      public void previous()
      Shows the previous card and hides all the others. If the currently visible card is the first one, the last card is shown.
    • next

      public void next()
      Shows the next card and hides all the others. If the currently visible card is the last one, the first card is shown.
    • show

      public void show(String name)
      Shows the component that was added to this layout with the specified name, using
      invalid reference
      #setConstraints(Component, Object)
      . If no such component exists, then nothing happens.
      Parameters:
      name - the component name
    • getCards

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

      public int getCurrentCard()
    • setCurrentCard

      public void setCurrentCard(int currentCard)