package controller;

import javafx.scene.control.Button;
import javafx.stage.FileChooser;
import javafx.stage.Stage;

import java.io.File;

/**
 * Created by 효민 on 2016-05-20.
 */
public class FileExplorer {


    public File getSaveDialog(Button btn){

        Stage s = (Stage) btn.getScene().getWindow();
        FileChooser fileChooser = new FileChooser();

        fileChooser.setTitle("Save File");
        fileChooser.getExtensionFilters().addAll(
                new FileChooser.ExtensionFilter("Text Files", "*.txt"),
                new FileChooser.ExtensionFilter("Image Files", "*.png", "*.jpg", "*.gif"),
                new FileChooser.ExtensionFilter("Audio Files", "*.wav", "*.mp3", "*.aac"),
                new FileChooser.ExtensionFilter("All Files", "*.*"));

        File file = fileChooser.showSaveDialog(s);
        return file;
    }

    public File getLoadDialog(Button btn){

        Stage s = (Stage) btn.getScene().getWindow();
        FileChooser fileChooser = new FileChooser();

        fileChooser.setTitle("Open File");
        fileChooser.getExtensionFilters().addAll(
                new FileChooser.ExtensionFilter("Text Files", "*.txt"),
                new FileChooser.ExtensionFilter("Image Files", "*.png", "*.jpg", "*.gif"),
                new FileChooser.ExtensionFilter("Audio Files", "*.wav", "*.mp3", "*.aac"),
                new FileChooser.ExtensionFilter("All Files", "*.*"));

        File selectedFile = fileChooser.showOpenDialog(s);
        return selectedFile;
    }
}




@@ -202,16 +202,65 @@
 orer %7B%0A%0A
+/**%0A * %EC%A0%80%EC%9E%A5%EC%9A%A9 file chooser%EB%A5%BC %EC%83%9D%EC%84%B1%0A * @return File%0A * */
 %0A    pub
@@ -901,16 +901,68 @@
 %0A    %7D%0A%0A
+/**%0A * %EC%97%B4%EA%B8%B0(%EB%A1%9C%EB%93%9C)%EC%9A%A9 file chooser%EB%A5%BC %EC%83%9D%EC%84%B1%0A * @return File%0A */%0A
     publ

add some comments