Added the ballot summary to the flow
parent
4591c4e2e8
commit
b687782f5c
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -7,7 +7,7 @@
|
||||||
<?import javafx.scene.layout.*?>
|
<?import javafx.scene.layout.*?>
|
||||||
<?import javafx.scene.text.*?>
|
<?import javafx.scene.text.*?>
|
||||||
|
|
||||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
|
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="main.ballot_summary.BallotSummaryController">
|
||||||
<children>
|
<children>
|
||||||
<GridPane>
|
<GridPane>
|
||||||
<children>
|
<children>
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
</BorderPane>
|
</BorderPane>
|
||||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||||
<left>
|
<left>
|
||||||
<Button mnemonicParsing="false" text="Back" BorderPane.alignment="CENTER">
|
<Button mnemonicParsing="false" onMousePressed="#GetToSelectByPicture" text="Back" BorderPane.alignment="CENTER">
|
||||||
<font>
|
<font>
|
||||||
<Font size="18.0" />
|
<Font size="18.0" />
|
||||||
</font>
|
</font>
|
Binary file not shown.
Binary file not shown.
|
@ -41,7 +41,7 @@
|
||||||
<children>
|
<children>
|
||||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2">
|
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2">
|
||||||
<right>
|
<right>
|
||||||
<Button mnemonicParsing="false" prefHeight="39.0" prefWidth="128.0" text="Next" BorderPane.alignment="CENTER">
|
<Button mnemonicParsing="false" onMousePressed="#GetToBallotSummary" prefHeight="39.0" prefWidth="128.0" text="Next" BorderPane.alignment="CENTER">
|
||||||
<font>
|
<font>
|
||||||
<Font size="18.0" />
|
<Font size="18.0" />
|
||||||
</font>
|
</font>
|
||||||
|
|
Binary file not shown.
|
@ -2,6 +2,7 @@ package main;
|
||||||
|
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
|
import main.ballot_summary.BallotSummaryLoader;
|
||||||
import main.select_candidate_by_picture.SelectCandidateByPictureLoader;
|
import main.select_candidate_by_picture.SelectCandidateByPictureLoader;
|
||||||
import main.select_candidate_name.SelectCandidateNameLoader;
|
import main.select_candidate_name.SelectCandidateNameLoader;
|
||||||
import main.straight_channel_section.StraightChannelSectionLoader;
|
import main.straight_channel_section.StraightChannelSectionLoader;
|
||||||
|
@ -57,6 +58,11 @@ public class ChainBuilder {
|
||||||
selectCandidateByPictureController.SetPrevious(selectCandidateNameController);
|
selectCandidateByPictureController.SetPrevious(selectCandidateNameController);
|
||||||
selectCandidateNameController.SetNext(selectCandidateByPictureController);
|
selectCandidateNameController.SetNext(selectCandidateByPictureController);
|
||||||
|
|
||||||
|
BallotSummaryLoader ballotSummaryLoader = new BallotSummaryLoader(primaryStage);
|
||||||
|
TwoWayNode ballotSummaryController = ballotSummaryLoader.GetBallotSummary();
|
||||||
|
ballotSummaryController.SetPrevious(selectCandidateByPictureController);
|
||||||
|
selectCandidateByPictureController.SetNext(ballotSummaryController);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* all other two way nodes initialized
|
* all other two way nodes initialized
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
package main.ballot_summary;
|
||||||
|
|
||||||
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.scene.input.MouseEvent;
|
||||||
|
import main.TwoWayNode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Vladimir Eliezer Tokarev on 8/27/2016.
|
||||||
|
* BallotSummaryController handle the behavior of welcome splash class
|
||||||
|
*/
|
||||||
|
public class BallotSummaryController extends TwoWayNode {
|
||||||
|
@FXML
|
||||||
|
private void GetToSelectByPicture(MouseEvent mousePressed){
|
||||||
|
this.currentStage.close();
|
||||||
|
this.currentStage.setScene(this.previous);
|
||||||
|
this.currentStage.show();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
package main.ballot_summary;
|
||||||
|
|
||||||
|
import javafx.fxml.FXMLLoader;
|
||||||
|
import javafx.scene.Parent;
|
||||||
|
import javafx.stage.Stage;
|
||||||
|
import main.TwoWayNode;
|
||||||
|
import main.select_candidate_by_picture.SelectCandidateByPictureController;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Vladimir Eliezer Tokarev on 8/27/2016.
|
||||||
|
* BallotSummaryLoader creates starlight channel section object and sets its controller
|
||||||
|
*/
|
||||||
|
public class BallotSummaryLoader {
|
||||||
|
private static final String BALLOT_SUMMARY_FXML_PATH = "ballot_summary.fxml";
|
||||||
|
|
||||||
|
private Stage currentStage;
|
||||||
|
private FXMLLoader fxmlLoader;
|
||||||
|
|
||||||
|
public BallotSummaryLoader(Stage primaryStage) throws IOException
|
||||||
|
{
|
||||||
|
fxmlLoader = new FXMLLoader(getClass().getResource(BALLOT_SUMMARY_FXML_PATH));
|
||||||
|
currentStage = primaryStage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates welcome splash parent node and sets it to the controller
|
||||||
|
* @return TwoWayNode
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
public TwoWayNode GetBallotSummary() throws IOException {
|
||||||
|
Parent selectCandidateName = fxmlLoader.load();
|
||||||
|
BallotSummaryController controller = fxmlLoader.getController();
|
||||||
|
|
||||||
|
// set the controller to be functional TwoWayNode
|
||||||
|
controller.SetParent(selectCandidateName);
|
||||||
|
controller.SetStage(currentStage);
|
||||||
|
|
||||||
|
return controller;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -7,7 +7,7 @@
|
||||||
<?import javafx.scene.layout.*?>
|
<?import javafx.scene.layout.*?>
|
||||||
<?import javafx.scene.text.*?>
|
<?import javafx.scene.text.*?>
|
||||||
|
|
||||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
|
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="main.ballot_summary.BallotSummaryController">
|
||||||
<children>
|
<children>
|
||||||
<GridPane>
|
<GridPane>
|
||||||
<children>
|
<children>
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
</BorderPane>
|
</BorderPane>
|
||||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||||
<left>
|
<left>
|
||||||
<Button mnemonicParsing="false" text="Back" BorderPane.alignment="CENTER">
|
<Button mnemonicParsing="false" onMousePressed="#GetToSelectByPicture" text="Back" BorderPane.alignment="CENTER">
|
||||||
<font>
|
<font>
|
||||||
<Font size="18.0" />
|
<Font size="18.0" />
|
||||||
</font>
|
</font>
|
|
@ -16,4 +16,11 @@ public class SelectCandidateByPictureController extends TwoWayNode {
|
||||||
this.currentStage.setScene(this.previous);
|
this.currentStage.setScene(this.previous);
|
||||||
this.currentStage.show();
|
this.currentStage.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private void GetToBallotSummary(MouseEvent mousePressed){
|
||||||
|
this.currentStage.close();
|
||||||
|
this.currentStage.setScene(this.next);
|
||||||
|
this.currentStage.show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,6 @@ public class SelectCandidateByPictureLoader {
|
||||||
public SelectCandidateByPictureLoader(Stage primaryStage) throws IOException
|
public SelectCandidateByPictureLoader(Stage primaryStage) throws IOException
|
||||||
{
|
{
|
||||||
fxmlLoader = new FXMLLoader(getClass().getResource(SELECT_CANDIDATE_BY_PICTURE_FXML_PATH));
|
fxmlLoader = new FXMLLoader(getClass().getResource(SELECT_CANDIDATE_BY_PICTURE_FXML_PATH));
|
||||||
System.out.println(fxmlLoader);
|
|
||||||
currentStage = primaryStage;
|
currentStage = primaryStage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
<children>
|
<children>
|
||||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2">
|
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2">
|
||||||
<right>
|
<right>
|
||||||
<Button mnemonicParsing="false" prefHeight="39.0" prefWidth="128.0" text="Next" BorderPane.alignment="CENTER">
|
<Button mnemonicParsing="false" onMousePressed="#GetToBallotSummary" prefHeight="39.0" prefWidth="128.0" text="Next" BorderPane.alignment="CENTER">
|
||||||
<font>
|
<font>
|
||||||
<Font size="18.0" />
|
<Font size="18.0" />
|
||||||
</font>
|
</font>
|
||||||
|
|
|
@ -23,6 +23,4 @@ public class SelectCandidateNameController extends TwoWayNode {
|
||||||
this.currentStage.setScene(this.next);
|
this.currentStage.setScene(this.next);
|
||||||
this.currentStage.show();
|
this.currentStage.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,6 @@ import javafx.fxml.FXMLLoader;
|
||||||
import javafx.scene.Parent;
|
import javafx.scene.Parent;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import main.TwoWayNode;
|
import main.TwoWayNode;
|
||||||
import main.straight_channel_section.StraightChannelSectionController;
|
|
||||||
|
|
||||||
import java.io.Console;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,7 +19,6 @@ public class SelectCandidateNameLoader {
|
||||||
public SelectCandidateNameLoader(Stage primaryStage) throws IOException
|
public SelectCandidateNameLoader(Stage primaryStage) throws IOException
|
||||||
{
|
{
|
||||||
fxmlLoader = new FXMLLoader(getClass().getResource(SELECT_CANDIDATE_NAME_FXML_PATH));
|
fxmlLoader = new FXMLLoader(getClass().getResource(SELECT_CANDIDATE_NAME_FXML_PATH));
|
||||||
System.out.println(fxmlLoader);
|
|
||||||
currentStage = primaryStage;
|
currentStage = primaryStage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue