Class TabControl

All Implemented Interfaces:
Control, Enableable, HasAttribute, HasClassName, HasComputedStyle, HasControlText, HasDestroy, HasStyle, HasTooltip, HasVisibility

public final class TabControl extends AbstractDwcControl
  • Field Details

    • tabCtrl

      protected com.basis.bbj.proxies.sysgui.BBjTabCtrl tabCtrl
  • Constructor Details

    • TabControl

      public TabControl()
  • Method Details

    • create

      protected void create(AbstractDwcjPanel p)
      Description copied from class: AbstractControl
      Create the object on a panel p. The preferred way of creating an object is using the Panel::add(Control) method, instead of this
      Overrides:
      create in class AbstractControl
      Parameters:
      p - the panel to add this control on
    • setText

      public TabControl setText(String text)
      Description copied from interface: HasControlText
      set the text of the control Each control implementing this interface has a text property, which might be visible in different ways (caption, title, contents of edit) or sometimes not visible at all
      Specified by:
      setText in interface HasControlText
      Overrides:
      setText in class AbstractDwcControl
      Returns:
      the control itself
    • setVisible

      public TabControl setVisible(Boolean visible)
      Description copied from interface: HasVisibility
      Set whether the control is visible or invisible
      Specified by:
      setVisible in interface HasVisibility
      Overrides:
      setVisible in class AbstractDwcControl
      Returns:
      the control itself
    • setEnabled

      public TabControl setEnabled(Boolean enabled)
      Description copied from interface: Enableable
      Set whether the control is to be enabled
      Specified by:
      setEnabled in interface Enableable
      Overrides:
      setEnabled in class AbstractDwcControl
      Returns:
      the control itself
    • setTooltipText

      public TabControl setTooltipText(String text)
      Description copied from interface: HasTooltip
      Set the tooltip text of the control
      Specified by:
      setTooltipText in interface HasTooltip
      Overrides:
      setTooltipText in class AbstractDwcControl
      Returns:
      the control itself
    • setAttribute

      public TabControl setAttribute(String attribute, String value)
      Description copied from class: AbstractDwcControl
      set the value for an attribute in the control
      Specified by:
      setAttribute in interface HasAttribute
      Overrides:
      setAttribute in class AbstractDwcControl
      Parameters:
      attribute - the name of the attribute
      value - the value to be set
      Returns:
      the control itself
    • setId

      public TabControl setId(String elementId)
      Description copied from interface: Control
      Assigns the ID of a control
      Specified by:
      setId in interface Control
      Overrides:
      setId in class AbstractControl
      Parameters:
      elementId - Desired ID designation
      Returns:
      The control itself
    • setStyle

      public TabControl setStyle(String property, String value)
      Description copied from interface: HasStyle
      Assigns specified value to the specified CSS property
      Specified by:
      setStyle in interface HasStyle
      Overrides:
      setStyle in class AbstractDwcControl
      Parameters:
      property - The CSS property to be changed
      value - The value of the selected CSS property
      Returns:
      The control itself
    • addClassName

      public TabControl addClassName(String selector)
      Description copied from interface: HasClassName
      Adds a CSS class to the list of CSS classes for the control.
      Specified by:
      addClassName in interface HasClassName
      Overrides:
      addClassName in class AbstractDwcControl
      Returns:
      The control itself
    • removeClassName

      public TabControl removeClassName(String selector)
      Description copied from interface: HasClassName
      Removes a CSS class from the list of CSS classes for the control.
      Specified by:
      removeClassName in interface HasClassName
      Overrides:
      removeClassName in class AbstractDwcControl
      Returns:
      The control itself
    • setExpanse

      public TabControl setExpanse(TabControl.Expanse expanse)
    • setTheme

      public TabControl setTheme(TabControl.Theme theme)
    • addTab

      public TabControl addTab(String text)
      Add a tab to the tab control
      Parameters:
      text - the text to display on the tab control
      Returns:
    • addTab

      public TabControl addTab(String text, Div panel)
      Add a tab and add a Div to it. Important: The DIV has to exist on the parent panel, you need to call "add" before passing it to the tab control.
      Parameters:
      text - The text for the tab
      panel - the panel to attach to the tab
      Returns:
      the Tab Control object
    • setPanelAt

      public TabControl setPanelAt(int index, Div panel)
      Put a DIV under an existing tab Important: The DIV has to exist on the parent panel, you need to call "add" before passing it to the tab control.
      Parameters:
      index - the zero-based index of the tab
      panel - the DIV panel to put under the tab
      Returns:
      the Tab Control object itself
    • onTabSelect

      public TabControl onTabSelect(Consumer<TabSelectEvent> callback)
      register an event callback for the click event
      Parameters:
      callback - A method to receive the click event
      Returns:
      the control itself