Package com.google.gwt.user.cellview.client

Examples of com.google.gwt.user.cellview.client.ColumnSortList$Delegate


   {
      filesCellTable_.addColumnSortHandler(new Handler() {
         @Override
         public void onColumnSort(ColumnSortEvent event)
         {    
            ColumnSortList sortList = event.getColumnSortList();

            // insert the default initial sort order for size and modified
            if (!applyingProgrammaticSort_)
            {
               if (event.getColumn().equals(sizeColumn_) &&
                   forceSizeSortDescending)
               {
                  forceSizeSortDescending = false;
                  forceModifiedSortDescending = true;
                  sortList.insert(0,
                                  new com.google.gwt.user.cellview.client.ColumnSortList.ColumnSortInfo(event.getColumn(), false));
               }
               else if (event.getColumn().equals(modifiedColumn_) &&
                        forceModifiedSortDescending)
               {
                  forceModifiedSortDescending = false;
                  forceSizeSortDescending = true;
                  sortList.insert(0,
                                  new com.google.gwt.user.cellview.client.ColumnSortList.ColumnSortInfo(event.getColumn(), false));
               }
               else
               {
                  forceModifiedSortDescending = true;
                  forceSizeSortDescending = true;
               }
            }
           
            // record sort order and fire event to observer
            JsArray<ColumnSortInfo> sortOrder = newSortOrderArray();
            for (int i=0; i<sortList.size(); i++)
            {
               // match the column index
               com.google.gwt.user.cellview.client.ColumnSortList.ColumnSortInfo sortInfo = sortList.get(i);
               Object column = sortInfo.getColumn();
              
               for (int c=0; c<filesCellTable_.getColumnCount(); c++)
               {
                  if (filesCellTable_.getColumn(c).equals(column))
View Full Code Here


      {
         ColumnSortInfo.setSortList(filesCellTable_, sortOrder);
      }
      else
      {
         ColumnSortList columnSortList = filesCellTable_.getColumnSortList();
         columnSortList.clear();
         columnSortList.push(nameColumn_);
      }
   }
View Full Code Here

   }

   public static ColumnSortList setSortList(CellTable<?> table,
                                            JsArray<ColumnSortInfo> sortArray)
   {
      ColumnSortList list = table.getColumnSortList();
      list.clear();
      for (int i = 0; i < sortArray.length(); i++)
         list.insert(i, sortArray.get(i).toGwtSortInfo(table));
      return list;
   }
View Full Code Here

   }

   @SuppressWarnings("rawtypes")
   public static JsArray<ColumnSortInfo> getSortList(CellTable table)
   {
      ColumnSortList sortList = table.getColumnSortList();
      JsArray<ColumnSortInfo> result = JsArray.createArray().cast();
      for (int i = 0; i < sortList.size(); i++)
         result.push(fromGwtSortInfo(table, sortList.get(i)));
      return result;
   }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.cellview.client.ColumnSortList$Delegate

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.