本文整理了Java中javafx.scene.control.TableView.focusedProperty()
方法的一些代码示例,展示了TableView.focusedProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableView.focusedProperty()
方法的具体详情如下:
包路径:javafx.scene.control.TableView
类名称:TableView
方法名:focusedProperty
暂无
代码示例来源:origin: pmd/pmd
EventStreams.valuesOf(eventLogTableView.focusedProperty())
.successionEnds(Duration.ofMillis(100))
.subscribe(b -> {
代码示例来源:origin: io.github.factoryfx/javafxDataEditing
if (!filterField.focusedProperty().get() && !tableView.focusedProperty().get() && Strings.isNullOrEmpty(filterField.getText())) {
FadeTransition ft = new FadeTransition(Duration.millis(fadeTransitionDuration), target);
ft.setFromValue(1.0);
tableView.focusedProperty().addListener(focusChangeListener);
filterField.focusedProperty().addListener(focusChangeListener);
代码示例来源:origin: ssaring/sportstracker
private void setupTableRowFactory(final ContextMenu contextMenu) {
getTableView().setRowFactory(tableView -> {
final TableRow<T> tableRow = new TableRow<>();
// update table row color when the item value, the selection or the focus has been changed
tableRow.itemProperty().addListener((observable, oldValue, newValue) -> updateTableRowColor(tableRow));
tableRow.selectedProperty().addListener( //
(observable, oldValue, newValue) -> updateTableRowColor(tableRow));
getTableView().focusedProperty().addListener( //
(observable, oldValue, newValue) -> updateTableRowColor(tableRow));
// bind context menu to row, but only when the row is not empty
tableRow.contextMenuProperty().bind( //
Bindings.when(tableRow.emptyProperty()) //
.then((ContextMenu) null) //
.otherwise(contextMenu));
// add listener for double clicks for editing the selected entry (ignore in empty rows)
tableRow.setOnMouseClicked(event -> {
if (event.getClickCount() > 1 && getSelectedEntryCount() == 1 && !tableRow.isEmpty()) {
getEventHandler().onEditEntry(null);
}
});
return tableRow;
});
}
内容来源于网络,如有侵权,请联系作者删除!