Interface IMeshElement<I extends IMeshElement>
- All Superinterfaces:
IComponent<I>,IHtmlBasedComponent<I>,IXulElement<I>
MeshElement interface
The fundamental class for mesh components such as
IGrid, IListbox, and ITree.
Sticky Header
After adding a sclass "z-sticky-header", when we scroll down a page
and make a Mesh component's header out of visible range in a viewport, the
Mesh component's header becomes floating and sticky on the top of the page.
For example,
return meshComp.withSclass("z-sticky-header");
Support Application Library Properties
-
To set to use Browser's scrollbar or not, you have to specify
withNativeScrollbar(boolean).Or configure it from zk.xml by setting library properties. For example,
<library-property/> <name>org.zkoss.zul.nativebar</name/> <value>false</value/> </library-property/>
IMeshElement.- Author:
- katherine
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumSpecifies the paging position when"paging"mold is used. -
Method Summary
Modifier and TypeMethodDescriptionReturns the instance of theIPagingdefault StringReturns how to position the paging of mesh component at the client screen.getSpan()Return column span hint of this component.default booleanReturns whether the auto-paging facility is turned on when the mold is"paging".default booleanReturns whether to use Browser's scrollbar or a floating scrollbar (if withfalse).default booleanReturns whether sizing grid/listbox/tree column width by its content.withAutopaging(boolean autopaging) Returns a copy ofthisimmutable component with the specifiedautopaging.withNativeScrollbar(boolean nativeScrollbar) Returns a copy ofthisimmutable component with the specifiednativeScrollbar.withPagingChild(IPaging pagingChild) Returns a copy ofthisimmutable component with the specifiedpagingChild.withPagingPosition(String pagingPosition) Returns a copy ofthisimmutable component with the specifiedpagingPosition.default IwithPagingPosition(IMeshElement.PagingPosition pagingPosition) Returns a copy ofthisimmutable component with the specifiedpagingPosition.withSizedByContent(boolean sizedByContent) Returns a copy ofthisimmutable component with the specifiedsizedByContent.default IwithSpan(boolean span) Returns a copy ofthisimmutable component with the specifiedspan.Returns a copy ofthisimmutable component with the specifiedspan.Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetClass, 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
-
Method Details
-
getSpan
Return column span hint of this component.Default:
null -
withSpan
Returns a copy ofthisimmutable component with the specifiedspan.Sets column span hint of this component. String number span indicates how this component distributes remaining empty space to the specified column(0-based).
"0"means distribute remaining empty space to the 1st column;"1"means distribute remaining empty space to the 2nd column, etc.. The spanning column will grow to fit the extra remaining space.Special span hint with
"true"means span ALL columns proportionally per their original widths while null or"false"means NOT spanning any column.Default:
null. That is, NOT span any column.Note: span is meaningful only if there is remaining empty space for columns.
- Parameters:
span- The column span hint.- Returns:
- A modified copy of the
thisobject
-
withSpan
Returns a copy ofthisimmutable component with the specifiedspan.Sets whether distributes remaining empty space of this component to ALL columns proportionally.
Default:
false. That is, NOT span any column.Note: span is meaningful only if there is remaining empty space for columns.
- Parameters:
span- Whether to span the width of ALL columns to occupy the whole mesh element(grid/listbox/tree).- Returns:
- A modified copy of the
thisobject
-
getPagingChild
Returns the instance of theIPagingDefault:
null, if in"paging"mold, it won't be null -
withPagingChild
Returns a copy ofthisimmutable component with the specifiedpagingChild.Sets the paging child component to this mesh component
- Parameters:
pagingChild- The paging child.Default:
null.- Returns:
- A modified copy of the
thisobject
-
isSizedByContent
default boolean isSizedByContent()Returns whether sizing grid/listbox/tree column width by its content.Default:
false. -
withSizedByContent
Returns a copy ofthisimmutable component with the specifiedsizedByContent.Sets whether sizing grid/listbox/tree column width by its content; it equals to set
withHflex("min")on each column.- Parameters:
sizedByContent- Whether to enable the column width is sized by its content.Default:
false.- Returns:
- A modified copy of the
thisobject
-
isAutopaging
default boolean isAutopaging()Returns whether the auto-paging facility is turned on when the mold is"paging". If it is set totrue, thegetPagingChild().getPageSize()is ignored; rather, the page size is automatically determined by the height of the mesh component dynamically.Default:
false- Returns:
- whether the auto-paging facility is turned on.
-
withAutopaging
Returns a copy ofthisimmutable component with the specifiedautopaging.Sets whether the auto-paging facility is turned on when the mold is
"paging". If it is set totrue, thegetPagingChild().getPageSize()is ignored; rather, the page size is automatically determined by the height of the mesh component dynamically.Note: Due to performance concern, Autopaging functionality does not support
IDetailcomponents.- Parameters:
autopaging- True to turn on the auto-paging facility.- Returns:
- A modified copy of the
thisobject
-
getPagingPosition
Returns how to position the paging of mesh component at the client screen. It is meaningless if the mold is not in"paging".Default:
"bottom" -
withPagingPosition
Returns a copy ofthisimmutable component with the specifiedpagingPosition.Sets how to position the paging of mesh component at the client screen. It is meaningless if the mold is not in
"paging".- Parameters:
pagingPosition- How to position. It can only be"bottom"(the default), or"top", or"both".- Returns:
- A modified copy of the
thisobject
-
withPagingPosition
Returns a copy ofthisimmutable component with the specifiedpagingPosition.Sets how to position the paging of mesh component at the client screen. It is meaningless if the mold is not in
"paging".- Parameters:
pagingPosition- How to position.- Returns:
- A modified copy of the
thisobject - See Also:
-
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
-