Interface IGrid

    • Field Detail

      • DEFAULT

        static final IGrid DEFAULT
        Constant for default attributes of this immutable component.
      • PAGING

        static final IGrid PAGING
        Constant for "paging" mold attributes of this immutable component.
    • Method Detail

      • getWidgetClass

        default java.lang.String getWidgetClass()
        Returns the client widget class.

        Default: "zul.grid.Grid"

        Specified by:
        getWidgetClass in interface IComponent<IGrid>
      • getRows

        @Nullable
        IRows getRows()
        Returns the rows.
      • withRows

        IGrid withRows​(@Nullable
                       IRows rows)
        Returns a copy of this immutable component with the specified rows.

        Sets the rows as a child to this component

        Parameters:
        rows - The rows child.

        Default: null.

        Returns:
        A modified copy of the this object
      • getColumns

        @Nullable
        IColumns getColumns()
        Returns the columns.

        Default: null

      • withColumns

        IGrid withColumns​(@Nullable
                          IColumns columns)
        Returns a copy of this immutable component with the specified columns.

        Sets the columns as a child to this component

        Parameters:
        columns - The columns child.

        Default: null.

        Returns:
        A modified copy of the this object
      • getFoot

        @Nullable
        IFoot getFoot()
        Returns the foot.

        Default: null

      • withFoot

        IGrid withFoot​(@Nullable
                       IFoot foot)
        Returns a copy of this immutable component with the specified foot.

        Sets the foot as a child to this component

        Parameters:
        foot - The foot child.

        Default: null.

        Returns:
        A modified copy of the this object
      • getFrozen

        @Nullable
        IFrozen getFrozen()
        Returns the frozen child.

        Default: null.

      • withFrozen

        IGrid withFrozen​(@Nullable
                         IFrozen frozen)
        Returns a copy of this immutable component with the specified frozen.

        Sets the frozen as a child to this component

        Parameters:
        frozen - The foot child.

        Default: null.

        Returns:
        A modified copy of the this object
      • getEmptyMessage

        @Nullable
        java.lang.String getEmptyMessage()
        Returns the message to display when there are no items
      • withEmptyMessage

        IGrid withEmptyMessage​(@Nullable
                               java.lang.String emptyMessage)
        Returns a copy of this immutable component with the specified emptyMessage.

        Sets the message to display when there are no items

        Parameters:
        emptyMessage - The message to display when there are no items

        Default: null.

        Returns:
        A modified copy of the this object
      • getVisibleRows

        default int getVisibleRows()
        Returns the visible rows. Zero means no limitation.

        Default: 0.

      • withVisibleRows

        IGrid withVisibleRows​(int visibleRows)
        Returns a copy of this immutable component with the specified visibleRows.

        Sets the visible rows. Zero means no limitation.

        Parameters:
        visibleRows - The visible rows. Zero means no limitation.

        Default: 0.

        Returns:
        A modified copy of the this object
      • getInnerWidth

        default java.lang.String getInnerWidth()
        Returns the inner width of this component. The inner width is the width of the inner table.

        Default: "100%"

      • withInnerWidth

        IGrid withInnerWidth​(java.lang.String innerWidth)
        Returns a copy of this immutable component with the specified innerWidth.

        Sets the inner width of this component. The inner width is the width of the inner table. By default, it is 100%. That is, it is the same as the width of this component. However, it is changed when the user is sizing the column's width.

        Application developers rarely call this method, unless they want to preserve the widths of sizable columns changed by the user. To preserve the widths, the developer have to store the widths of all columns and the inner width (getInnerWidth()), and then restore them when re-creating this component.

        Parameters:
        innerWidth - The inner width of this component.

        Default: "100%".

        Returns:
        A modified copy of the this object
      • getAutosort

        @Nullable
        default java.lang.String getAutosort()
        Returns whether to sort all items when model or sort direction be changed.

        Default: false, if the "org.zkoss.zul.grid.autoSort" library property is not set in zk.xml.

        Note: it's meaningless if ListModel is not set.

      • withAutosort

        IGrid withAutosort​(@Nullable
                           java.lang.String autosort)
        Returns a copy of this immutable component with the specified autosort.

        Sets to enable the auto-sort facility to sort the model for this component. Meaningless if ListModel is not set.

        Parameters:
        autosort - The allowed values are null, "false", "true", and "ignore.change".

        Default: null.

        Returns:
        A modified copy of the this object
      • withAutosort

        default IGrid withAutosort​(@Nullable
                                   IGrid.Autosort autosort)
        Returns a copy of this immutable component with the specified autosort.

        Sets to enable the auto-sort facility to sort the model for this component. Meaningless if ListModel is not set.

        Parameters:
        autosort - The allowed values are null, "false", "true", and "ignore.change".

        Default: null.

        Returns:
        A modified copy of the this object
      • withOddRowSclass

        IGrid withOddRowSclass​(java.lang.String oddRowSclass)
        Returns a copy of this immutable component with the specified oddRowSclass.

        Sets the style class for the odd rows. If the style class doesn't exist, the striping effect disappears. You can provide different effects by providing the proper style classes.

        Parameters:
        oddRowSclass - The style class for the odd rows.

        Default: IHtmlBasedComponent.getZclass()-odd .

        Returns:
        A modified copy of the this object
      • getAuxhead

        default java.util.List<IAuxhead> getAuxhead()
        Returns the auxhead child.
      • withAuxhead

        IGrid withAuxhead​(java.lang.Iterable<? extends IAuxhead> auxhead)
        Returns a copy of this immutable component with the specified auxhead.

        Sets the list of auxhead as children to this component

        Parameters:
        auxhead - The auxhead children.

        Default: null.

        Returns:
        A modified copy of the this object
      • withAuxhead

        default IGrid withAuxhead​(IAuxhead... auxhead)
        Returns a copy of this immutable component with the specified auxhead.

        Sets the auxhead as a child to this component

        Parameters:
        auxhead - The auxhead child.

        Default: null.

        Returns:
        A modified copy of the this object
      • withAllComponents

        default IGrid withAllComponents​(java.lang.Iterable<? extends IMeshComposite> elements)
        Description copied from interface: IComposite
        Copy the current immutable object with elements that replace the content of children. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Specified by:
        withAllComponents in interface IComposite<IGrid,​IMeshComposite>
        Parameters:
        elements - An iterable of children elements to set
        Returns:
        A modified copy of this object
      • of

        static IGrid of​(java.lang.Iterable<? extends IRowBase> children)
        Returns the instance with the given IRowBase children.
        Parameters:
        children - The children of IRowBase
      • of

        static IGrid of​(IRowBase... children)
        Returns the instance with the given IRowBase children.
        Parameters:
        children - The children of IRowBase
      • ofColumns

        static IGrid ofColumns​(IColumns columns)
        Returns the instance with the given IColumns child.
        Parameters:
        columns - The IColumns child
      • ofFoot

        static IGrid ofFoot​(IFoot foot)
        Returns the instance with the given IFoot child.
        Parameters:
        foot - The IFoot child
      • ofId

        static IGrid ofId​(java.lang.String id)
        Returns the instance with the given id.
        Parameters:
        id - The id to identify this component