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>>
public interface IListheader<I extends IAnyGroup> extends IHeaderElement<IListheader<I>>, IChildable<IListheader<I>,I>
ImmutableListheader
componentThe 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 Classes Modifier and Type Interface Description static class
IListheader.Builder<I extends IAnyGroup>
Builds instances of typeIListheader
.static class
IListheader.SortDirection
Sets the sort direction.static class
IListheader.Updater
Builds an updater of typeIListheader
forUiAgent.smartUpdate(Locator, SmartUpdater)
.
-
Field Summary
Fields Modifier and Type Field Description static IListheader<IAnyGroup>
DEFAULT
Constant for default attributes of this immutable component.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.Comparator<?>
getSortAscending()
Returns the ascending sorter, or null if not available.java.util.Comparator<?>
getSortDescending()
Returns the descending sorter, or null if not available.default java.lang.String
getSortDirection()
Returns the sort direction.default java.lang.String
getWidgetClass()
Returns the client widget class.static <I extends IAnyGroup>
IListheader<I>of(I... children)
Returns the instance with the given any group children.static <I extends IAnyGroup>
IListheader<I>of(java.lang.Iterable<? extends I> children)
Returns the instance with the given any group children.static <I extends IAnyGroup>
IListheader<I>of(java.lang.String label)
Returns the instance with the given label.static <I extends IAnyGroup>
IListheader<I>of(java.lang.String label, java.lang.String image)
Returns the instance with the given label and image.static <I extends IAnyGroup>
IListheader<I>ofId(java.lang.String id)
Returns the instance with the given id.static <I extends IAnyGroup>
IListheader<I>ofImage(java.lang.String image)
Returns the instance with the given image.default IListheader<I>
withSortAscending(java.lang.String sortAscending)
Returns a copy ofthis
immutable component with the specifiedsortAscending
class name.IListheader<I>
withSortAscending(java.util.Comparator<?> sortAscending)
Returns a copy ofthis
immutable component with the specifiedsortAscending
.default IListheader<I>
withSortDescending(java.lang.String sortDescending)
Returns a copy ofthis
immutable component with the specifiedsortDescending
class name.IListheader<I>
withSortDescending(java.util.Comparator<?> sortDescending)
Returns a copy ofthis
immutable component with the specifiedsortDescending
.IListheader<I>
withSortDirection(java.lang.String sortDirection)
Returns a copy ofthis
immutable component with the specifiedsortDirection
.default IListheader<I>
withSortDirection(IListheader.SortDirection sortDirection)
Returns a copy ofthis
immutable component with the specifiedsortDirection
.-
Methods inherited from interface org.zkoss.stateless.sul.IChildable
getChildren, withChildren, withChildren
-
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.IHeaderElement
getAlign, getValign, withAlign, withValign
-
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.ILabelElement
getLabel, withLabel
-
Methods inherited from interface org.zkoss.stateless.sul.ILabelImageElement
getHoverImage, getIconSclass, getIconSclasses, getIconTooltip, getIconTooltips, getImage, isPreloadImage, withHoverImage, withIconSclass, withIconSclasses, withIconTooltip, withIconTooltips, withImage, withPreloadImage
-
Methods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
-
-
-
Field Detail
-
DEFAULT
static final IListheader<IAnyGroup> DEFAULT
Constant for default attributes of this immutable component.
-
-
Method Detail
-
getWidgetClass
default java.lang.String getWidgetClass()
Returns the client widget class.Default:
"zul.sel.Listheader"
- Specified by:
getWidgetClass
in interfaceIComponent<I extends IAnyGroup>
- Returns:
-
getSortDirection
default java.lang.String getSortDirection()
Returns the sort direction.Default: "natural".
-
withSortDirection
IListheader<I> withSortDirection(java.lang.String sortDirection)
Returns a copy ofthis
immutable 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
this
object
-
withSortDirection
default IListheader<I> withSortDirection(IListheader.SortDirection sortDirection)
Returns a copy ofthis
immutable 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.SortDirection
Default:
IListheader.SortDirection.NATURAL
.- Returns:
- A modified copy of the
this
object
-
getSortAscending
@Nullable java.util.Comparator<?> getSortAscending()
Returns the ascending sorter, or null if not available.Default:
null
-
withSortAscending
IListheader<I> withSortAscending(@Nullable java.util.Comparator<?> sortAscending)
Returns a copy ofthis
immutable 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
this
object
-
getSortDescending
@Nullable java.util.Comparator<?> getSortDescending()
Returns the descending sorter, or null if not available.Default:
null
-
withSortDescending
IListheader<I> withSortDescending(@Nullable java.util.Comparator<?> sortDescending)
Returns a copy ofthis
immutable 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
this
object
-
withSortAscending
default IListheader<I> withSortAscending(java.lang.String sortAscending) throws java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
Returns a copy ofthis
immutable component with the specifiedsortAscending
class 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
this
object - Throws:
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
-
withSortDescending
default IListheader<I> withSortDescending(java.lang.String sortDescending) throws java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
Returns a copy ofthis
immutable component with the specifiedsortDescending
class 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
this
object - Throws:
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
-
of
static <I extends IAnyGroup> IListheader<I> of(java.lang.String label)
Returns the instance with the given label.- Parameters:
label
- The label belongs to this column.
-
of
static <I extends IAnyGroup> IListheader<I> of(java.lang.String label, java.lang.String image)
Returns the instance with the given label and image.- Parameters:
label
- The label that the column holds.image
- The image that the column holds.
-
ofImage
static <I extends IAnyGroup> IListheader<I> ofImage(java.lang.String image)
Returns the instance with the given image.- Parameters:
image
- The image that the column holds.
-
of
static <I extends IAnyGroup> IListheader<I> of(java.lang.Iterable<? extends I> children)
Returns the instance with the given any group children.- Parameters:
children
- The children belong to any group- See Also:
IAnyGroup
-
of
static <I extends IAnyGroup> IListheader<I> of(I... children)
Returns the instance with the given any group children.- Parameters:
children
- The children belong to any group- See Also:
IAnyGroup
-
ofId
static <I extends IAnyGroup> IListheader<I> ofId(java.lang.String id)
Returns the instance with the given id.- Parameters:
id
- The id to identify this component
-
-