static TableView<CommandEntry> createCommandTable(final ObservableList<CommandEntry> commands) {
TableView<CommandEntry> table = new TableView<>();
SortedList<CommandEntry> items = new SortedList<>(commands);
items.comparatorProperty().bind(table.comparatorProperty());
table.setItems(items);
TableColumn<CommandEntry, String> col1 = new TableColumn<>("Command");
col1.setCellValueFactory(new PropertyValueFactory<>("text"));
TableColumn<CommandEntry, String> col2 = new TableColumn<>("Menu Path");
col2.setCellValueFactory(new PropertyValueFactory<>("menuPath"));
table.getColumns().add(col1);
table.getColumns().add(col2);
table.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
table.setFocusTraversable(false);
return table;
}
CommandFinderTools.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:qupath
作者:
评论列表
文章目录