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>
ImmutableTabbox
componentA 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 class
ITabbox.Builder
Builds instances of typeITabbox
.static class
ITabbox.Orient
Specifies the orient of tabs' position to this tabbox.static class
ITabbox.Updater
Builds an updater of typeITabbox
forUiAgent.smartUpdate(Locator, SmartUpdater)
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.String
getOrient()
Returns the orient.java.lang.String
getPanelSpacing()
Returns the spacing betweenITabpanel
.ITabpanels
getTabpanels()
Returns the tabpanels that this tabbox owns.ITabs
getTabs()
Returns the tabs that this tabbox owns.IToolbar
getToolbar()
Returns the auxiliary toolbar that this tabbox owns.default java.lang.String
getWidgetClass()
Returns the client widget class.default boolean
isMaximalHeight()
Returns whether to use maximum height of all tabpanel in initial phase.default boolean
isNativeScrollbar()
Returns whether to use Browser's scrollbar or a floating scrollbar (if withfalse
).default boolean
isTabscroll()
Returns whether the tab scrolling is enabled.static ITabbox
of(ITabs tabs, ITabpanels tabpanels)
Returns the instance with the given tabs and tappanelsstatic ITabbox
of(ITabs tabs, ITabpanels tabpanels, IToolbar toolbar)
Returns the instance with the given tabs, tappanels, and toolbarstatic ITabbox
ofId(java.lang.String id)
Returns the instance with the given id.static ITabbox
ofOrient(ITabbox.Orient orient)
Returns the instance with the givenorient
static ITabbox
ofSize(java.lang.String width, java.lang.String height)
Returns the instance with the given width and heightstatic ITabbox
ofVFlex(java.lang.String vflex)
Returns the instance with the given vflexdefault ITabbox
withAllComponents(java.lang.Iterable<? extends ITabboxComposite> elements)
Copy the current immutable object with elements that replace the content ofchildren
.ITabbox
withMaximalHeight(boolean maximalHeight)
Returns a copy ofthis
immutable component with the specifiedmaximalHeight
.ITabbox
withNativeScrollbar(boolean nativeScrollbar)
Returns a copy ofthis
immutable component with the specifiednativeScrollbar
.ITabbox
withOrient(java.lang.String orient)
Returns a copy ofthis
immutable component with the specifiedorient
.default ITabbox
withOrient(ITabbox.Orient orient)
Returns a copy ofthis
immutable component with the specifiedorient
.ITabbox
withPanelSpacing(java.lang.String panelSpacing)
Returns a copy ofthis
immutable component with the specifiedpanelSpacing
.ITabbox
withTabpanels(ITabpanels tabpanels)
Returns a copy ofthis
immutable component with the specifiedtabpanels
.ITabbox
withTabs(ITabs tabs)
Returns a copy ofthis
immutable component with the specifiedtabs
.ITabbox
withTabscroll(boolean tabscroll)
Returns a copy ofthis
immutable component with the specifiedtabscroll
.ITabbox
withToolbar(IToolbar toolbar)
Returns a copy ofthis
immutable 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:
getWidgetClass
in interfaceIComponent<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 ofchildren
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Specified by:
withAllComponents
in interfaceIComposite<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 ofthis
immutable component with the specifiedtabs
.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 ofthis
immutable component with the specifiedtabpanels
.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 ofthis
immutable component with the specifiedtoolbar
.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 betweenITabpanel
. This is used by certain molds, such asaccordion
.Default:
null
(no spacing).
-
withPanelSpacing
ITabbox withPanelSpacing(@Nullable java.lang.String panelSpacing)
Returns a copy ofthis
immutable component with the specifiedpanelSpacing
.Sets the spacing between
ITabpanel
. This is used by certain molds, such asaccordion
.- Parameters:
panelSpacing
- The spacing betweenITabpanel
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 ofthis
immutable component with the specifiedorient
.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 ofthis
immutable 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
this
object
-
isTabscroll
default boolean isTabscroll()
Returns whether the tab scrolling is enabled. Default:true
.
-
withTabscroll
ITabbox withTabscroll(boolean tabscroll)
Returns a copy ofthis
immutable 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
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 ofthis
immutable 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
this
object
-
isNativeScrollbar
default boolean isNativeScrollbar()
Returns whether to use Browser's scrollbar or a floating scrollbar (if withfalse
).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 ofthis
immutable component with the specifiednativeScrollbar
.Sets to use Browser's scrollbar or a floating scrollbar
- Parameters:
nativeScrollbar
-true
to use Browser's scrollbar, orfalse
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 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
-
-