本文整理了Java中javafx.scene.control.TableColumn.getSortType()
方法的一些代码示例,展示了TableColumn.getSortType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableColumn.getSortType()
方法的具体详情如下:
包路径:javafx.scene.control.TableColumn
类名称:TableColumn
方法名:getSortType
暂无
代码示例来源: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: 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: stackoverflow.com
for (TableColumn tc : tableView.getSortOrder()) {
oos.writeInt((Integer) tc.getUserData());
oos.writeObject(tc.getSortType());
代码示例来源:origin: org.tentackle/tentackle-fx
int sortIndex = sortOrder.indexOf(column);
if (isSortingIncluded() && sortIndex >= 0) {
columnPrefs.putInt(PREF_COLUMN_SORT_TYPE, column.getSortType().ordinal());
columnPrefs.putInt(PREF_COLUMN_SORT_INDEX, sortIndex);
内容来源于网络,如有侵权,请联系作者删除!