Package tripleplay.ui

Class Tabs.Tab

java.lang.Object
tripleplay.ui.Tabs.Tab
Enclosing class:
Tabs

public class Tabs.Tab extends Object
Represents a tab: button and content.
  • Field Details

    • button

      public final ToggleButton button
      The button, which will show this tab's content when clicked.
  • Constructor Details

    • Tab

      public Tab(ToggleButton button, Supplier generator)
      Creates a new tab with the supplied fields.
  • Method Details

    • select

      public void select()
      Selects this tab. This is just a shortcut for Tabs.selected.update(this).
    • content

      public Element<?> content()
      Gets this tab's content, creating it if necessary.
    • index

      public int index()
    • setVisible

      public void setVisible(boolean visible)
    • isVisible

      public boolean isVisible()
    • parent

      public Tabs parent()
    • name

      public String name()
      Gets the displayed name of the tab. This is a convenience for accessing the text of the button.