Skip to content

Commit

Permalink
Update TemplatesPanel.java
Browse files Browse the repository at this point in the history
  • Loading branch information
G3G4X5X6 committed Nov 22, 2024
1 parent 4144009 commit 2fae126
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,15 @@ public void menuCanceled(MenuEvent e) {
private void refreshDataForTable() {
// 搜索功能
sorter = new TableRowSorter<>(tableModel);
sorter.setComparator(0, (o1, o2) -> {
try {
int num1 = Integer.parseInt(o1.toString());
int num2 = Integer.parseInt(o2.toString());
return Integer.compare(num1, num2);
} catch (NumberFormatException ex) {
return o1.toString().compareTo(o2.toString());
}
});
templatesTable.setRowSorter(sorter);
new Thread(() -> {
NucleiFrame.setStatusProgressBar(L.M("bar.tool.status.progressbar.text", "正在刷新模板列表,请稍后..."));
Expand Down

0 comments on commit 2fae126

Please sign in to comment.