本文整理汇总了Java中com.google.gwt.user.cellview.client.ColumnSortEvent.fire方法的典型用法代码示例。如果您正苦于以下问题:Java ColumnSortEvent.fire方法的具体用法?Java ColumnSortEvent.fire怎么用?Java ColumnSortEvent.fire使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.cellview.client.ColumnSortEvent
的用法示例。
在下文中一共展示了ColumnSortEvent.fire方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkStatusChanges
import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
private void checkStatusChanges(Set<T> entities) {
boolean sort = false;
for(T entity : entities) {
if(entity.getStatus().equals(Status.PENDING)) {
addAprroveRejectColumns(entity);
dataProvider.getList().add(entity);
sort = true;
} else {
fireUpdateEvent(entity);
}
}
if(sort) {
ColumnSortEvent.fire(table, table.getColumnSortList());
}
}
示例2: addSort
import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
public void addSort(ModelColumn aColumn, boolean isAscending) {
if (aColumn.isSortable()) {
boolean contains = false;
int containsAt = -1;
for (int i = 0; i < sortList.size(); i++) {
if (sortList.get(i).getColumn() == aColumn) {
contains = true;
containsAt = i;
break;
}
}
if (contains) {
boolean wasAscending = sortList.get(containsAt).isAscending();
if (wasAscending == isAscending) {
return;
}
}
sortList.insert(sortList.size(), new ColumnSortList.ColumnSortInfo(aColumn, isAscending));
ColumnSortEvent.fire(Grid.this, sortList);
redrawHeaders();
}
}
示例3: unsortColumn
import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
public void unsortColumn(ModelColumn aColumn) {
if (aColumn.isSortable()) {
boolean contains = false;
int containsAt = -1;
for (int i = 0; i < sortList.size(); i++) {
if (sortList.get(i).getColumn() == aColumn) {
contains = true;
containsAt = i;
break;
}
}
if (contains) {
sortList.remove(sortList.get(containsAt));
ColumnSortEvent.fire(Grid.this, sortList);
redrawHeaders();
}
}
}
示例4: onSuccess
import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
@Override
public void onSuccess(List<T> entities) {
if(selection != null) {
selection.clear();
errorLabel.setVisible(false);
}
dataProvider.getList().clear();
addAprroveRejectColumns(entities);
dataProvider.getList().addAll(entities);
ColumnSortEvent.fire(table, table.getColumnSortList());
busyIndicator.idle();
}
示例5: onSuccess
import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
@Override
public void onSuccess(List<ControlledVocabularyTerm> terms) {
if(selection != null) {
selection.clear();
}
dataProvider.getList().clear();
dataProvider.getList().addAll(terms);
// if client side sorting matches default server side
// sorting then no need to sort again on client
if(table.getColumnSortList().size() > 0
&& !(table.getColumnSortList().get(0).getColumn() instanceof UsageColumn)
&& table.getColumnSortList().get(0).isAscending()) {
ColumnSortEvent.fire(table, table.getColumnSortList());
}
if(selection != null && selectOnLoad != null) {
int index = dataProvider.getList().indexOf(selectOnLoad);
if(index >= 0) {
index = index/table.getPageSize() * table.getPageSize();
table.setVisibleRange(index, table.getPageSize());
selection.clear();
selection.setSelected(selectOnLoad, true);
selectOnLoad = null;
}
}
domainDropBox.setEnabled(true);
contextDropBox.setEnabled(true);
sourceDropBox.setEnabled(true);
busyIndicator.idle();
}
示例6: setData
import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
/**
* @param data the data.
*/
public void setData(List<T> data) {
_dataProvider.getList().clear();
if (data != null) {
_dataProvider.getList().addAll(data);
ColumnSortEvent.fire(_table, _table.getColumnSortList());
}
}
示例7: setLoadingData
import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
public void setLoadingData(ListDataProvider<T> dataProvider, Collection<? extends T> data) {
if (data == null) {
setEmptyTableWidget(getLoadingIndicator());
dataProvider.getList().clear();
} else {
setEmptyTableWidget(emptyTableWidget);
ClientUtils.replaceListDataProviderContents(dataProvider, data);
ColumnSortEvent.fire(this, getColumnSortList());
}
redraw();
}
示例8: unsort
import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
public void unsort() {
sortList.clear();
ColumnSortEvent.fire(Grid.this, sortList);
redrawHeaders();
}