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

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

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

TableColumn.setGraphic介绍

暂无

代码示例

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

private void addSelectColumn() {
 headerCheckboxCol.setPrefWidth(40);
 headerCheckboxCol.setCellValueFactory(new PropertyValueFactory<>("selected"));
 headerCheckboxCol.setCellFactory(param -> buildCell());
 headerCheckboxCol.setGraphic(headerColCheckbox);
 headerCheckboxCol.setVisible(false);
 tableView.getColumns().add(0, headerCheckboxCol);
}

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

@SuppressWarnings({"unchecked"})
private void addSelectColumn() {
 headerCheckboxCol.setPrefWidth(40);
 headerCheckboxCol.setCellValueFactory(new PropertyValueFactory<>("selected"));
 headerCheckboxCol.setCellFactory(param -> buildCell());
 headerCheckboxCol.setGraphic(headerColCheckbox);
 headerCheckboxCol.setVisible(false);
 tableView.getColumns().add(0, headerCheckboxCol);
}

代码示例来源:origin: stackoverflow.com

private void makeHeaderWrappable(TableColumn col) {
 Label label = new Label(col.getText());
 label.setStyle("-fx-padding: 8px;");
 label.setWrapText(true);
 label.setAlignment(Pos.CENTER);
 label.setTextAlignment(TextAlignment.CENTER);

 StackPane stack = new StackPane();
 stack.getChildren().add(label);
 stack.prefWidthProperty().bind(col.widthProperty().subtract(5));
 label.prefWidthProperty().bind(stack.prefWidthProperty());
 col.setGraphic(stack);
}

代码示例来源:origin: org.controlsfx/controlsfx

.forEach(fp -> {
              if (!fp.columnFilter.hasUnselections()) {
                fp.columnFilter.getTableColumn().setGraphic(null);
              } else {
                fp.columnFilter.getTableColumn().setGraphic(filterImageView.get());
                if (!bumpedWidth) {
                  fp.columnFilter.getTableColumn().setPrefWidth(columnFilter.getTableColumn().getWidth() + 20);
  columnFilter.getTableFilter().getColumnFilters().stream().forEach(cf -> cf.getTableColumn().setGraphic(null));
  contextMenu.hide();
});

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

final Node graphic1 = new ImageView(new Image("file:src/helloworld/about_16.png"));
lastNameCol = new TableColumn<Person, String>();
lastNameCol.setGraphic(graphic1);
lastNameCol.setText("Last");
lastNameCol.setSortType(TableColumn.SortType.DESCENDING);

相关文章