本文整理了Java中com.vaadin.v7.ui.Table.sort()
方法的一些代码示例,展示了Table.sort()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.sort()
方法的具体详情如下:
包路径:com.vaadin.v7.ui.Table
类名称:Table
方法名:sort
[英]Sorts the table by currently selected sorting column.
[中]按当前选定的排序列对表进行排序。
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
/**
* Sorts the table by currently selected sorting column.
*
* @throws UnsupportedOperationException
* if the container data source does not implement
* Container.Sortable
*/
public void sort() {
if (getSortContainerPropertyId() == null) {
return;
}
sort(new Object[] { sortContainerPropertyId },
new boolean[] { sortAscending });
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
/**
* Internal method to set sort ascending. With doSort flag actual sort can
* be bypassed.
*
* @param ascending
* @param doSort
*/
private void setSortAscending(boolean ascending, boolean doSort) {
if (sortAscending != ascending) {
sortAscending = ascending;
if (doSort) {
sort();
// Assures the visual refresh. This should not be necessary as
// sort() calls refreshRowCache
refreshRenderedCells();
}
}
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
/**
* Internal method to set currently sorted column property id. With doSort
* flag actual sorting may be bypassed.
*
* @param propertyId
* @param doSort
*/
private void setSortContainerPropertyId(Object propertyId, boolean doSort) {
if ((sortContainerPropertyId != null
&& !sortContainerPropertyId.equals(propertyId))
|| (sortContainerPropertyId == null && propertyId != null)) {
sortContainerPropertyId = propertyId;
if (doSort) {
sort();
// Assures the visual refresh. This should not be necessary as
// sort() calls refreshRowCache
refreshRenderedCells();
}
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
@Override
public void sortBy(Object propertyId, boolean ascending) {
if (isSortable()) {
component.setSortAscending(ascending);
component.setSortContainerPropertyId(propertyId);
component.sort();
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
@Override
public void sort(String columnId, SortDirection direction) {
Column column = getColumn(columnId);
if (column == null) {
throw new IllegalArgumentException("Unable to find column " + columnId);
}
if (isSortable()) {
component.setSortAscending(direction == SortDirection.ASCENDING);
component.setSortContainerPropertyId(column.getId());
component.sort();
}
}
代码示例来源:origin: OpenNMS/opennms
void refreshTable() {
if (m_table != null) {
m_beanItemContainer = WallboardProvider.getInstance().getBeanContainer();
m_table.setContainerDataSource(m_beanItemContainer);
m_table.setVisibleColumns(new Object[]{"title", "Edit", "Remove", "Preview", "Default"});
m_table.setColumnHeader("title", "Title");
m_table.sort();
m_table.refreshRowCache();
}
}
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
this.sort();
resetPageBuffer();
代码示例来源:origin: viritin/viritin
super.sort(propertyId, ascending);
defaultTableSortingMethod = true;
代码示例来源:origin: OpenNMS/opennms
m_table.sort(new Object[]{"name"}, new boolean[]{true});
内容来源于网络,如有侵权,请联系作者删除!