本文整理了Java中javafx.scene.control.TableView.<init>()
方法的一些代码示例,展示了TableView.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableView.<init>()
方法的具体详情如下:
包路径:javafx.scene.control.TableView
类名称:TableView
方法名:<init>
暂无
代码示例来源:origin: io.github.factoryfx/javafxDataEditing
public DataViewWidget(DataEditor dataEditor, UniformDesign uniformDesign) {
this(dataEditor,uniformDesign,new TableView<>());
}
代码示例来源:origin: io.datafx/ui
public static <S> TableView<S> create(Class<? extends S> dataType) {
List<TableColumn<S, ?>> columns = createColumns(dataType);
TableView<S> table = new TableView<S>();
table.getColumns().setAll(columns);
return table;
}
代码示例来源:origin: org.javafxdata/datafx-cell
public static <S> TableView<S> create(Class<? extends S> dataType) {
List<TableColumn<S, ?>> columns = createColumns(dataType);
TableView<S> table = new TableView<S>();
table.getColumns().setAll(columns);
return table;
}
代码示例来源:origin: org.javafxdata/datafx-ui
public static <S> TableView<S> create(Class<? extends S> dataType) {
List<TableColumn<S, ?>> columns = createColumns(dataType);
TableView<S> table = new TableView<S>();
table.getColumns().setAll(columns);
return table;
}
代码示例来源:origin: org.javafxdata/datafx-cell
public TableView<S> buildTableView() {
if (table == null) {
table = new TableView<S>();
}
if (columnSelectPerformed) {
table.getColumns().setAll(finalColumns);
} else if (!table.getColumns().equals(columns)) {
table.getColumns().setAll(columns);
}
return table;
}
// public ObservableList<TableColumn<S,?>> buildAndSetInTableView() {
代码示例来源:origin: org.javafxdata/datafx-ui
public TableView<S> buildTableView() {
if (table == null) {
table = new TableView<S>();
}
if (columnSelectPerformed) {
table.getColumns().setAll(finalColumns);
} else if (!table.getColumns().equals(columns)) {
table.getColumns().setAll(columns);
}
return table;
}
// public ObservableList<TableColumn<S,?>> buildAndSetInTableView() {
代码示例来源:origin: io.datafx/ui
public TableView<S> buildTableView() {
if (table == null) {
table = new TableView<S>();
}
if (columnSelectPerformed) {
table.getColumns().setAll(finalColumns);
} else if (!table.getColumns().equals(columns)) {
table.getColumns().setAll(columns);
}
return table;
}
// public ObservableList<TableColumn<S,?>> buildAndSetInTableView() {
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
protected void buildTableView() {
tableView = new TableView<>();
final List<TableColumnBase> tableColumns = getTableColumns();
for(TableColumnBase t: tableColumns) {
tableView.getColumns().add((TableColumn<ObjectModel, ?>) t);
}
// single or multiple, default is multiple
final String selectionMode = configuration.getPropertyValue("selectionMode", "multiple");
if ("multiple".equalsIgnoreCase(selectionMode)) {
tableView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
} else {
tableView.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
}
// displayTableIfEmpty
displayTableIfEmpty = configuration.getBooleanProperty("displayTableIfEmpty", false);
}
代码示例来源:origin: com.powsybl/powsybl-gse-spi
private static TableView<Version> createVersionTable() {
TableView<Version> versionTable = new TableView<>();
TableColumn<Version, String> repositoryNameCol = new TableColumn<>(RESOURCE_BUNDLE.getString("RepositoryName"));
repositoryNameCol.setCellValueFactory(new PropertyValueFactory<>("repositoryName"));
TableColumn<Version, String> mavenProjectVersionCol = new TableColumn<>(RESOURCE_BUNDLE.getString("MavenProjectVersion"));
mavenProjectVersionCol.setCellValueFactory(new PropertyValueFactory<>("mavenProjectVersion"));
TableColumn<Version, String> gitVersionCol = new TableColumn<>(RESOURCE_BUNDLE.getString("GitVersion"));
gitVersionCol.setCellValueFactory(new PropertyValueFactory<>("gitVersion"));
TableColumn<Version, String> gitBranchCol = new TableColumn<>(RESOURCE_BUNDLE.getString("GitBranch"));
gitBranchCol.setCellValueFactory(new PropertyValueFactory<>("gitBranch"));
TableColumn<Version, String> buildTimestampCol = new TableColumn<>(RESOURCE_BUNDLE.getString("BuildTimestamp"));
buildTimestampCol.setCellValueFactory(param -> new SimpleStringProperty(new DateTime(param.getValue().getBuildTimestamp()).toString()));
versionTable.getColumns().addAll(repositoryNameCol, mavenProjectVersionCol, gitVersionCol, gitBranchCol, buildTimestampCol);
versionTable.getItems().addAll(Version.list());
return versionTable;
}
}
代码示例来源:origin: io.datafx/ui
public static <S> TableViewFactory<S> create(Class<? extends S> dataType, final ObservableList<S> items) {
if (items == null) {
throw new NullPointerException("items can not be null");
}
final TableView<S> table = new TableView<S>();
table.setItems(items);
table.setEditable(true);
if (dataType == null && table.getItems().isEmpty()) {
// we'll have to create the columns the first time the items list
// changes, so let's hook in a listener
InvalidationListener listener = new InvalidationListener() {
@Override
public void invalidated(Observable o) {
if (!table.getItems().isEmpty()) {
createColumns(table);
// remove listener
items.removeListener(this);
}
}
};
table.getItems().addListener(listener);
} else {
createColumns(table);
}
return TableViewFactory.configure(table);
}
代码示例来源:origin: org.javafxdata/datafx-cell
public static <S> TableViewFactory<S> create(Class<? extends S> dataType, final ObservableList<S> items) {
if (items == null) {
throw new NullPointerException("items can not be null");
}
final TableView<S> table = new TableView<S>();
table.setItems(items);
table.setEditable(true);
if (dataType == null && table.getItems().isEmpty()) {
// we'll have to create the columns the first time the items list
// changes, so let's hook in a listener
InvalidationListener listener = new InvalidationListener() {
@Override
public void invalidated(Observable o) {
if (!table.getItems().isEmpty()) {
createColumns(table);
// remove listener
items.removeListener(this);
}
}
};
table.getItems().addListener(listener);
} else {
createColumns(table);
}
return TableViewFactory.configure(table);
}
代码示例来源:origin: org.javafxdata/datafx-ui
public static <S> TableViewFactory<S> create(Class<? extends S> dataType, final ObservableList<S> items) {
if (items == null) {
throw new NullPointerException("items can not be null");
}
final TableView<S> table = new TableView<S>();
table.setItems(items);
table.setEditable(true);
if (dataType == null && table.getItems().isEmpty()) {
// we'll have to create the columns the first time the items list
// changes, so let's hook in a listener
InvalidationListener listener = new InvalidationListener() {
@Override
public void invalidated(Observable o) {
if (!table.getItems().isEmpty()) {
createColumns(table);
// remove listener
items.removeListener(this);
}
}
};
table.getItems().addListener(listener);
} else {
createColumns(table);
}
return TableViewFactory.configure(table);
}
代码示例来源:origin: io.github.factoryfx/javafxDataEditing
@Override
public Node createValueListVisualisation() {
TableView<Data> tableView = new TableView<>();
tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
TableColumn<Data, String> test = new TableColumn<>("Data");
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
final boolean showTableHeader = contentConfiguration.getBooleanProperty("showTableHeader", true);
tableView = new TableView();
tableView.setRowFactory(param -> {
final EpTableRow row = new EpTableRow();
代码示例来源:origin: com.aquafx-project/aquafx
list.setPrefHeight(70);
listContainer.getChildren().add(list);
TableView<Person> listTable = new TableView<Person>();
listTable.getStyleClass().add("hide-header");
listTable.setPrefHeight(250);
代码示例来源:origin: io.github.factoryfx/javafxDataEditing
TableView<T> table = new TableView<>();
table.getItems().setAll(dataList);
table.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
代码示例来源:origin: com.aquafx-project/aquafx
private void buildTableViewTab(Tab tab) {
GridPane grid = new GridPane();
grid.setPadding(new Insets(5, 5, 5, 5));
grid.setHgap(5);
grid.setVgap(5);
// create the tableview
TableColumn<TestPerson, Boolean> invitedColumn = new TableColumn<TestPerson, Boolean>("Invited");
invitedColumn.setCellValueFactory(new PropertyValueFactory<TestPerson, Boolean>("invited"));
TableColumn<TestPerson, String> nameColumn = new TableColumn<TestPerson, String>("First Name");
nameColumn.setCellValueFactory(new PropertyValueFactory<TestPerson, String>("firstName"));
TableView<TestPerson> tableView = new TableView<TestPerson>(data);
tableView.getColumns().setAll(invitedColumn, nameColumn);
// set the cell factory in the invited TableColumn
invitedColumn.setCellFactory(CheckBoxTableCell.forTableColumn(invitedColumn));
grid.add(tableView, 0, 0);
GridPane.setVgrow(tableView, Priority.ALWAYS);
GridPane.setHgrow(tableView, Priority.ALWAYS);
tab.setContent(grid);
}
代码示例来源:origin: org.jrebirth.af.showcase/todos
super.initView();
this.table = new TableView<>();
代码示例来源:origin: org.jrebirth.af.showcase/todos
super.initView();
this.table = new TableView<>();
代码示例来源:origin: com.intuit.karate/karate-core
this.scenarioPanel = scenarioPanel;
this.setPadding(App.PADDING_HOR);
table = new TableView();
table.setPrefWidth(280);
table.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
内容来源于网络,如有侵权,请联系作者删除!