Interface IListheader<I extends IAnyGroup>
- All Superinterfaces:
IChildable<IListheader<I>,,I> IChildrenOfInputgroup<IListheader<I>>,IComponent<IListheader<I>>,IHeaderElement<IListheader<I>>,IHtmlBasedComponent<IListheader<I>>,ILabelElement<IListheader<I>>,ILabelImageElement<IListheader<I>>,IXulElement<IListheader<I>>
Listheader component
The list header which defines the attributes and header of a column of a list box.
Support @Action
| Name | Action Type |
|---|---|
| onSort | ActionData: SortData
Denotes user has sorted the row of this column. |
| onGroup | ActionData: SortData
Denotes user has grouped all the cells under a column. [ZK PE] |
| onUngroup | ActionData: SortData
Denotes user has ungrouped all the cells under a column. [ZK EE] |
- Author:
- katherine
- See Also:
-
Listheader
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classIListheader.Builder<I extends IAnyGroup>Builds instances of typeIListheader.static enumSets the sort direction.static classBuilds an updater of typeIListheaderforUiAgent.smartUpdate(Locator, SmartUpdater). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IListheader<IAnyGroup>Constant for default attributes of this immutable component. -
Method Summary
Modifier and TypeMethodDescriptionComparator<?>Returns the ascending sorter, or null if not available.Comparator<?>Returns the descending sorter, or null if not available.default StringReturns the sort direction.default StringReturns the client widget class.default booleanReturns whether this column is visible when the listbox is in responsive (stacking) mode.static <I extends IAnyGroup>
IListheader<I>of(I... children) Returns the instance with the given any group children.static <I extends IAnyGroup>
IListheader<I>Returns the instance with the given any group children.static <I extends IAnyGroup>
IListheader<I>Returns the instance with the given label.static <I extends IAnyGroup>
IListheader<I>Returns the instance with the given label and image.static <I extends IAnyGroup>
IListheader<I>Returns the instance with the given id.static <I extends IAnyGroup>
IListheader<I>Returns the instance with the given image.withResponsiveVisible(boolean responsiveVisible) Returns a copy ofthisimmutable component with the specifiedresponsiveVisible.default IListheader<I>withSortAscending(String sortAscending) Returns a copy ofthisimmutable component with the specifiedsortAscendingclass name.withSortAscending(Comparator<?> sortAscending) Returns a copy ofthisimmutable component with the specifiedsortAscending.default IListheader<I>withSortDescending(String sortDescending) Returns a copy ofthisimmutable component with the specifiedsortDescendingclass name.withSortDescending(Comparator<?> sortDescending) Returns a copy ofthisimmutable component with the specifiedsortDescending.withSortDirection(String sortDirection) Returns a copy ofthisimmutable component with the specifiedsortDirection.default IListheader<I>withSortDirection(IListheader.SortDirection sortDirection) Returns a copy ofthisimmutable component with the specifiedsortDirection.Methods inherited from interface org.zkoss.stateless.sul.IChildable
getChildren, withChildren, withChildrenMethods 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.IHeaderElement
getAlign, getValign, withAlign, withValignMethods 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.ILabelElement
getLabel, withLabelMethods inherited from interface org.zkoss.stateless.sul.ILabelImageElement
getHoverImage, getIconSclass, getIconSclasses, getIconTooltip, getIconTooltips, getImage, isPreloadImage, withHoverImage, withIconSclass, withIconSclasses, withIconTooltip, withIconTooltips, withImage, withPreloadImageMethods 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.
-
-
Method Details
-
getWidgetClass
Returns the client widget class.Default:
"zul.sel.Listheader"- Specified by:
getWidgetClassin interfaceIComponent<I extends IAnyGroup>- Returns:
-
getSortDirection
Returns the sort direction.Default: "natural".
-
withSortDirection
Returns a copy ofthisimmutable component with the specifiedsortDirection.Sets the sort direction. This does not sort the data, it only serves as an indicator as to how the listbox is sorted. (unless the listbox has
IListbox.isAutosort()attribute for model case)- Parameters:
sortDirection- One of"ascending","descending"and"natural"Default:
"natural".- Returns:
- A modified copy of the
thisobject
-
withSortDirection
Returns a copy ofthisimmutable component with the specifiedsortDirection.Sets the sort direction. This does not sort the data, it only serves as an indicator as to how the listbox is sorted. (unless the listbox has
IListbox.isAutosort()attribute for model case)- Parameters:
sortDirection- One ofIListheader.SortDirectionDefault:
IListheader.SortDirection.NATURAL.- Returns:
- A modified copy of the
thisobject
-
getSortAscending
Returns the ascending sorter, or null if not available.Default:
null -
withSortAscending
Returns a copy ofthisimmutable component with the specifiedsortAscending.Sets the ascending sorter, or null for no sorter for the ascending order.
- Parameters:
sortAscending- The comparator used to sort the ascending order.Default:
null.- Returns:
- A modified copy of the
thisobject
-
withSortAscending
default IListheader<I> withSortAscending(String sortAscending) throws ClassNotFoundException, InstantiationException, IllegalAccessException Returns a copy ofthisimmutable component with the specifiedsortAscendingclass name.Sets the ascending sorter with the class name, or null for no sorter for the ascending order.
- Parameters:
sortAscending- The comparator used to sort the ascending order.Default:
null.- Returns:
- A modified copy of the
thisobject - Throws:
ClassNotFoundExceptionInstantiationExceptionIllegalAccessException
-
getSortDescending
Returns the descending sorter, or null if not available.Default:
null -
withSortDescending
Returns a copy ofthisimmutable component with the specifiedsortDescending.Sets the descending sorter, or null for no sorter for the descending order.
- Parameters:
sortDescending- The comparator used to sort the descending order.Default:
null.- Returns:
- A modified copy of the
thisobject
-
withSortDescending
default IListheader<I> withSortDescending(String sortDescending) throws ClassNotFoundException, InstantiationException, IllegalAccessException Returns a copy ofthisimmutable component with the specifiedsortDescendingclass name.Sets the descending sorter with the class name, or null for no sorter for the descending order.
- Parameters:
sortDescending- The comparator used to sort the descending order.Default:
null.- Returns:
- A modified copy of the
thisobject - Throws:
ClassNotFoundExceptionInstantiationExceptionIllegalAccessException
-
isResponsiveVisible
default boolean isResponsiveVisible()Returns whether this column is visible when the listbox is in responsive (stacking) mode.Default:
true.- Since:
- 11.0.0
-
withResponsiveVisible
Returns a copy ofthisimmutable component with the specifiedresponsiveVisible.Sets whether this column is visible when the listbox is in responsive (stacking) mode.
falsehides the column only in stacking mode; it stays visible in table mode.- Parameters:
responsiveVisible-falseto hide this column in stacking mode.Default:
true.- Returns:
- A modified copy of the
thisobject - Since:
- 11.0.0
-
of
Returns the instance with the given label.- Parameters:
label- The label belongs to this column.
-
of
Returns the instance with the given label and image.- Parameters:
label- The label that the column holds.image- The image that the column holds.
-
of
Returns the instance with the given any group children.- Parameters:
children- The children belong to any group- See Also:
-
of
Returns the instance with the given any group children.- Parameters:
children- The children belong to any group- See Also:
-
ofImage
Returns the instance with the given image.- Parameters:
image- The image that the column holds.
-
ofId
Returns the instance with the given id.- Parameters:
id- The id to identify this component
-