/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package gov.va.ohi.sim.client.event.handlers; import java.io.File; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Node; import javafx.stage.FileChooser; /** * * @author kec */ public class UploadSmartEncounterEventHandler implements EventHandler { Node ownerNode; public UploadSmartEncounterEventHandler(Node ownerNode) { this.ownerNode = ownerNode; } @Override public void handle(ActionEvent t) { FileChooser chooser = new FileChooser(); chooser.setInitialDirectory(new File(System.getProperty("user.home"))); chooser.setTitle("Select SMART Encounter..."); File selectedFile = chooser.showOpenDialog(ownerNode.getScene().getWindow()); System.out.println("Selected file: " + selectedFile.getAbsolutePath()); } }