本文整理了Java中javafx.scene.control.TableView.getSortOrder()
方法的一些代码示例,展示了TableView.getSortOrder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableView.getSortOrder()
方法的具体详情如下:
包路径:javafx.scene.control.TableView
类名称:TableView
方法名:getSortOrder
暂无
代码示例来源:origin: stackoverflow.com
TableView rooms;
...
TableColumn sortcolumn = null;
SortType st = null;
if (rooms.getSortOrder().size()>0) {
sortcolumn = (TableColumn) rooms.getSortOrder().get(0);
st = sortcolumn.getSortType();
}
代码示例来源:origin: ssaring/sportstracker
@SuppressWarnings("unchecked")
@Override
protected void setupDefaultSorting() {
// default sort order is by date descending
tcDate.setSortType(TableColumn.SortType.DESCENDING);
tvNotes.getSortOrder().addAll(tcDate);
}
代码示例来源:origin: ssaring/sportstracker
@SuppressWarnings("unchecked")
@Override
protected void setupDefaultSorting() {
// default sort order is by date descending
tcDate.setSortType(TableColumn.SortType.DESCENDING);
tvWeights.getSortOrder().addAll(tcDate);
}
代码示例来源:origin: ssaring/sportstracker
@SuppressWarnings("unchecked")
@Override
protected void setupDefaultSorting() {
// default sort order is by date descending
tcDate.setSortType(TableColumn.SortType.DESCENDING);
tvExercises.getSortOrder().addAll(tcDate);
}
代码示例来源:origin: org.controlsfx/controlsfx
@Override public void sort(TableView<TableModelRow<S>> table) {
List<SortKey> sortKeys = new ArrayList<>();
for (TableColumn<TableModelRow<S>, ?> column : table.getSortOrder()) {
final int columnIndex = table.getVisibleLeafIndex(column);
final SortType sortType = column.getSortType();
SortOrder sortOrder = sortType == SortType.ASCENDING ? SortOrder.ASCENDING :
sortType == SortType.DESCENDING ? SortOrder.DESCENDING :
SortOrder.UNSORTED;
SortKey sortKey = new SortKey(columnIndex, sortOrder);
sortKeys.add(sortKey);
sorter.setComparator(columnIndex, column.getComparator());
}
sorter.setSortKeys(sortKeys);
sorter.sort();
}
};
代码示例来源:origin: com.aquafx-project/aquafx
tableView.getSelectionModel().select(5,nameCol);
tableView.getSortOrder().addAll(nameCol,emailCol,countryCol);
return tableView;
代码示例来源:origin: com.aquafx-project/aquafx
tableView.getSelectionModel().select(4,lastNameCol);
tableView.getSortOrder().addAll(firstNameCol,lastNameCol,emailCol,countryCol);
return tableView;
内容来源于网络,如有侵权,请联系作者删除!