本文整理了Java中javafx.scene.control.TableView.getChildrenUnmodifiable()
方法的一些代码示例,展示了TableView.getChildrenUnmodifiable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableView.getChildrenUnmodifiable()
方法的具体详情如下:
包路径:javafx.scene.control.TableView
类名称:TableView
方法名:getChildrenUnmodifiable
暂无
代码示例来源:origin: org.loadui/testFx
/**
* @param tableSelector Selektor zur Identifikation der Tabelle.
* @param row Zeilennummer
* @return Die entsprechende Zeile.
*/
protected static TableRow<?> row(String tableSelector, int row) {
TableView<?> tableView = getTableView(tableSelector);
List<Node> current = tableView.getChildrenUnmodifiable();
while (current.size() == 1) {
current = ((Parent) current.get(0)).getChildrenUnmodifiable();
}
current = ((Parent) current.get(1)).getChildrenUnmodifiable();
while (!(current.get(0) instanceof TableRow)) {
current = ((Parent) current.get(0)).getChildrenUnmodifiable();
}
Node node = current.get(row);
if (node instanceof TableRow) {
return (TableRow<?>) node;
} else {
throw new RuntimeException("Expected Group with only TableRows as children");
}
}
代码示例来源:origin: org.testfx/testfx-legacy
/**
* @param tableSelector Selektor zur Identifikation der Tabelle. //TODO translate to english
* @param row Zeilennummer
* @return Die entsprechende Zeile.
*/
protected static TableRow<?> row(String tableSelector, int row) {
TableView<?> tableView = getTableView(tableSelector);
List<Node> current = tableView.getChildrenUnmodifiable();
while (current.size() == 1) {
current = ((Parent) current.get(0)).getChildrenUnmodifiable();
}
current = ((Parent) current.get(1)).getChildrenUnmodifiable();
while (!(current.get(0) instanceof TableRow)) {
current = ((Parent) current.get(0)).getChildrenUnmodifiable();
}
Node node = current.get(row);
if (node instanceof TableRow) {
return (TableRow<?>) node;
}
else {
throw new RuntimeException("Expected Group with only TableRows as children");
}
}
内容来源于网络,如有侵权,请联系作者删除!