Interface UiTabPanel

    • Method Detail

      • addTab

        default UiTab addTab​(String text,
                             Supplier<UiRegularWidget> childSupplier)
        Adds a new tab (and the end of all existing tabs) with the content provided lazily from the given Supplier (when the tab is selected for the first time).
        Parameters:
        text - the label that will be displayed to identify the tab.
        childSupplier - the Supplier providing the tab content. Allows lazy creation of the child when the tab is selected for the first time.
        Returns:
        the UiTab for this tab.
      • addTab

        UiTab addTab​(String text,
                     Supplier<UiRegularWidget> childSupplier,
                     int index)
        Adds a new tab at the given index with the content provided lazily from the given Supplier (when the tab is selected for the first time).
        Parameters:
        text - the label that will be displayed to identify the tab.
        childSupplier - the Supplier providing the tab content. Allows lazy creation of the child when the tab is selected for the first time.
        index - is the index where to insert the new UiTab.
        Returns:
        the UiTab for this tab. It allows to change the title, set tooltip or image (icon), etc.