Interface ITabbox

  • All Superinterfaces:
    IAnyGroup<ITabbox>, IComponent<ITabbox>, IComposite<ITabbox,​ITabboxComposite>, IHtmlBasedComponent<ITabbox>, IXulElement<ITabbox>

    public interface ITabbox
    extends IXulElement<ITabbox>, IAnyGroup<ITabbox>, IComposite<ITabbox,​ITabboxComposite>
    Immutable Tabbox component

    A tabbox is a container used to display a set of tabbed groups of components. A row of tabs is displayed at the top (or left or other location) of tabbox which may be used to switch between each group. It allows developers to separate a large number of components into several groups (each group is contained in a tabpanel). Only one group is visible at the time, such that the user interface won't be too complicate to read. Once the tab of an invisible group is clicked, it becomes visible and the previous visible group becomes invisible.

    Support @Action

    Name Action Type
    onSelect ActionData: SelectData
    Denotes user has selected a tab. onSelect is sent to both tab and tabbox.

    Support Molds

    Name Snapshot
    "default"
    "accordion"

    Support Orients

    Name Snapshot
    "top"
    "left"
    "right"
    "bottom"
    Author:
    katherine
    See Also:
    Tabbox
    • Field Detail

      • DEFAULT

        static final ITabbox DEFAULT
        Constant for default attributes of this immutable component.
      • ACCORDION

        static final ITabbox ACCORDION
        Constant for accordion mold attributes of this immutable component.
    • Method Detail

      • getWidgetClass

        default java.lang.String getWidgetClass()
        Returns the client widget class.

        Default: "zul.tab.Tabbox"

        Specified by:
        getWidgetClass in interface IComponent<ITabbox>
      • withAllComponents

        default ITabbox withAllComponents​(java.lang.Iterable<? extends ITabboxComposite> elements)
        Description copied from interface: IComposite
        Copy the current immutable object with elements that replace the content of children. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Specified by:
        withAllComponents in interface IComposite<ITabbox,​ITabboxComposite>
        Parameters:
        elements - An iterable of children elements to set
        Returns:
        A modified copy of this object
      • getTabs

        @Nullable
        ITabs getTabs()
        Returns the tabs that this tabbox owns.
      • withTabs

        ITabbox withTabs​(@Nullable
                         ITabs tabs)
        Returns a copy of this immutable component with the specified tabs.

        Sets the tabs that this tabbox owns.

        Parameters:
        tabs - The tabs child
        Returns:
        A modified copy of the this object
      • getTabpanels

        @Nullable
        ITabpanels getTabpanels()
        Returns the tabpanels that this tabbox owns.
      • withTabpanels

        ITabbox withTabpanels​(@Nullable
                              ITabpanels tabpanels)
        Returns a copy of this immutable component with the specified tabpanels.

        Sets the tabpanels that this tabbox owns.

        Parameters:
        tabpanels - The tabpanels child
        Returns:
        A modified copy of the this object
      • getToolbar

        @Nullable
        IToolbar getToolbar()
        Returns the auxiliary toolbar that this tabbox owns.
      • withToolbar

        ITabbox withToolbar​(@Nullable
                            IToolbar toolbar)
        Returns a copy of this immutable component with the specified toolbar.

        Sets the auxiliary toolbar that this tabbox owns.

        Parameters:
        toolbar - The auxiliary toolbar child
        Returns:
        A modified copy of the this object
      • getPanelSpacing

        @Nullable
        java.lang.String getPanelSpacing()
        Returns the spacing between ITabpanel. This is used by certain molds, such as accordion.

        Default: null (no spacing).

      • withPanelSpacing

        ITabbox withPanelSpacing​(@Nullable
                                 java.lang.String panelSpacing)
        Returns a copy of this immutable component with the specified panelSpacing.

        Sets the spacing between ITabpanel. This is used by certain molds, such as accordion.

        Parameters:
        panelSpacing - The spacing between ITabpanel

        Default: null (no spacing)

        Returns:
        A modified copy of the this object
      • getOrient

        default java.lang.String getOrient()
        Returns the orient.

        Default: "top".

        Note: only the "default" mold supports it (not supported if "accordion" mold).

      • withOrient

        ITabbox withOrient​(java.lang.String orient)
        Returns a copy of this immutable component with the specified orient.

        Sets the orient of the tabs' position. Either "top", "left", "bottom or "right".

        Parameters:
        orient - The orient of the tabs' position.

        Default: "top"

        Returns:
        A modified copy of the this object
      • withOrient

        default ITabbox withOrient​(ITabbox.Orient orient)
        Returns a copy of this immutable component with the specified orient.

        Sets the orient of the tabs' position.

        Parameters:
        orient - The orient of the tabs' position.

        Default: "top"

        Returns:
        A modified copy of the this object
      • isTabscroll

        default boolean isTabscroll()
        Returns whether the tab scrolling is enabled. Default: true.
      • withTabscroll

        ITabbox withTabscroll​(boolean tabscroll)
        Returns a copy of this immutable component with the specified tabscroll.

        Sets whether to enable the tab scrolling. When enabled, if tab list is wider than tab bar, left, right arrow will appear.

        Parameters:
        tabscroll - Whether to enable the tab scrolling.

        Default: true

        Returns:
        A modified copy of the this object
      • isMaximalHeight

        default boolean isMaximalHeight()
        Returns whether to use maximum height of all tabpanel in initial phase.

        Default: false.

      • withMaximalHeight

        ITabbox withMaximalHeight​(boolean maximalHeight)
        Returns a copy of this immutable component with the specified maximalHeight.

        Sets whether to use maximum height of all tabpanel in initial phase.

        Parameters:
        maximalHeight - Whether to use maximum height of all tabpanel in initial phase.

        Default: false

        Returns:
        A modified copy of the this object
      • isNativeScrollbar

        default boolean isNativeScrollbar()
        Returns whether to use Browser's scrollbar or a floating scrollbar (if with false).

        Default: true to use Browser's scrollbar, if the "org.zkoss.zul.nativebar" library property is not set in zk.xml.

      • withNativeScrollbar

        ITabbox withNativeScrollbar​(boolean nativeScrollbar)
        Returns a copy of this immutable component with the specified nativeScrollbar.

        Sets to use Browser's scrollbar or a floating scrollbar

        Parameters:
        nativeScrollbar - true to use Browser's scrollbar, or false to use a floating scrollbar.

        Default: true.

        Returns:
        A modified copy of the this object
      • of

        static ITabbox of​(ITabs tabs,
                          ITabpanels tabpanels)
        Returns the instance with the given tabs and tappanels
        Parameters:
        tabs - The tabs child
        tabpanels - The tabpanels child.
      • of

        static ITabbox of​(ITabs tabs,
                          ITabpanels tabpanels,
                          IToolbar toolbar)
        Returns the instance with the given tabs, tappanels, and toolbar
        Parameters:
        tabs - The tabs child
        tabpanels - The tabpanels child.
        toolbar - The auxiliary toolbar
      • ofSize

        static ITabbox ofSize​(java.lang.String width,
                              java.lang.String height)
        Returns the instance with the given width and height
        Parameters:
        width - The width of the component
        height - The height of the component
      • ofOrient

        static ITabbox ofOrient​(ITabbox.Orient orient)
        Returns the instance with the given orient
        Parameters:
        orient - The orient of the tabs' position.
      • ofVFlex

        static ITabbox ofVFlex​(java.lang.String vflex)
        Returns the instance with the given vflex
        Parameters:
        vflex - The vertical flex hint.
      • ofId

        static ITabbox ofId​(java.lang.String id)
        Returns the instance with the given id.
        Parameters:
        id - The id to identify this component