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>
ImmutableTabboxcomponentA 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 Classes Modifier and Type Interface Description static classITabbox.BuilderBuilds instances of typeITabbox.static classITabbox.OrientSpecifies the orient of tabs' position to this tabbox.static classITabbox.UpdaterBuilds an updater of typeITabboxforUiAgent.smartUpdate(Locator, SmartUpdater).
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.StringgetOrient()Returns the orient.java.lang.StringgetPanelSpacing()Returns the spacing betweenITabpanel.ITabpanelsgetTabpanels()Returns the tabpanels that this tabbox owns.ITabsgetTabs()Returns the tabs that this tabbox owns.IToolbargetToolbar()Returns the auxiliary toolbar that this tabbox owns.default java.lang.StringgetWidgetClass()Returns the client widget class.default booleanisMaximalHeight()Returns whether to use maximum height of all tabpanel in initial phase.default booleanisNativeScrollbar()Returns whether to use Browser's scrollbar or a floating scrollbar (if withfalse).default booleanisTabscroll()Returns 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 ITabboxofId(java.lang.String id)Returns the instance with the given id.static ITabboxofOrient(ITabbox.Orient orient)Returns the instance with the givenorientstatic ITabboxofSize(java.lang.String width, java.lang.String height)Returns the instance with the given width and heightstatic ITabboxofVFlex(java.lang.String vflex)Returns the instance with the given vflexdefault ITabboxwithAllComponents(java.lang.Iterable<? extends ITabboxComposite> elements)Copy the current immutable object with elements that replace the content ofchildren.ITabboxwithMaximalHeight(boolean maximalHeight)Returns a copy ofthisimmutable component with the specifiedmaximalHeight.ITabboxwithNativeScrollbar(boolean nativeScrollbar)Returns a copy ofthisimmutable component with the specifiednativeScrollbar.ITabboxwithOrient(java.lang.String orient)Returns a copy ofthisimmutable component with the specifiedorient.default ITabboxwithOrient(ITabbox.Orient orient)Returns a copy ofthisimmutable component with the specifiedorient.ITabboxwithPanelSpacing(java.lang.String panelSpacing)Returns a copy ofthisimmutable component with the specifiedpanelSpacing.ITabboxwithTabpanels(ITabpanels tabpanels)Returns a copy ofthisimmutable component with the specifiedtabpanels.ITabboxwithTabs(ITabs tabs)Returns a copy ofthisimmutable component with the specifiedtabs.ITabboxwithTabscroll(boolean tabscroll)Returns a copy ofthisimmutable component with the specifiedtabscroll.ITabboxwithToolbar(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, withWidgetOverrides
-
Methods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndex
-
Methods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
-
-
-
Method Detail
-
getWidgetClass
default java.lang.String getWidgetClass()
Returns the client widget class.Default:
"zul.tab.Tabbox"- Specified by:
getWidgetClassin interfaceIComponent<ITabbox>
-
withAllComponents
default ITabbox withAllComponents(java.lang.Iterable<? extends ITabboxComposite> elements)
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
@Nullable ITabs getTabs()
Returns the tabs that this tabbox owns.
-
withTabs
ITabbox withTabs(@Nullable ITabs tabs)
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
@Nullable ITabpanels getTabpanels()
Returns the tabpanels that this tabbox owns.
-
withTabpanels
ITabbox withTabpanels(@Nullable ITabpanels tabpanels)
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
@Nullable IToolbar getToolbar()
Returns the auxiliary toolbar that this tabbox owns.
-
withToolbar
ITabbox withToolbar(@Nullable IToolbar toolbar)
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
@Nullable java.lang.String getPanelSpacing()
Returns the spacing betweenITabpanel. This is used by certain molds, such asaccordion.Default:
null(no spacing).
-
withPanelSpacing
ITabbox withPanelSpacing(@Nullable java.lang.String panelSpacing)
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
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 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
default ITabbox withOrient(ITabbox.Orient orient)
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
ITabbox withTabscroll(boolean tabscroll)
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
ITabbox withMaximalHeight(boolean maximalHeight)
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
ITabbox withNativeScrollbar(boolean nativeScrollbar)
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
static ITabbox of(ITabs tabs, ITabpanels tabpanels)
Returns the instance with the given tabs and tappanels- Parameters:
tabs- The tabs childtabpanels- 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 childtabpanels- 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 componentheight- The height of the component
-
ofOrient
static ITabbox ofOrient(ITabbox.Orient orient)
Returns the instance with the givenorient- 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
-
-