List of usage examples for com.google.gwt.user.cellview.client ColumnSortList push
public void push(ColumnSortInfo sortInfo)
From source file:client.ui.views.series.TableSeriesView.java
License:Open Source License
/** * Update list of sorted columns.//ww w . j a v a2 s . co m * * @param columnSortList Table {@code ColumnSortList}. * @param ordering Ordering criteria. */ private void updateColumnSortList(ColumnSortList columnSortList, SeriesManager.Ordering ordering) { Column<?, ?> column; int by = ordering.getBy(); if (by == SeriesManager.Ordering.BY_COUNTRY_NAME) { column = CountryNameColumn.get(); } else { column = YearColumn.get(by); } ColumnSortList.ColumnSortInfo columnSortInfo = new ColumnSortList.ColumnSortInfo(column, ordering.isAscending()); columnSortList.clear(); columnSortList.push(columnSortInfo); }
From source file:com.gafactory.core.client.ui.grids.BaseListGrid.java
License:Open Source License
public void setDefaultSortingColumn(Column<?, ?> column, boolean isAsc) { column.setDefaultSortAscending(isAsc); ColumnSortList columnSortList = dataGrid.getColumnSortList(); columnSortList.push(column); ColumnSortEvent.fire(this, columnSortList); loader.addSortInfo(new SortInfoBean(column.getDataStoreName(), column.isDefaultSortAscending() ? SortDir.ASC : SortDir.DESC)); }
From source file:com.gwtmodel.table.view.table.PresentationTable.java
License:Apache License
private void setSortCol() { if (sortCol == null) { return;//from w ww .j ava2 s . c om } if (!columnC) { return; } ColumnSortList sList = table.getColumnSortList(); sList.clear(); for (int i = 0; i < table.getColumnCount(); i++) { Column<MutableInteger, ?> co = table.getColumn(i); VListHeaderDesc v = model.getHeaderList().getVisHeList().get(i); if (v.getFie().eq(sortCol)) { ColumnSortList.ColumnSortInfo sInfo = new ColumnSortList.ColumnSortInfo(co, !sortInc); sList.push(sInfo); ColumnSortEvent.fire(table, sList); break; } } }
From source file:org.opencms.ade.sitemap.client.alias.CmsAliasView.java
License:Open Source License
/** * Ensures that rows with errors will be placed at the top of the table.<p> *///from w w w . j ava2s .c o m public void sortByErrors() { ColumnSortList columnSort = m_table.getColumnSortList(); columnSort.clear(); columnSort.push(m_table.getErrorColumn()); columnSort.push(m_table.getErrorColumn()); ColumnSortEvent.fire(m_table, columnSort); }
From source file:org.rstudio.studio.client.workbench.views.files.ui.FilesList.java
License:Open Source License
public void setColumnSortOrder(JsArray<ColumnSortInfo> sortOrder) { if (sortOrder != null) { ColumnSortInfo.setSortList(filesCellTable_, sortOrder); } else {// w w w.j a v a 2 s.c om ColumnSortList columnSortList = filesCellTable_.getColumnSortList(); columnSortList.clear(); columnSortList.push(nameColumn_); } }