package polling_station_dashboard.StatusLog.java; import javafx.fxml.FXMLLoader; import javafx.scene.layout.GridPane; import javafx.stage.Stage; import java.io.IOException; /** * Created by Vladimir Eliezer Tokarev on 04/06/2016. * Loads the status log object */ public class StatusLogLoader { private static final String POLLING_STATION_DASHBOARD_FXML_PATH = "../fxml/settings.fxml"; private Stage currentStage; private FXMLLoader fxmlLoader; private StatusLogUpdate statusLogUpdater; public StatusLogLoader (Stage primaryStage, StatusLogUpdate updater) throws IOException { currentStage = primaryStage; statusLogUpdater = updater; fxmlLoader = new FXMLLoader(getClass().getResource(POLLING_STATION_DASHBOARD_FXML_PATH)); } public GridPane GetStatusLogInstance() throws IOException { GridPane StatusLog = fxmlLoader.load(); StatusLogController controller = fxmlLoader.getController(); controller.SetStage(currentStage); controller.SetStatusLogUpdater(statusLogUpdater); return StatusLog; } }