Added button which takes you back

android-scanner
VladimirEliTokarev 2016-10-05 16:52:28 +03:00
parent 94adef22f3
commit 5a78f723e5
3 changed files with 16 additions and 0 deletions

View File

@ -89,6 +89,7 @@ class ChainBuilder {
VoteHaveBeenCastLoader voteHaveBeenCastLoader = new VoteHaveBeenCastLoader(primaryStage, configuration); VoteHaveBeenCastLoader voteHaveBeenCastLoader = new VoteHaveBeenCastLoader(primaryStage, configuration);
TwoWayNode voteHaveBeenCastController = voteHaveBeenCastLoader.GetVoteHaveBeenCast(); TwoWayNode voteHaveBeenCastController = voteHaveBeenCastLoader.GetVoteHaveBeenCast();
voteHaveBeenCastController.SetVotersBallot(votersBallot); voteHaveBeenCastController.SetVotersBallot(votersBallot);
voteHaveBeenCastController.SetPrevious(welcomeSplashController);
castOrAuditController.SetNext(voteHaveBeenCastController); castOrAuditController.SetNext(voteHaveBeenCastController);
/** /**

View File

@ -1,5 +1,7 @@
package meerkat.voting.gui.panels.vote_have_been_cast; package meerkat.voting.gui.panels.vote_have_been_cast;
import javafx.fxml.FXML;
import javafx.scene.input.MouseEvent;
import meerkat.voting.gui.managment.TwoWayNode; import meerkat.voting.gui.managment.TwoWayNode;
/** /**
@ -8,6 +10,14 @@ import meerkat.voting.gui.managment.TwoWayNode;
*/ */
public class VoteHaveBeenCastController extends TwoWayNode { public class VoteHaveBeenCastController extends TwoWayNode {
@FXML
private void backToWelcomeSplash(MouseEvent mousePress){
this.currentStage.close();
this.currentStage.setScene(this.previous.GetCurrentScene());
this.previous.UpdateNode();
this.currentStage.show();
}
@Override @Override
public void UpdateNode() { public void UpdateNode() {
// This panel doesn't have any questions representations that why there is nothing ti show here // This panel doesn't have any questions representations that why there is nothing ti show here

View File

@ -237,6 +237,11 @@
</GridPane> </GridPane>
</children> </children>
</GridPane> </GridPane>
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="2">
<right>
<Button mnemonicParsing="false" onMousePressed="#backToWelcomeSplash" text="Back To Start" BorderPane.alignment="CENTER" />
</right>
</BorderPane>
</children> </children>
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />