本文整理了Java中javafx.scene.control.TableColumn.prefWidthProperty()
方法的一些代码示例,展示了TableColumn.prefWidthProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableColumn.prefWidthProperty()
方法的具体详情如下:
包路径:javafx.scene.control.TableColumn
类名称:TableColumn
方法名:prefWidthProperty
暂无
代码示例来源:origin: pmd/pmd
logMessageColumn.prefWidthProperty()
.bind(eventLogTableView.widthProperty()
.subtract(logCategoryColumn.getPrefWidth())
代码示例来源:origin: org.copper-engine/copper-monitoring-client
@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);
}
}
代码示例来源:origin: org.copper-engine/copper-monitoring-client
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));
代码示例来源:origin: org.tentackle/tentackle-fx
/**
* 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;
}
代码示例来源:origin: org.copper-engine/copper-monitoring-client
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);
代码示例来源:origin: org.copper-engine/copper-monitoring-client
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));
代码示例来源:origin: org.copper-engine/copper-monitoring-client
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));
代码示例来源:origin: org.copper-engine/copper-monitoring-client
typeCol.prefWidthProperty().bind(storageContentTable.widthProperty().subtract(2).multiply(0.75));
countCol.prefWidthProperty().bind(storageContentTable.widthProperty().subtract(2).multiply(0.25));
内容来源于网络,如有侵权,请联系作者删除!