Class GridTableListModel

    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.zkoss.zul.AbstractListModel

        org.zkoss.zul.AbstractListModel.DefaultSelectionControl<E extends Object>
    • Field Summary

      • Fields inherited from class org.zkoss.zul.AbstractListModel

        _selection
      • Fields inherited from interface org.zkoss.zul.PageableModel

        INTERNAL_EVENT
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Object getElementAt​(int rowIndex)  
      int getPage()  
      int getPageSize()
      Get number of rows per page
      int getSize()
      Get total number of rows
      String getSortDirection​(Comparator<Object> cmpr)  
      void setEditing​(boolean b)  
      void setPage​(int pg)
      set current page no ( starting from 0 )
      void setPageSize​(int pgSize)
      Set number of rows per page
      void sort​(Comparator<Object> cmpr, boolean ascending)  
      void tableChanged​(TableModelEvent e)  
      void updateComponent​(int row)
      Request components that attached to this model to re-render a row.
      void updateComponent​(int fromRow, int toRow)
      Request components that attached to this model to re-render a range of row.
      • Methods inherited from class org.zkoss.zul.AbstractListModel

        addListDataListener, addPagingEventListener, addToSelection, clearSelection, clone, fireEvent, fireSelectionEvent, getActivePage, getPageCount, getSelection, getSelectionControl, isMultiple, isSelected, isSelectionEmpty, newEmptySelection, readSelection, removeAllSelection, removeFromSelection, removeListDataListener, removePagingEventListener, retainAllSelection, setActivePage, setMultiple, setSelection, setSelectionControl, writeSelection
      • Methods inherited from interface org.zkoss.zul.ext.Sortable

        sort
    • Constructor Detail

      • GridTableListModel

        public GridTableListModel​(GridTable tableModel,
                                  int windowNo)
        Parameters:
        tableModel -
        windowNo -
    • Method Detail

      • getElementAt

        public Object getElementAt​(int rowIndex)
        Specified by:
        getElementAt in interface org.zkoss.zul.ListModel<Object>
        Parameters:
        rowIndex -
        See Also:
        ListModel.getElementAt(int)
      • setPage

        public void setPage​(int pg)
        set current page no ( starting from 0 )
        Parameters:
        pg -
      • getPage

        public int getPage()
        Returns:
        current page no ( starting from 0 )
      • setPageSize

        public void setPageSize​(int pgSize)
        Set number of rows per page
        Specified by:
        setPageSize in interface org.zkoss.zul.ext.Pageable
        Overrides:
        setPageSize in class org.zkoss.zul.AbstractListModel<Object>
        Parameters:
        pgSize -
      • getPageSize

        public int getPageSize()
        Get number of rows per page
        Specified by:
        getPageSize in interface org.zkoss.zul.ext.Pageable
        Overrides:
        getPageSize in class org.zkoss.zul.AbstractListModel<Object>
        Returns:
        pageSize
      • getSize

        public int getSize()
        Get total number of rows
        Specified by:
        getSize in interface org.zkoss.zul.ListModel<Object>
        Returns:
        int
        See Also:
        ListModel.getSize()
      • updateComponent

        public void updateComponent​(int row)
        Request components that attached to this model to re-render a row.
        Parameters:
        row -
      • updateComponent

        public void updateComponent​(int fromRow,
                                    int toRow)
        Request components that attached to this model to re-render a range of row.
        Parameters:
        fromRow -
        toRow -
      • sort

        public void sort​(Comparator<Object> cmpr,
                         boolean ascending)
        Specified by:
        sort in interface org.zkoss.zul.ext.Sortable<Object>
        Parameters:
        cmpr -
        ascending -
      • setEditing

        public void setEditing​(boolean b)
        Parameters:
        b -
      • getSortDirection

        public String getSortDirection​(Comparator<Object> cmpr)
        Specified by:
        getSortDirection in interface org.zkoss.zul.ext.Sortable<Object>