Play recording on double-click
This commit is contained in:
parent
8fb5eac435
commit
2e9aa56985
|
@ -54,6 +54,7 @@ import javafx.scene.control.cell.PropertyValueFactory;
|
|||
import javafx.scene.input.ContextMenuEvent;
|
||||
import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.input.KeyEvent;
|
||||
import javafx.scene.input.MouseButton;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.BorderPane;
|
||||
import javafx.scene.layout.FlowPane;
|
||||
|
@ -152,6 +153,14 @@ public class RecordingsTab extends Tab implements TabSelectionListener {
|
|||
popup.hide();
|
||||
}
|
||||
});
|
||||
table.addEventFilter(MouseEvent.MOUSE_CLICKED, event -> {
|
||||
if(event.getButton() == MouseButton.PRIMARY && event.getClickCount() == 2) {
|
||||
Recording recording = table.getSelectionModel().getSelectedItem();
|
||||
if(recording != null) {
|
||||
play(recording);
|
||||
}
|
||||
}
|
||||
});
|
||||
table.addEventFilter(KeyEvent.KEY_PRESSED, event -> {
|
||||
JavaFxRecording recording = table.getSelectionModel().getSelectedItem();
|
||||
if (recording != null) {
|
||||
|
|
Loading…
Reference in New Issue