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

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

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

TableColumn.prefWidthProperty介绍

暂无

代码示例

代码示例来源:origin: pmd/pmd

  1. logMessageColumn.prefWidthProperty()
  2. .bind(eventLogTableView.widthProperty()
  3. .subtract(logCategoryColumn.getPrefWidth())

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

  1. @Override
  2. public void showFilteredResult(List<SqlResultModel> filteredResult, SqlFilterModel usedFilter) {
  3. resultTable.getColumns().clear();
  4. if (!filteredResult.isEmpty()) {
  5. for (int i = 0; i < filteredResult.get(0).rows.size(); i++) {
  6. TableColumn<SqlResultModel, String> rowColumn = new TableColumn<SqlResultModel, String>();
  7. rowColumn.setText(filteredResult.get(0).rows.get(i).get());
  8. final int rowIndex = i;
  9. rowColumn.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<SqlResultModel, String>, ObservableValue<String>>() {
  10. @Override
  11. public ObservableValue<String> call(CellDataFeatures<SqlResultModel, String> param) {
  12. return param.getValue().rows.get(rowIndex);
  13. }
  14. });// -3 for the border
  15. rowColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).divide(filteredResult.get(0).rows.size()));
  16. resultTable.getColumns().add(rowColumn);
  17. }
  18. ObservableList<SqlResultModel> content = FXCollections.observableArrayList();
  19. content.addAll(filteredResult);
  20. content.remove(0);
  21. setOriginalItems(resultTable, content);
  22. }
  23. }

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

  1. timeColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.15));
  2. timeout.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.15));
  3. messageColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.45));
  4. idColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.25));

代码示例来源:origin: org.tentackle/tentackle-fx

  1. /**
  2. * Creates a totals column from the original bound column.
  3. *
  4. * @param boundColumn the original column
  5. * @return the totals column
  6. */
  7. @SuppressWarnings("unchecked")
  8. protected TableColumn<S,?> createTotalsColumn(TableColumn<S,?> boundColumn) {
  9. TableColumn totalsColumn = new TableColumn<>();
  10. if (isSummable(boundColumn)) {
  11. totalsColumn.setCellValueFactory(boundColumn.getCellValueFactory());
  12. totalsColumn.setCellFactory(boundColumn.getCellFactory());
  13. }
  14. // sync column widths
  15. totalsColumn.prefWidthProperty().bind(boundColumn.widthProperty());
  16. // sync visibility
  17. totalsColumn.visibleProperty().bind(boundColumn.visibleProperty());
  18. return totalsColumn;
  19. }

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

  1. countColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(2).multiply(0.075));
  2. workflowClassColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(2).multiply(0.525));
  3. double totalSpaceForStateColumns = 0.4;
  4. tableColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(2).multiply(totalSpaceForStateColumns / WorkflowInstanceState.values().length));
  5. resultTable.getColumns().add(tableColumn);

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

  1. timeColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.15));
  2. loglevelColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.05));
  3. locationColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.05));
  4. messageColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.73));

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

  1. idColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.11));
  2. prioritynColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.07));
  3. processorPoolColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.09));
  4. stateColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.07));
  5. timeoutColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.09));
  6. lastActivityTimestamp.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.11));
  7. overallLifetimeInMs.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.09));
  8. startTime.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.09));
  9. finishTime.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.09));
  10. lastErrorTime.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.09));
  11. errorInfos.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.1));

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

  1. typeCol.prefWidthProperty().bind(storageContentTable.widthProperty().subtract(2).multiply(0.75));
  2. countCol.prefWidthProperty().bind(storageContentTable.widthProperty().subtract(2).multiply(0.25));

相关文章