meerkat-java/voting-station-gui/src/polling_station_dashboard/java/PollingStationDashboardLoad...

36 lines
1.1 KiB
Java
Raw Normal View History

package polling_station_dashboard.java;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import java.io.IOException;
/**
* Created by Vladimir Eliezer Tokarev on 28/05/2016
* This class loads the polling station fxml
*/
public class PollingStationDashboardLoader {
private static final String POLLING_STATION_DASHBOARD_FXML_PATH = "../fxml/polling_station_dashboard.fxml";
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();
System.out.println("heyeyeye");
controller.SetStage(currentStage);
}
}