javafx.scene.control.TreeView.setPrefWidth()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(139)

本文整理了Java中javafx.scene.control.TreeView.setPrefWidth()方法的一些代码示例,展示了TreeView.setPrefWidth()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TreeView.setPrefWidth()方法的具体详情如下:
包路径:javafx.scene.control.TreeView
类名称:TreeView
方法名:setPrefWidth

TreeView.setPrefWidth介绍

暂无

代码示例

代码示例来源:origin: com.aquafx-project/aquafx

tree.setPrefWidth(150);
treeContainer.getChildren().add(tree);

代码示例来源:origin: org.copper-engine/copper-monitoring-client

@Override
public Node createContent() {
  BorderPane pane = new BorderPane();
  workflowView.setPrefWidth(600);
  pane.setCenter(workflowView);
  Button refreshButton = new Button("Refresh");
  BorderPane.setMargin(refreshButton, new Insets(5));
  pane.setBottom(refreshButton);
  controller.refresh(copperDataProvider.getWorkflowClassesList(filterController.getFilter().selectedEngine.get().getId()));
  controller.selectedItem.addListener(new ChangeListener<WorkflowVersion>() {
    @Override
    public void changed(ObservableValue<? extends WorkflowVersion> observable, WorkflowVersion oldValue, WorkflowVersion newValue) {
      if (newValue != null) {
        filterController.setFilter(newValue);
        filterController.startValueSetAnimation();
      }
    }
  });
  refreshButton.setOnAction(new EventHandler<ActionEvent>() {
    @Override
    public void handle(ActionEvent actionEvent) {
      controller.refresh(copperDataProvider.getWorkflowClassesList(filterController.getFilter().selectedEngine.get().getId()));
    }
  });
  return pane;
}

代码示例来源:origin: com.aquafx-project/aquafx

tree.setPrefWidth(400);
treeContainer.getChildren().add(tree);
tabTreeBox.setContent(treeContainer);

相关文章