2016-06-18 10:52:29 -04:00
|
|
|
package polling_station_dashboard.search.submitVoter.java;
|
|
|
|
|
2016-06-18 11:19:38 -04:00
|
|
|
import javafx.fxml.FXMLLoader;
|
|
|
|
import javafx.scene.Parent;
|
|
|
|
import javafx.scene.layout.Pane;
|
|
|
|
import javafx.stage.Stage;
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
2016-06-18 10:52:29 -04:00
|
|
|
/**
|
|
|
|
* Created by Vladimir Eliezer Tokarev on 18/06/2016.
|
2016-06-18 11:19:38 -04:00
|
|
|
* SubmitVoterLoader Loads the submit voter fxml
|
2016-06-18 10:52:29 -04:00
|
|
|
*/
|
|
|
|
public class SubmitVoterLoader {
|
2016-06-18 11:19:38 -04:00
|
|
|
|
|
|
|
private static final String SUBMIT_VOTER_FXML_PATH = "../fxml/submit_voter.fxml";
|
|
|
|
|
|
|
|
private Stage currentStage;
|
|
|
|
|
|
|
|
public SubmitVoterLoader (Stage primaryStage) throws IOException
|
|
|
|
{
|
|
|
|
currentStage = primaryStage;
|
|
|
|
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(SUBMIT_VOTER_FXML_PATH));
|
|
|
|
Parent root = fxmlLoader.load();
|
|
|
|
SubmitVoterController controller = fxmlLoader.getController();
|
|
|
|
|
|
|
|
Pane addEditPane = (Pane)currentStage.getScene().lookup("#AddEditPane");
|
|
|
|
addEditPane.getChildren().add(root);
|
|
|
|
controller.SetStage(primaryStage);
|
|
|
|
}
|
2016-06-18 10:52:29 -04:00
|
|
|
}
|