2016-06-11 07:53:57 -04:00
|
|
|
package polling_station_dashboard.statusLog.java;
|
2016-06-04 06:01:06 -04:00
|
|
|
|
|
|
|
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 {
|
|
|
|
|
2016-06-04 09:48:47 -04:00
|
|
|
private static final String STATUS_LOG_FXML_PATH = "../fxml/status_log.fxml";
|
2016-06-04 06:01:06 -04:00
|
|
|
|
|
|
|
private Stage currentStage;
|
|
|
|
private FXMLLoader fxmlLoader;
|
|
|
|
|
2016-06-12 06:18:01 -04:00
|
|
|
public StatusLogLoader (Stage primaryStage) throws IOException
|
2016-06-04 06:01:06 -04:00
|
|
|
{
|
|
|
|
currentStage = primaryStage;
|
2016-06-04 09:48:47 -04:00
|
|
|
fxmlLoader = new FXMLLoader(getClass().getResource(STATUS_LOG_FXML_PATH));
|
2016-06-04 06:01:06 -04:00
|
|
|
}
|
|
|
|
|
2016-06-04 08:11:18 -04:00
|
|
|
public GridPane GetStatusLogInstance() throws IOException {
|
|
|
|
GridPane StatusLog = fxmlLoader.load();
|
2016-06-04 06:01:06 -04:00
|
|
|
StatusLogController controller = fxmlLoader.getController();
|
|
|
|
controller.SetStage(currentStage);
|
|
|
|
|
|
|
|
return StatusLog;
|
|
|
|
}
|
|
|
|
}
|