Class SlideTabBuilder

java.lang.Object
com.lipisak.vaadin.slidetab.SlideTabBuilder

public class SlideTabBuilder extends Object
Since:
12/10/2018
Author:
eriklumme
  • Field Details

    • content

      protected com.vaadin.flow.component.Component content
    • mode

      protected SlideMode mode
    • expanded

      protected boolean expanded
    • flowInContent

      protected boolean flowInContent
    • tabVisible

      protected boolean tabVisible
    • tabSize

      protected int tabSize
    • listeners

      protected List<com.vaadin.flow.component.ComponentEventListener<SlideToggleEvent>> listeners
    • caption

      protected String caption
    • tabPosition

      protected SlideTabPosition tabPosition
    • animationDuration

      protected int animationDuration
    • styles

      protected List<String> styles
    • pixel

      protected int pixel
    • autoCollapseSlider

      protected boolean autoCollapseSlider
    • zIndex

      protected int zIndex
    • scheduleStrategy

      protected ScheduleStrategy scheduleStrategy
  • Constructor Details

    • SlideTabBuilder

      public SlideTabBuilder(com.vaadin.flow.component.Component content)
      creates an builder instance that can be configured fluently
      Parameters:
      content - that is wrapped by the SliderPanel
      typically it's a Vertical or HorizontalLayout
    • SlideTabBuilder

      public SlideTabBuilder(com.vaadin.flow.component.Component content, String caption)
      creates an builder instance that can be configured fluently
      Parameters:
      content - that is wrapped by the SliderPanel
      typically it's a Vertical or HorizontalLayout
      caption - of the slider navigation element
  • Method Details

    • mode

      public SlideTabBuilder mode(SlideMode mode)
      Which type of display you want to have
      Parameters:
      mode - default TOP
      Returns:
      builder
    • expanded

      public SlideTabBuilder expanded(boolean expanded)
      Should the slider be expanded on intial paint
      Parameters:
      expanded - default false
      Returns:
      builder
    • flowInContent

      public SlideTabBuilder flowInContent(boolean flowInContent)
      Should the navigator flow within the content of the other layouts below
      Parameters:
      flowInContent - default false
      Returns:
      builder
    • tabSize

      public SlideTabBuilder tabSize(int tabSize)
      allows to change the short width/height of the tab-caption
      you need to change also your css when you change from default value
      important need to get setted before first attach!
      Parameters:
      tabSize - default 40
      Returns:
      builder
    • listener

      public SlideTabBuilder listener(com.vaadin.flow.component.ComponentEventListener<SlideToggleEvent> listener)
      add the listener to the list of Listeners
      Parameters:
      listener - instance of com.vaadin.flow.component.ComponentEventListener<SlideToggleEvent>
    • caption

      public SlideTabBuilder caption(String caption)
      set caption
      Parameters:
      caption - of the slider navigation element
      Returns:
      builder
    • tabPosition

      public SlideTabBuilder tabPosition(SlideTabPosition tabPosition)
      Which type of display you want to have
      This controls the position of the navigation element within the SlideTab total area
      Parameters:
      tabPosition - default BEGINNING
      Returns:
      builder
    • tabVisible

      public SlideTabBuilder tabVisible(boolean tabVisible)
      Sets the visibility of the tab used for opening or closing the panel.
      Parameters:
      tabVisible - True (default) if the tab should be visible
      Returns:
      This builder
    • animationDuration

      public SlideTabBuilder animationDuration(int animationDuration)
      How long a collapse/expand should take in milliseconds
      Parameters:
      animationDuration - defaul 500
      Returns:
      builder
    • style

      public SlideTabBuilder style(String... style)
      add a style to the sliderPanel
      Parameters:
      style - style that should get added
      Returns:
      builder
    • fixedContentSize

      public SlideTabBuilder fixedContentSize(int pixel)
      by default the SlideTab calculates it's content width/height (depending on it's mode)
      in some cases it's useful to programmatically set this value
      Parameters:
      pixel - width/height (depending on it's mode)
      Returns:
      builder
    • autoCollapseSlider

      public SlideTabBuilder autoCollapseSlider(boolean autoCollapseSlider)
      by default the SlideTab stays open when use clicks outside
      when you enable autoCollapse the slider closes in mode of expand when user clicks somewhere else
      Parameters:
      autoCollapseSlider - enable auto collapse in expand state
      Returns:
      builder
    • zIndex

      public SlideTabBuilder zIndex(int zIndex)
      z-Index of navigator, content and wrapper
      you can specify for multiple sliders which lays above another
      Parameters:
      zIndex - default 9990
      Returns:
    • scheduleStrategy

      public SlideTabBuilder scheduleStrategy(ScheduleStrategy scheduleStrategy)
      Can be overridden to gain more control over how collapse/expand commands are scheduled, for example what threads are used.
    • build

      public SlideTab build()
      generates the SliderPanel
      Returns:
      instance of configured SlideTab