DbgTraceView.java 文件源码

java
阅读 19 收藏 0 点赞 0 评论 0

项目:erlyberly 作者:
public DbgTraceView(DbgController aDbgController) {
    dbgController = aDbgController;
    sortedTtraces = new SortedList<TraceLog>(dbgController.getTraceLogs());
    filteredTraces = new FilteredList<TraceLog>(sortedTtraces);

    setSpacing(5d);
    setStyle("-fx-background-insets: 5;");
    setMaxHeight(Double.MAX_VALUE);

    tracesBox = new TableView<TraceLog>();
    tracesBox.getStyleClass().add("trace-log-table");
    tracesBox.setOnMouseClicked(this::onTraceClicked);
    tracesBox.setMaxHeight(Double.MAX_VALUE);
    VBox.setVgrow(tracesBox, Priority.ALWAYS);

    putTableColumns();

    // #47 double wrapping the filtered list in another sorted list, otherwise
    // the table cannot be sorted on columns. Binding the items will throw exceptions
    // when sorting on columns.
    // see http://code.makery.ch/blog/javafx-8-tableview-sorting-filtering/
    SortedList<TraceLog> sortedData = new SortedList<>(filteredTraces);
    sortedData.comparatorProperty().bind(tracesBox.comparatorProperty());
    tracesBox.setItems(sortedData);

    putTraceContextMenu();

    Parent p = traceLogFloatySearchControl();

    getChildren().addAll(p, tracesBox);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号