public static void setTableSorter(KDTable table) {
table.checkParsed();
KDTSortManager sm = new KDTSortManager(table);
sm.setEnableSortable(true);
sm.setSortAuto(true);
for(int i = 0; i < table.getColumnCount(); ++i) {
table.getColumn(i).setSortable(true);
}
}
table.checkParsed();
KDTSortManager sm = new KDTSortManager(table);
sm.setEnableSortable(true);
sm.setSortAuto(true);
for(int i = 0; i < table.getColumnCount(); ++i) {
table.getColumn(i).setSortable(true);
}
}
本文介绍了一段用于设置 KDTable 类型表格排序功能的 Java 代码实现。该方法通过 KDTSortManager 对象启用自动排序,并确保表格的所有列均可进行排序。

2035

被折叠的 条评论
为什么被折叠?



