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

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


      boolean flattened = request.isFlattened();
      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) {
View Full Code Here


    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

   *      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

    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

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

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.