34 lines
953 B
Java
34 lines
953 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 POLLING_STATION_DASHBOARD_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(POLLING_STATION_DASHBOARD_FXML_PATH));
|
||
|
}
|
||
|
|
||
|
private GridPane GetStatusLogInstance() throws IOException {
|
||
|
GridPane StatusLog = (GridPane) fxmlLoader.load();
|
||
|
StatusLogController controller = fxmlLoader.getController();
|
||
|
controller.SetStage(currentStage);
|
||
|
|
||
|
return StatusLog;
|
||
|
}
|
||
|
}
|