Example usage for com.google.gwt.user.cellview.client ColumnSortList clear

List of usage examples for com.google.gwt.user.cellview.client ColumnSortList clear

Introduction

In this page you can find the example usage for com.google.gwt.user.cellview.client ColumnSortList clear.

Prototype

public void clear() 

Source Link

Document

Removes all of the elements from this list.

Usage

From source file:client.ui.views.series.TableSeriesView.java

License:Open Source License

/**
 * Update list of sorted columns./*from w w w  .ja v a2s .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.gwtmodel.table.view.table.PresentationTable.java

License:Apache License

private void setSortCol() {
    if (sortCol == null) {
        return;//from  w  ww.j a  v a  2s. c o m
    }
    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:com.gwtmodel.table.view.table.PresentationTable.java

License:Apache License

@Override
public void removeSort() {
    if (table == null) {
        return;//  www.  j a v  a  2  s  .  c om
    }
    ColumnSortList sortList = table.getColumnSortList();
    if (sortList == null) {
        return;
    }
    while (sortList.size() > 0) {
        // ColumnSortInfo i = sortList.get(0);
        // sortList.remove(i);
        sortList.clear();
    }

}

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>
 *//*  w  w w  . j a  va  2s  .  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.core.client.cellview.ColumnSortInfo.java

License:Open Source License

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;//from   w  w  w.j a  v  a 2  s  . c  o m
}

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 {/*ww w .  jav  a  2s  .  com*/
        ColumnSortList columnSortList = filesCellTable_.getColumnSortList();
        columnSortList.clear();
        columnSortList.push(nameColumn_);
    }
}