2016-05-28 10:50:22 -04:00
|
|
|
package polling_station_dashboard.java;
|
|
|
|
|
2016-05-28 11:00:40 -04:00
|
|
|
import javafx.fxml.FXMLLoader;
|
|
|
|
import javafx.scene.Parent;
|
|
|
|
import javafx.scene.Scene;
|
|
|
|
import javafx.stage.Stage;
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
2016-05-28 10:50:22 -04:00
|
|
|
/**
|
2016-05-28 11:00:40 -04:00
|
|
|
* Created by Vladimir Eliezer Tokarev on 28/05/2016
|
|
|
|
* This class loads the polling station fxml
|
2016-05-28 10:50:22 -04:00
|
|
|
*/
|
|
|
|
public class PollingStationDashboardLoader {
|
2016-05-28 11:00:40 -04:00
|
|
|
|
2016-06-04 06:01:06 -04:00
|
|
|
private static final String POLLING_STATION_DASHBOARD_FXML_PATH = "../fxml/status_log.fxml";
|
2016-05-28 11:00:40 -04:00
|
|
|
|
|
|
|
private Stage currentStage;
|
|
|
|
|
|
|
|
public PollingStationDashboardLoader (Stage primaryStage) throws IOException
|
|
|
|
{
|
|
|
|
currentStage = primaryStage;
|
|
|
|
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(POLLING_STATION_DASHBOARD_FXML_PATH));
|
|
|
|
Parent root = fxmlLoader.load();
|
|
|
|
PollingStationDashboardController controller = fxmlLoader.getController();
|
|
|
|
|
|
|
|
currentStage.setTitle("Polling Station Dashboard");
|
|
|
|
currentStage.setScene(new Scene(root, 850, 615));
|
|
|
|
currentStage.show();
|
|
|
|
|
|
|
|
controller.SetStage(currentStage);
|
|
|
|
}
|
2016-05-28 10:50:22 -04:00
|
|
|
}
|