46 lines
1.4 KiB
Java
46 lines
1.4 KiB
Java
package main.select_candidate_by_picture;
|
|
|
|
import javafx.fxml.FXMLLoader;
|
|
import javafx.scene.Parent;
|
|
import javafx.stage.Stage;
|
|
import main.TwoWayNode;
|
|
import main.select_candidate_name.SelectCandidateNameController;
|
|
|
|
import java.io.IOException;
|
|
|
|
/**
|
|
* Created by Vladimir Eliezer Tokarev on 8/27/2016.
|
|
* SelectCandidateByPictureLoader creates starlight channel section object and sets its controller
|
|
*/
|
|
public class SelectCandidateByPictureLoader {
|
|
|
|
private static final String SELECT_CANDIDATE_BY_PICTURE_FXML_PATH = "select_candidate_by_picture.fxml";
|
|
|
|
private Stage currentStage;
|
|
private FXMLLoader fxmlLoader;
|
|
|
|
public SelectCandidateByPictureLoader(Stage primaryStage) throws IOException
|
|
{
|
|
fxmlLoader = new FXMLLoader(getClass().getResource(SELECT_CANDIDATE_BY_PICTURE_FXML_PATH));
|
|
System.out.println(fxmlLoader);
|
|
currentStage = primaryStage;
|
|
}
|
|
|
|
/**
|
|
* Creates welcome splash parent node and sets it to the controller
|
|
* @return TwoWayNode
|
|
* @throws IOException
|
|
*/
|
|
public TwoWayNode GetSelectCandidateByPicture() throws IOException {
|
|
Parent selectCandidateName = fxmlLoader.load();
|
|
SelectCandidateByPictureController controller = fxmlLoader.getController();
|
|
|
|
// set the controller to be functional TwoWayNode
|
|
controller.SetParent(selectCandidateName);
|
|
controller.SetStage(currentStage);
|
|
|
|
return controller;
|
|
}
|
|
|
|
}
|