34 lines
911 B
Java
34 lines
911 B
Java
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 STATUS_LOG_FXML_PATH = "../fxml/status_log.fxml";
|
|
|
|
private Stage currentStage;
|
|
private FXMLLoader fxmlLoader;
|
|
|
|
public StatusLogLoader (Stage primaryStage) throws IOException
|
|
{
|
|
currentStage = primaryStage;
|
|
fxmlLoader = new FXMLLoader(getClass().getResource(STATUS_LOG_FXML_PATH));
|
|
}
|
|
|
|
public GridPane GetStatusLogInstance() throws IOException {
|
|
GridPane StatusLog = fxmlLoader.load();
|
|
StatusLogController controller = fxmlLoader.getController();
|
|
controller.SetStage(currentStage);
|
|
|
|
return StatusLog;
|
|
}
|
|
}
|