Class TabContainer

  • All Implemented Interfaces:
    be.yildizgames.common.util.Registerable, ContainerChild, Element, Widget

    public final class TabContainer
    extends BaseContainerChild
    A tab container contains a list of tab panel, only the selected is visible
    Author:
    Grégory Van den Borre
    • Constructor Detail

      • TabContainer

        public TabContainer​(String name,
                            be.yildizgames.module.coordinate.BaseCoordinate coordinates,
                            View[] containers,
                            Button[] tabSelectors,
                            Image background,
                            Container container)
        Full container.
        Parameters:
        name - Tab container name, must be unique.
        coordinates - Tab container size and position.
        containers - List of containers to use.
        tabSelectors - List of buttons used as tabs.
        background - Background image.
        container - Container holding this tab container.
    • Method Detail

      • highlightImpl

        protected void highlightImpl​(boolean highlightState)
        Description copied from class: BaseWidget
        Implementation to set the widget highlight.
        Specified by:
        highlightImpl in class BaseWidget
        Parameters:
        highlightState - Highlight state.
      • showImpl

        protected void showImpl()
        Description copied from class: BaseElement
        Implementation to set the widget visible.
        Specified by:
        showImpl in class BaseElement
      • hideImpl

        protected void hideImpl()
        Description copied from class: BaseElement
        Implementation to set the widget invisible.
        Specified by:
        hideImpl in class BaseElement
      • setSizeImpl

        protected void setSizeImpl​(int newWidth,
                                   int newHeight)
        Description copied from class: BaseElement
        Implementation to set the widget size.
        Specified by:
        setSizeImpl in class BaseElement
        Parameters:
        newWidth - New width.
        newHeight - New height.
      • setPositionImpl

        protected Element setPositionImpl​(int newLeft,
                                          int newTop)
        Description copied from class: BaseElement
        Implementation to update the widget position.
        Specified by:
        setPositionImpl in class BaseElement
        Parameters:
        newLeft - New widget x position.
        newTop - New widget y position.
        Returns:
        This object for chaining.
      • getContainer

        public Container getContainer​(int tab)