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>
    Immutable Auxheader component

    The 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 with grid/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
    • 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 interface IComponent<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 of this immutable component with the specified colspan.

        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 of this immutable component with the specified rowspan.

        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 IAnyGroupIAuxheader<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 IAnyGroupIAuxheader<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 IAnyGroupIAuxheader<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 IAnyGroupIAuxheader<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 IAnyGroupIAuxheader<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 IAnyGroupIAuxheader<I> of​(I... children)
        Returns the instance with the given any group children.
        Parameters:
        children - The children belong to any group
        See Also:
        IAnyGroup