6807 Tidy up MediaViewImagePanel

This commit is contained in:
Richard Cordovano 2020-09-08 17:52:32 -04:00
parent 223ea6a0be
commit b2f77fd554

View File

@ -358,11 +358,11 @@ class MediaViewImagePanel extends JPanel implements MediaFileViewer.MediaViewPan
private void showErrorNode(String errorMessage, AbstractFile file) { private void showErrorNode(String errorMessage, AbstractFile file) {
final Button externalViewerButton = new Button(Bundle.MediaViewImagePanel_externalViewerButton_text(), new ImageView(externalImage)); final Button externalViewerButton = new Button(Bundle.MediaViewImagePanel_externalViewerButton_text(), new ImageView(externalImage));
/* /*
* TODO: why is the name passed into the action constructor? it means we * Tie a Swing action (ExternalViewerAction) to a JFX button action.
* duplicate this string all over the place -jm
*/ */
externalViewerButton.setOnAction(actionEvent -> new ExternalViewerAction(Bundle.MediaViewImagePanel_externalViewerButton_text(), new FileNode(file)) externalViewerButton.setOnAction(actionEvent ->
.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, "")) //Swing ActionEvent new ExternalViewerAction(Bundle.MediaViewImagePanel_externalViewerButton_text(), new FileNode(file))
.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, ""))
); );
final VBox errorNode = new VBox(10, new Label(errorMessage), externalViewerButton); final VBox errorNode = new VBox(10, new Label(errorMessage), externalViewerButton);