/*
   * (non-Javadoc)
   * @see org.zkoss.zul.ListModelList#sort(java.util.Comparator, boolean)
   */
  public void sort(Comparator<Object> cmpr, boolean ascending) {
    if (sorter != null) sorter.sort(cmpr, ascending);
    else Collections.sort(this.getInnerList(), cmpr);

    WTableModelEvent event =
        new WTableModelEvent(this, WTableModelEvent.ALL_ROWS, WTableModelEvent.ALL_COLUMNS);

    fireTableChange(event);

    return;
  }
Exemple #2
0
 @SuppressWarnings("unchecked")
 private void sortListModel(Sortable model, Comparator cmpr, boolean ascending) {
   model.sort(cmpr, ascending);
 }