46 lines
1.4 KiB
Java
46 lines
1.4 KiB
Java
package main.select_candidate_name;
|
|
|
|
import javafx.fxml.FXMLLoader;
|
|
import javafx.scene.Parent;
|
|
import javafx.stage.Stage;
|
|
import main.TwoWayNode;
|
|
import main.straight_channel_section.StraightChannelSectionController;
|
|
|
|
import java.io.Console;
|
|
import java.io.IOException;
|
|
|
|
/**
|
|
* Created by Vladimir Eliezer Tokarev on 8/27/2016.
|
|
* SelectCandidateNameLoader creates starlight channel section object and sets its controller
|
|
*/
|
|
public class SelectCandidateNameLoader {
|
|
private static final String SELECT_CANDIDATE_NAME_FXML_PATH = "select_candidate_name.fxml";
|
|
|
|
private Stage currentStage;
|
|
private FXMLLoader fxmlLoader;
|
|
|
|
public SelectCandidateNameLoader(Stage primaryStage) throws IOException
|
|
{
|
|
fxmlLoader = new FXMLLoader(getClass().getResource(SELECT_CANDIDATE_NAME_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 GetSelectCandidateName() throws IOException {
|
|
Parent selectCandidateName = fxmlLoader.load();
|
|
SelectCandidateNameController controller = fxmlLoader.getController();
|
|
|
|
// set the controller to be functional TwoWayNode
|
|
controller.SetParent(selectCandidateName);
|
|
controller.SetStage(currentStage);
|
|
|
|
return controller;
|
|
}
|
|
|
|
}
|