Interface IMeshElement<I extends IMeshElement>
-
- All Superinterfaces:
IComponent<I>,IHtmlBasedComponent<I>,IXulElement<I>
public interface IMeshElement<I extends IMeshElement> extends IXulElement<I>
ImmutableMeshElementinterfaceThe fundamental class for mesh components such as
IGrid,IListbox, andITree.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 Classes Modifier and Type Interface Description static classIMeshElement.PagingPositionSpecifies the paging position when"paging"mold is used.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description IPaginggetPagingChild()Returns the instance of theIPagingdefault java.lang.StringgetPagingPosition()Returns how to position the paging of mesh component at the client screen.java.lang.StringgetSpan()Return column span hint of this component.default booleanisAutopaging()Returns whether the auto-paging facility is turned on when the mold is"paging".default booleanisNativeScrollbar()Returns whether to use Browser's scrollbar or a floating scrollbar (if withfalse).default booleanisSizedByContent()Returns whether sizing grid/listbox/tree column width by its content.IwithAutopaging(boolean autopaging)Returns a copy ofthisimmutable component with the specifiedautopaging.IwithNativeScrollbar(boolean nativeScrollbar)Returns a copy ofthisimmutable component with the specifiednativeScrollbar.IwithPagingChild(IPaging pagingChild)Returns a copy ofthisimmutable component with the specifiedpagingChild.IwithPagingPosition(java.lang.String pagingPosition)Returns a copy ofthisimmutable component with the specifiedpagingPosition.default IwithPagingPosition(IMeshElement.PagingPosition pagingPosition)Returns a copy ofthisimmutable component with the specifiedpagingPosition.IwithSizedByContent(boolean sizedByContent)Returns a copy ofthisimmutable component with the specifiedsizedByContent.default IwithSpan(boolean span)Returns a copy ofthisimmutable component with the specifiedspan.IwithSpan(java.lang.String span)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, 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
-
getSpan
@Nullable java.lang.String getSpan()
Return column span hint of this component.Default:
null
-
withSpan
I withSpan(@Nullable java.lang.String span)
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
default I withSpan(boolean span)
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
@Nullable IPaging getPagingChild()
Returns the instance of theIPagingDefault:
null, if in"paging"mold, it won't be null
-
withPagingChild
I withPagingChild(@Nullable IPaging pagingChild)
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
I withSizedByContent(boolean sizedByContent)
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
I withAutopaging(boolean autopaging)
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
default java.lang.String 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
I withPagingPosition(java.lang.String pagingPosition)
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
default I withPagingPosition(IMeshElement.PagingPosition pagingPosition)
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:
IMeshElement.PagingPosition
-
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
I 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
-
-