Package org.zkoss.stateless.sul
Interface IAuxheader<I extends IAnyGroup>
-
- All Superinterfaces:
IChildable<IAuxheader<I>,I>
,IChildrenOfInputgroup<IAuxheader<I>>
,IComponent<IAuxheader<I>>
,IHeaderElement<IAuxheader<I>>
,IHtmlBasedComponent<IAuxheader<I>>
,ILabelElement<IAuxheader<I>>
,ILabelImageElement<IAuxheader<I>>
,IXulElement<IAuxheader<I>>
public interface IAuxheader<I extends IAnyGroup> extends IHeaderElement<IAuxheader<I>>, IChildable<IAuxheader<I>,I>
ImmutableAuxheader
componentThe auxiliary headers support the colspan and rowspan attributes which allows itself to be spanned across several columns/rows.
Auxiliary headers should be accompanied with
columns
/listhead
/treecols
when used withgrid
/listbox
/tree
.Example
@
RichletMapping
("/example") public IComponent example() { return IGrid.DEFAULT.withAuxhead( IAuxhead.of( IAuxheader.of("H1'21").withColspan(6), IAuxheader.of("H2'21").withColspan(6)), IAuxhead.of( IAuxheader.of("Q1'21").withColspan(3), IAuxheader.of("Q2'21").withColspan(3), IAuxheader.of("Q3'21").withColspan(3), IAuxheader.of("Q4'21").withColspan(3)) ).withColumns( IColumns.of( IColumn.of("Jan"), IColumn.of("Feb"), IColumn.of("Mar"), IColumn.of("Apr"), IColumn.of("May"), IColumn.of("Jun"), IColumn.of("Jul"), IColumn.of("Aug"), IColumn.of("Sep"), IColumn.of("Oct"), IColumn.of("Nov"), IColumn.of("Dec") ) ).withRows( IRows.of(IRow.of( ILabel.of("1,000"), ILabel.of("1,100"), ILabel.of("1,200"), ILabel.of("1,300"), ILabel.of("1,400"), ILabel.of("1,500"), ILabel.of("1,600"), ILabel.of("1,700"), ILabel.of("1,800"), ILabel.of("1,900"), ILabel.of("2,000"), ILabel.of("2,100") ) )); } }- Author:
- katherine
- See Also:
Auxheader
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IAuxheader.Builder<I extends IAnyGroup>
Builds instances of typeIAuxheader
.static class
IAuxheader.Updater
Builds an updater of typeIAuxheader
forUiAgent.smartUpdate(Locator, SmartUpdater)
.
-
Field Summary
Fields Modifier and Type Field Description static IAuxheader<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 default int
getColspan()
Returns number of columns to span this header.default int
getRowspan()
Returns number of rows to span this header.default java.lang.String
getWidgetClass()
Returns the client widget class.static <I extends IAnyGroup>
IAuxheader<I>of(I... children)
Returns the instance with the given any group children.static <I extends IAnyGroup>
IAuxheader<I>of(java.lang.Iterable<? extends I> children)
Returns the instance with the given any group children.static <I extends IAnyGroup>
IAuxheader<I>of(java.lang.String label)
Returns the instance with the given label.static <I extends IAnyGroup>
IAuxheader<I>of(java.lang.String label, java.lang.String image)
Returns the instance with the given label and image.static <I extends IAnyGroup>
IAuxheader<I>ofId(java.lang.String id)
Returns the instance with the given id.static <I extends IAnyGroup>
IAuxheader<I>ofImage(java.lang.String image)
Returns the instance with the given image.IAuxheader<I>
withColspan(int colspan)
Returns a copy ofthis
immutable component with the specifiedcolspan
.IAuxheader<I>
withRowspan(int rowspan)
Returns a copy ofthis
immutable component with the specifiedrowspan
.-
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 IAuxheader<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.mesh.Auxheader"
- Specified by:
getWidgetClass
in interfaceIComponent<I extends IAnyGroup>
-
getColspan
default int getColspan()
Returns number of columns to span this header. Default:1
.
-
withColspan
IAuxheader<I> withColspan(int colspan)
Returns a copy ofthis
immutable component with the specifiedcolspan
.Sets the number of columns to span this header.
It is the same as the colspan attribute of HTML TD tag.
- Parameters:
colspan
- The number of columns to span this header.Default:
1
.- Returns:
- A modified copy of the
this
object
-
getRowspan
default int getRowspan()
Returns number of rows to span this header. Default:1
.
-
withRowspan
IAuxheader<I> withRowspan(int rowspan)
Returns a copy ofthis
immutable component with the specifiedrowspan
.Sets the number of rows to span this header.
It is the same as the rowspan attribute of HTML TD tag.
- Parameters:
rowspan
- The number of rows to span this header.Default:
1
.- Returns:
- A modified copy of the
this
object
-
of
static <I extends IAnyGroup> IAuxheader<I> of(java.lang.String label)
Returns the instance with the given label.- Parameters:
label
- The label that the header holds.
-
of
static <I extends IAnyGroup> IAuxheader<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 header holds.image
- The image that the header holds.
-
ofImage
static <I extends IAnyGroup> IAuxheader<I> ofImage(java.lang.String image)
Returns the instance with the given image.- Parameters:
image
- The image that the header holds.
-
ofId
static <I extends IAnyGroup> IAuxheader<I> ofId(java.lang.String id)
Returns the instance with the given id.- Parameters:
id
- The id to identify this component
-
of
static <I extends IAnyGroup> IAuxheader<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> IAuxheader<I> of(I... children)
Returns the instance with the given any group children.- Parameters:
children
- The children belong to any group- See Also:
IAnyGroup
-
-