Examples of ColumnSortList


Examples of org.gwt.mosaic.ui.client.table.TableModelHelper.ColumnSortList

    provider = new Provider<RowType>() {
      public void requestRows(final Request request,
          TableModel.Callback<RowType> callback) {
        // Get the primary column and sort order
        final ColumnSortList sortList = request.getColumnSortList();
        final int column = sortList.getPrimaryColumn();
        final boolean ascending = sortList.isPrimaryAscending();

        // Sort the row elements
        if (DefaultTableModel.this.columnComparator != null) {
          Collections.sort(data, new Comparator<RowType>() {
            public int compare(RowType o1, RowType o2) {
View Full Code Here

Examples of org.gwt.mosaic.ui.client.table.TableModelHelper.ColumnSortList

   *      org.gwt.mosaic.ui.client.table.TableModel.Callback)
   */
  @Override
  public void requestRows(Request request, Callback<RowType> callback) {
    // Clear the cache if the sort order has changed
    ColumnSortList sortList = request.getColumnSortList();
    if (sortList == null) {
      if (lastSortList != null) {
        clearCache();
        lastSortList = null;
      }
    } else if (!sortList.equals(lastSortList)) {
      clearCache();
      lastSortList = sortList.copy();
    }

    // Check if all requested rows are in the cache
    int startRow = request.getStartRow();
    int numRows = request.getNumRows();
View Full Code Here

Examples of org.gwt.mosaic.ui.client.table.TableModelHelper.ColumnSortList

    dataTable.addColumnSortHandler(new ColumnSortHandler() {
      public void onColumnSorted(ColumnSortEvent event) {
        // Get the primary column and sort order
        int column = -1;
        boolean ascending = true;
        ColumnSortList sortList = event.getColumnSortList();
        if (sortList != null) {
          column = sortList.getPrimaryColumn();
          ascending = sortList.isPrimaryAscending();
        }

        // Remove the sorted column indicator
        if (isColumnSortable(column)) {
          Element parent = DOM.getParent(sortedColumnWrapper);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.