Package org.gwt.mosaic.ui.client.table.TableModelHelper

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


      Set<String> invertedNodes = request.getInvertedNodes();
      int numRows = request.getNumRows();
      int startRow = request.getStartRow();
      int currentRow = 0;
      ColumnSortList columnSortList = request.getColumnSortList();
      ColumnSortInfo columnSortInfo = columnSortList.getPrimaryColumnSortInfo();
      TreeItemComparator treeItemComparator = null;
      if (columnSortInfo != null) {
        List<ColumnDefinition<RowType, ?>> visibleColumnDefinitions = tableDefinition.getVisibleColumnDefinitions();
        ColumnDefinition<RowType, ?> sortableColumnDefinition = null;
        for (ColumnDefinition<RowType, ?> columnDefinition : visibleColumnDefinitions) {
          // if (columnDefinition.getColumnFilter() != null
          // && columnSortInfo != null) {
          // if (columnDefinition.getColumnFilter().getColumn() ==
          // columnSortInfo.getColumn()) {
          // sortableColumnDefinition = columnDefinition;
          // }
          // }
        }
        if (sortableColumnDefinition != null) {
          treeItemComparator = new TreeItemComparator(sortableColumnDefinition,
              columnSortInfo.isAscending());
          if (flattened) {
            Collections.sort(flattenedItems, treeItemComparator);
          } else {
            Collections.sort(rootItems, treeItemComparator);
          }
View Full Code Here


      throw new IndexOutOfBoundsException("Column index: " + column
          + ", Column size: " + numColumns);
    }

    // Add the sorting to the list of sorted columns
    columnSortList.add(new ColumnSortInfo(column, ascending));

    // Use the onSort method to actually sort the column
    Element[] selectedRows = getSelectedRowsMap().values().toArray(
        new Element[0]);
    deselectAllRows();
View Full Code Here

TOP

Related Classes of org.gwt.mosaic.ui.client.table.TableModelHelper.ColumnSortInfo

Copyright © 2018 www.massapicom. 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.