本文整理了Java中javafx.scene.control.TableView.getItems()
方法的一些代码示例,展示了TableView.getItems()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableView.getItems()
方法的具体详情如下:
包路径:javafx.scene.control.TableView
类名称:TableView
方法名:getItems
暂无
代码示例来源:origin: torakiki/pdfsam
@Override
public TableColumn<SelectionTableRowData, String> getTableColumn() {
TableColumn<SelectionTableRowData, String> tableColumn = SelectionTableColumn.super.getTableColumn();
tableColumn.setEditable(true);
tableColumn.setOnEditCommit(t -> t.getTableView().getItems().get(t.getTablePosition().getRow()).pace
.set(defaultIfBlank(t.getNewValue(), "1")));
return tableColumn;
}
代码示例来源:origin: torakiki/pdfsam
@Override
public TableColumn<SelectionTableRowData, String> getTableColumn() {
TableColumn<SelectionTableRowData, String> tableColumn = SelectionTableColumn.super.getTableColumn();
tableColumn.setEditable(true);
tableColumn.setOnEditCommit(
t -> t.getTableView().getItems().get(t.getTablePosition().getRow()).pageSelection.set(t.getNewValue()));
return tableColumn;
}
代码示例来源:origin: org.copper-engine/copper-monitoring-client
@Override
public void showFilteredResult(List<ProviderResultModel> filteredResult, ProviderFilterModel usedFilter) {
resultTable.getItems().clear();
resultTable.getItems().addAll(filteredResult);
}
代码示例来源:origin: org.loadui/testFx
/**
* Get the number of rows in the table.
*
* @param table
* @return number of rows in table
*/
public static int numberOfRowsIn(TableView<?> table)
{
return table.getItems().size();
}
代码示例来源:origin: org.testfx/testfx-legacy
/**
* Get the number of rows in the table.
*
* @param table
* @return number of rows in table
*/
public static int numberOfRowsIn(TableView<?> table) {
return table.getItems().size();
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
public void removeItems(List<Long> toDelete) {
final List<ObjectModel> toDeleteObjs = new ArrayList<>();
for(ObjectModel item: getTableView().getItems()) {
if (item.isSelected()) {
toDeleteObjs.add(item);
}
}
for (final ObjectModel model : toDeleteObjs) {
getTableView().getItems().remove(model);
}
}
代码示例来源:origin: io.datafx/ui
@Override
public void invalidated(Observable o) {
if (!table.getItems().isEmpty()) {
createColumns(table);
// remove listener
items.removeListener(this);
}
}
};
代码示例来源:origin: org.javafxdata/datafx-cell
@Override
public void invalidated(Observable o) {
if (!table.getItems().isEmpty()) {
createColumns(table);
// remove listener
items.removeListener(this);
}
}
};
代码示例来源:origin: org.copper-engine/copper-monitoring-client
private void updateStorageDetails() {
storageContentTable.getItems().clear();
Date fromDate = null;
Integer minutes = storageDetailMinutes.getValue();
if(minutes != null) {
fromDate = new Date(System.currentTimeMillis() - 60000L * minutes);
}
MonitoringDataStorageDetailInfo monitoringDataStorageDetailInfo = copperDataProvider.getMonitoringDataStorageDetailInfo(fromDate, null);
storageContentTable.getItems().addAll(monitoringDataStorageDetailInfo.getMonitoringDataStorageContentInfo());
}
代码示例来源:origin: org.loadui/testFx
/**
* Get the number of rows in the table that matches the CSS query tableQuery.
*
* @param tableQuery
* @return
*/
public static int numberOfRowsIn(String tableQuery)
{
TableView<?> table = find(tableQuery);
return table.getItems().size();
}
代码示例来源:origin: org.testfx/testfx-legacy
/**
* Get the number of rows in the table that matches the CSS query tableQuery.
*
* @param tableQuery
* @return
*/
public static int numberOfRowsIn(String tableQuery) {
TableView<?> table = find(tableQuery);
return table.getItems().size();
}
代码示例来源:origin: org.copper-engine/copper-monitoring-client
@Override
public void handle(ActionEvent event) {
AuditralColorMapping newItem = new AuditralColorMapping();
newItem.color.setValue(Color.rgb(255, 128, 128));
colorTable.getItems().add(newItem);
}
});
代码示例来源:origin: org.copper-engine/copper-monitoring-client
@Override
public void clear() {
resultTable.getItems().clear();
content.getEngine().loadContent("");
}
代码示例来源:origin: io.datafx/ui
private static <S> void createColumns(TableView<S> table) {
@SuppressWarnings("unchecked")
Class<? extends S> actualDataType = (Class<? extends S>)table.getItems().get(0).getClass();
if (actualDataType != null) {
List<TableColumn<S, ?>> columns = createColumns(actualDataType);
table.getColumns().setAll(columns);
}
}
代码示例来源:origin: org.javafxdata/datafx-ui
private static <S> void createColumns(TableView<S> table) {
@SuppressWarnings("unchecked")
Class<? extends S> actualDataType = (Class<? extends S>)table.getItems().get(0).getClass();
if (actualDataType != null) {
List<TableColumn<S, ?>> columns = createColumns(actualDataType);
table.getColumns().setAll(columns);
}
}
代码示例来源:origin: org.controlsfx/controlsfx
private void initializeValues() {
tableFilter.getBackingList().stream()
.forEach(t -> addBackingItem(t, tableColumn.getCellObservableValue(t)));
tableFilter.getTableView().getItems().stream()
.map(tableColumn::getCellObservableValue).forEach(this::addVisibleItem);
}
代码示例来源:origin: org.copper-engine/copper-monitoring-client
@Override
public void handle(ActionEvent event) {
colorTable.getItems().remove(colorTable.getSelectionModel().getSelectedIndex());
}
});
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
@Override
public void updateIndex(int index) {
super.updateIndex(index);
pseudoClassStateChanged(lastRow, index >= 0 && index == getTableView().getItems().size() - 1);
}
代码示例来源:origin: ssaring/sportstracker
@Override
public void updateView() {
getTableView().getItems().setAll(getTableEntries());
// re-sorting must be forced after updating table content
getTableView().sort();
}
代码示例来源:origin: org.controlsfx/controlsfx
private void initializeListeners() {
//listen to backing list and update distinct values accordingly
tableFilter.getBackingList().addListener(new WeakListChangeListener<T>(backingListListener));
//listen to visible items and update visible values accordingly
tableFilter.getTableView().getItems().addListener(new WeakListChangeListener<T>(itemsListener));
//listen to selections on filterValues
filterValues.addListener(new WeakListChangeListener<>(filterValueListChangeListener));
}
内容来源于网络,如有侵权,请联系作者删除!