Interface ITabbox
- All Superinterfaces:
IAnyGroup<ITabbox>,IComponent<ITabbox>,IComposite<ITabbox,,ITabboxComposite> IHtmlBasedComponent<ITabbox>,IXulElement<ITabbox>
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
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classBuilds instances of typeITabbox.static enumSpecifies the orient of tabs' position to this tabbox.static classBuilds an updater of typeITabboxforUiAgent.smartUpdate(Locator, SmartUpdater). -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault StringReturns the orient.Returns the spacing betweenITabpanel.Returns the tabpanels that this tabbox owns.getTabs()Returns the tabs that this tabbox owns.Returns the auxiliary toolbar that this tabbox owns.default StringReturns the client widget class.default booleanReturns whether to use maximum height of all tabpanel in initial phase.default booleanReturns whether to use Browser's scrollbar or a floating scrollbar (if withfalse).default booleanReturns whether the tab scrolling is enabled.static ITabboxof(ITabs tabs, ITabpanels tabpanels) Returns the instance with the given tabs and tappanelsstatic ITabboxof(ITabs tabs, ITabpanels tabpanels, IToolbar toolbar) Returns the instance with the given tabs, tappanels, and toolbarstatic ITabboxReturns the instance with the given id.static ITabboxofOrient(ITabbox.Orient orient) Returns the instance with the givenorientstatic ITabboxReturns the instance with the given width and heightstatic ITabboxReturns the instance with the given vflexdefault ITabboxwithAllComponents(Iterable<? extends ITabboxComposite> elements) Copy the current immutable object with elements that replace the content ofchildren.withMaximalHeight(boolean maximalHeight) Returns a copy ofthisimmutable component with the specifiedmaximalHeight.withNativeScrollbar(boolean nativeScrollbar) Returns a copy ofthisimmutable component with the specifiednativeScrollbar.withOrient(String orient) Returns a copy ofthisimmutable component with the specifiedorient.default ITabboxwithOrient(ITabbox.Orient orient) Returns a copy ofthisimmutable component with the specifiedorient.withPanelSpacing(String panelSpacing) Returns a copy ofthisimmutable component with the specifiedpanelSpacing.withTabpanels(ITabpanels tabpanels) Returns a copy ofthisimmutable component with the specifiedtabpanels.Returns a copy ofthisimmutable component with the specifiedtabs.withTabscroll(boolean tabscroll) Returns a copy ofthisimmutable component with the specifiedtabscroll.withToolbar(IToolbar toolbar) Returns a copy ofthisimmutable component with the specifiedtoolbar.Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetListeners, getWidgetOverrides, isVisible, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withActions, withActions, withClientAttribute, withClientAttributes, withId, withMold, withVisible, withWidgetClass, withWidgetListener, withWidgetListeners, withWidgetOverride, withWidgetOverridesMethods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getSkeleton, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withSkeleton, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndexMethods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
Field Details
-
DEFAULT
Constant for default attributes of this immutable component. -
ACCORDION
Constant for accordion mold attributes of this immutable component.
-
-
Method Details
-
getWidgetClass
Returns the client widget class.Default:
"zul.tab.Tabbox"- Specified by:
getWidgetClassin interfaceIComponent<ITabbox>
-
withAllComponents
Description copied from interface:ICompositeCopy the current immutable object with elements that replace the content ofchildren. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Specified by:
withAllComponentsin interfaceIComposite<ITabbox,ITabboxComposite> - Parameters:
elements- An iterable of children elements to set- Returns:
- A modified copy of
thisobject
-
getTabs
Returns the tabs that this tabbox owns. -
withTabs
Returns a copy ofthisimmutable component with the specifiedtabs.Sets the tabs that this tabbox owns.
- Parameters:
tabs- The tabs child- Returns:
- A modified copy of the
thisobject
-
getTabpanels
Returns the tabpanels that this tabbox owns. -
withTabpanels
Returns a copy ofthisimmutable component with the specifiedtabpanels.Sets the tabpanels that this tabbox owns.
- Parameters:
tabpanels- The tabpanels child- Returns:
- A modified copy of the
thisobject
-
getToolbar
Returns the auxiliary toolbar that this tabbox owns. -
withToolbar
Returns a copy ofthisimmutable component with the specifiedtoolbar.Sets the auxiliary toolbar that this tabbox owns.
- Parameters:
toolbar- The auxiliary toolbar child- Returns:
- A modified copy of the
thisobject
-
getPanelSpacing
Returns the spacing betweenITabpanel. This is used by certain molds, such asaccordion.Default:
null(no spacing). -
withPanelSpacing
Returns a copy ofthisimmutable component with the specifiedpanelSpacing.Sets the spacing between
ITabpanel. This is used by certain molds, such asaccordion.- Parameters:
panelSpacing- The spacing betweenITabpanelDefault:
null(no spacing)- Returns:
- A modified copy of the
thisobject
-
getOrient
Returns the orient.Default:
"top".Note: only the
"default"mold supports it (not supported if"accordion"mold). -
withOrient
Returns a copy ofthisimmutable component with the specifiedorient.Sets the orient of the tabs' position. Either
"top","left","bottomor"right".- Parameters:
orient- The orient of the tabs' position.Default:
"top"- Returns:
- A modified copy of the
thisobject
-
withOrient
Returns a copy ofthisimmutable component with the specifiedorient.Sets the orient of the tabs' position.
- Parameters:
orient- The orient of the tabs' position.Default:
"top"- Returns:
- A modified copy of the
thisobject
-
isTabscroll
default boolean isTabscroll()Returns whether the tab scrolling is enabled. Default:true. -
withTabscroll
Returns a copy ofthisimmutable component with the specifiedtabscroll.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
thisobject
-
isMaximalHeight
default boolean isMaximalHeight()Returns whether to use maximum height of all tabpanel in initial phase.Default:
false. -
withMaximalHeight
Returns a copy ofthisimmutable component with the specifiedmaximalHeight.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
thisobject
-
isNativeScrollbar
default boolean isNativeScrollbar()Returns whether to use Browser's scrollbar or a floating scrollbar (if withfalse).Default:
trueto use Browser's scrollbar, if the"org.zkoss.zul.nativebar"library property is not set in zk.xml. -
withNativeScrollbar
Returns a copy ofthisimmutable component with the specifiednativeScrollbar.Sets to use Browser's scrollbar or a floating scrollbar
- Parameters:
nativeScrollbar-trueto use Browser's scrollbar, orfalseto use a floating scrollbar.Default:
true.- Returns:
- A modified copy of the
thisobject
-
of
Returns the instance with the given tabs and tappanels- Parameters:
tabs- The tabs childtabpanels- The tabpanels child.
-
of
Returns the instance with the given tabs, tappanels, and toolbar- Parameters:
tabs- The tabs childtabpanels- The tabpanels child.toolbar- The auxiliary toolbar
-
ofSize
Returns the instance with the given width and height- Parameters:
width- The width of the componentheight- The height of the component
-
ofOrient
Returns the instance with the givenorient- Parameters:
orient- The orient of the tabs' position.
-
ofVFlex
Returns the instance with the given vflex- Parameters:
vflex- The vertical flex hint.
-
ofId
Returns the instance with the given id.- Parameters:
id- The id to identify this component
-





