Class SimpleGridTableListModel

java.lang.Object
org.zkoss.zul.AbstractListModel<GridTableRow>
org.adempiere.webui.editor.grid.selection.SimpleGridTableListModel
All Implemented Interfaces:
Serializable, EventListener, TableModelListener, org.zkoss.zul.ext.Pageable, org.zkoss.zul.ext.Selectable<GridTableRow>, org.zkoss.zul.ext.Sortable<Object>, org.zkoss.zul.ListModel<GridTableRow>, org.zkoss.zul.PageableModel

public class SimpleGridTableListModel extends org.zkoss.zul.AbstractListModel<GridTableRow> implements TableModelListener, org.zkoss.zul.ext.Sortable<Object>
Author:
Low Heng Sin
See Also:
  • 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
  • Constructor Summary

    Constructors
    Constructor
    Description
    SimpleGridTableListModel(GridTable tableModel, int windowNo)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getElementAt(int rowIndex)
     
    int
    Get total number of rows
     
    void
    sort(Comparator<Object> cmpr, boolean ascending)
     
    void
     
    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, getPageSize, getSelection, getSelectionControl, isMultiple, isSelected, isSelectionEmpty, newEmptySelection, readSelection, removeAllSelection, removeFromSelection, removeListDataListener, removePagingEventListener, retainAllSelection, setActivePage, setMultiple, setPageSize, setSelection, setSelectionControl, writeSelection

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.zkoss.zul.ext.Sortable

    sort
  • Constructor Details

    • SimpleGridTableListModel

      public SimpleGridTableListModel(GridTable tableModel, int windowNo)
      Parameters:
      tableModel -
      windowNo -
  • Method Details

    • getElementAt

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

      public int getSize()
      Get total number of rows
      Specified by:
      getSize in interface org.zkoss.zul.ListModel<GridTableRow>
      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 -
      See Also:
      • Sortable.sort(Comparator, boolean)
    • tableChanged

      public void tableChanged(TableModelEvent e)
      Specified by:
      tableChanged in interface TableModelListener
      Parameters:
      e -
      See Also:
    • getSortDirection

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