logMessageColumn.prefWidthProperty() .bind(eventLogTableView.widthProperty() .subtract(logCategoryColumn.getPrefWidth())
@Override public void showFilteredResult(List<SqlResultModel> filteredResult, SqlFilterModel usedFilter) { resultTable.getColumns().clear(); if (!filteredResult.isEmpty()) { for (int i = 0; i < filteredResult.get(0).rows.size(); i++) { TableColumn<SqlResultModel, String> rowColumn = new TableColumn<SqlResultModel, String>(); rowColumn.setText(filteredResult.get(0).rows.get(i).get()); final int rowIndex = i; rowColumn.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<SqlResultModel, String>, ObservableValue<String>>() { @Override public ObservableValue<String> call(CellDataFeatures<SqlResultModel, String> param) { return param.getValue().rows.get(rowIndex); } });// -3 for the border rowColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).divide(filteredResult.get(0).rows.size())); resultTable.getColumns().add(rowColumn); } ObservableList<SqlResultModel> content = FXCollections.observableArrayList(); content.addAll(filteredResult); content.remove(0); setOriginalItems(resultTable, content); } }
timeColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.15)); timeout.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.15)); messageColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.45)); idColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.25));
/** * Creates a totals column from the original bound column. * * @param boundColumn the original column * @return the totals column */ @SuppressWarnings("unchecked") protected TableColumn<S,?> createTotalsColumn(TableColumn<S,?> boundColumn) { TableColumn totalsColumn = new TableColumn<>(); if (isSummable(boundColumn)) { totalsColumn.setCellValueFactory(boundColumn.getCellValueFactory()); totalsColumn.setCellFactory(boundColumn.getCellFactory()); } // sync column widths totalsColumn.prefWidthProperty().bind(boundColumn.widthProperty()); // sync visibility totalsColumn.visibleProperty().bind(boundColumn.visibleProperty()); return totalsColumn; }
countColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(2).multiply(0.075)); workflowClassColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(2).multiply(0.525)); double totalSpaceForStateColumns = 0.4; tableColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(2).multiply(totalSpaceForStateColumns / WorkflowInstanceState.values().length)); resultTable.getColumns().add(tableColumn);
timeColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.15)); loglevelColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.05)); locationColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.05)); messageColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.73));
idColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.11)); prioritynColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.07)); processorPoolColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.09)); stateColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.07)); timeoutColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.09)); lastActivityTimestamp.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.11)); overallLifetimeInMs.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.09)); startTime.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.09)); finishTime.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.09)); lastErrorTime.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.09)); errorInfos.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.1));
typeCol.prefWidthProperty().bind(storageContentTable.widthProperty().subtract(2).multiply(0.75)); countCol.prefWidthProperty().bind(storageContentTable.widthProperty().subtract(2).multiply(0.25));