From edb222dbcad8d2fb74e25eae8fe305d92386f175 Mon Sep 17 00:00:00 2001 From: Maxim Date: Mon, 7 Nov 2016 02:12:36 -0600 Subject: [PATCH] Update Controller.java Fixed formatting --- src/versions/v0.0.2/Controller.java | 44 ++++++++++++++--------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/src/versions/v0.0.2/Controller.java b/src/versions/v0.0.2/Controller.java index 007e0fd..c36122b 100644 --- a/src/versions/v0.0.2/Controller.java +++ b/src/versions/v0.0.2/Controller.java @@ -89,11 +89,11 @@ public class Controller { thumbImgView.getChildren().clear(); // Clears children if any to setup for new images dirPathField.setText("" + directory); - for (int i=0; i { - if (mouse.getClickCount() == 2 && !mouse.isConsumed()) { - mouse.consume(); - try { + if (mouse.getClickCount() == 2 && !mouse.isConsumed()) { + mouse.consume(); + try { pb = Runtime.getRuntime().exec(vExec); - } catch(IOException vidIOErr) { - throw new UncheckedIOException(vidIOErr); - } - } + } catch(IOException vidIOErr) { + throw new UncheckedIOException(vidIOErr); + } + } filePathField.setText(path); }); } else if(fileList[i].getName().contains(".png") || fileList[i].getName().contains(".jpg")|| fileList[i].getName().contains(".gif") || fileList[i].getName().contains(".jpeg")) { - imgView = new ImageView("file://" + fileList[i]); - thumbImgView.getChildren().add(imgView); - final ImageView imgViewPoped = new ImageView("file://" + fileList[i]); - + imgView = new ImageView("file://" + fileList[i]); + thumbImgView.getChildren().add(imgView); + final ImageView imgViewPoped = new ImageView("file://" + fileList[i]); imgView.setOnMouseClicked(mouse -> { - if (mouse.getClickCount() == 2 && !mouse.isConsumed()) { - mouse.consume(); - displayImg(imgViewPoped, path); - } + if (mouse.getClickCount() == 2 && !mouse.isConsumed()) { + mouse.consume(); + displayImg(imgViewPoped, path); + } filePathField.setText(path); }); } else { System.out.println("Not a video or image file."); } - posY = posY + 355.0; - } + posY = posY + 355.0; } } // View Image enlarged Note, sets up a seperate stage and scene with auto enlargment public void displayImg(ImageView imgViewPoped, String path) {