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

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

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

TableView.widthProperty介绍

暂无

代码示例

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

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

代码示例来源:origin: org.jrebirth.af.showcase/todos

  1. @Override
  2. protected void showView() {
  3. super.showView();
  4. view().getTable().widthProperty().addListener(new ChangeListener<Number>() {
  5. @Override
  6. public void changed(final ObservableValue<? extends Number> obs, final Number oldValue, final Number newValue) {
  7. final Pane header = (Pane) view().getTable().lookup("TableHeaderRow");
  8. if (header.isVisible()) {
  9. header.setMaxHeight(0);
  10. header.setMinHeight(0);
  11. header.setPrefHeight(0);
  12. header.setVisible(false);
  13. }
  14. }
  15. });
  16. }

代码示例来源:origin: org.jrebirth.af.showcase/todos

  1. @Override
  2. protected void showView() {
  3. super.showView();
  4. view().getTable().widthProperty().addListener(new ChangeListener<Number>() {
  5. @Override
  6. public void changed(ObservableValue<? extends Number> obs, Number oldValue, Number newValue) {
  7. final Pane header = (Pane) view().getTable().lookup("TableHeaderRow");
  8. if (header.isVisible()) {
  9. header.setMaxHeight(0);
  10. header.setMinHeight(0);
  11. header.setPrefHeight(0);
  12. header.setVisible(false);
  13. }
  14. }
  15. });
  16. }

代码示例来源: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: com.nexitia.emaginplatform/emagin-jfxcore-engine

  1. tableColumn.prefWidthProperty().bind(tableView.widthProperty().multiply(Double.valueOf(prefWidth)));
  2. } else {
  3. tableColumn.prefWidthProperty().bind(tableView.widthProperty().multiply(Double.valueOf(0.10)));

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

  1. tableColumn.prefWidthProperty().bind(tableView.widthProperty().multiply(Double.valueOf(prefWidth)));
  2. } else {
  3. tableColumn.prefWidthProperty().bind(tableView.widthProperty().multiply(Double.valueOf(0.10)));

代码示例来源: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: com.nexitia.emaginplatform/emagin-jfxcore-engine

  1. tableView.widthProperty().addListener((ChangeListener<Number>) (observable, oldValue, newValue) -> {
  2. if (processTableWidthChangeService.isRunning()) {
  3. processTableWidthChangeService.cancel();

代码示例来源: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));

相关文章