Resolved the issue with the encoding

android-scanner
VladimirEliTokarev 2016-10-02 21:03:42 +03:00
parent c410fc6693
commit 272e40647e
6 changed files with 17 additions and 31 deletions

View File

@ -78,7 +78,7 @@ class ChainBuilder {
* all other two way nodes initialized * all other two way nodes initialized
*/ */
primaryStage.setScene(welcomeSplashController.GetNode()); primaryStage.setScene(welcomeSplashController.GetCurrentScene());
Map<String, TwoWayNode> nameToTwoWayNodeMap = new HashMap<>(); Map<String, TwoWayNode> nameToTwoWayNodeMap = new HashMap<>();
nameToTwoWayNodeMap.put("welcomeSplashController", welcomeSplashController); nameToTwoWayNodeMap.put("welcomeSplashController", welcomeSplashController);

View File

@ -12,16 +12,16 @@ public class BallotSummaryController extends TwoWayNode {
@FXML @FXML
private void GetToSelectByPicture(MouseEvent mousePressed){ private void GetToSelectByPicture(MouseEvent mousePressed){
this.currentStage.close(); this.currentStage.close();
this.next.UpdateNode(); this.previous.UpdateNode();
this.currentStage.setScene(this.next.GetCurrentScene()); this.currentStage.setScene(this.previous.GetCurrentScene());
this.currentStage.show(); this.currentStage.show();
} }
@FXML @FXML
private void GetToCastOrAudit(MouseEvent mousePressed){ private void GetToCastOrAudit(MouseEvent mousePressed){
this.currentStage.close(); this.currentStage.close();
this.previous.UpdateNode(); this.next.UpdateNode();
this.currentStage.setScene(this.previous.GetCurrentScene()); this.currentStage.setScene(this.next.GetCurrentScene());
this.currentStage.show(); this.currentStage.show();
} }

View File

@ -1,41 +1,28 @@
package meerkat.voting.gui.select_candidate_by_picture; package meerkat.voting.gui.select_candidate_by_picture;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.geometry.Insets;
import javafx.scene.control.Label;
import javafx.scene.input.MouseEvent; import javafx.scene.input.MouseEvent;
import javafx.scene.layout.Background;
import javafx.scene.layout.BackgroundFill;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.CornerRadii;
import javafx.scene.paint.Color;
import meerkat.protobuf.Voting;
import meerkat.voting.gui.TwoWayNode; import meerkat.voting.gui.TwoWayNode;
import java.util.List;
/** /**
* Created by Vladimir Eliezer Tokarev on 8/27/2016. * Created by Vladimir Eliezer Tokarev on 8/27/2016.
* SelectCandidateNameController handle the behavior of select by picture screen * SelectCandidateNameController handle the behavior of select by picture screen
*/ */
public class SelectCandidateByPictureController extends TwoWayNode { public class SelectCandidateByPictureController extends TwoWayNode {
private List<Voting.BallotQuestion> questions;
private List<Voting.BallotAnswer> answers;
@FXML @FXML
private void GetToSelectByName(MouseEvent mousePressed){ private void GetToSelectByName(MouseEvent mousePressed){
this.currentStage.close(); this.currentStage.close();
this.next.UpdateNode(); this.previous.UpdateNode();
this.currentStage.setScene(this.next.GetCurrentScene()); this.currentStage.setScene(this.previous.GetCurrentScene());
this.currentStage.show(); this.currentStage.show();
} }
@FXML @FXML
private void GetToBallotSummary(MouseEvent mousePressed){ private void GetToBallotSummary(MouseEvent mousePressed){
this.currentStage.close(); this.currentStage.close();
this.previous.UpdateNode(); this.next.UpdateNode();
this.currentStage.setScene(this.previous.GetCurrentScene()); this.currentStage.setScene(this.next.GetCurrentScene());
this.currentStage.show(); this.currentStage.show();
} }

View File

@ -1,7 +1,6 @@
package meerkat.voting.gui.select_candidate_name; package meerkat.voting.gui.select_candidate_name;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.scene.Scene;
import javafx.scene.input.MouseEvent; import javafx.scene.input.MouseEvent;
import meerkat.voting.gui.TwoWayNode; import meerkat.voting.gui.TwoWayNode;
@ -13,16 +12,16 @@ public class SelectCandidateNameController extends TwoWayNode {
@FXML @FXML
private void GetToSelectChannel(MouseEvent mousePressed){ private void GetToSelectChannel(MouseEvent mousePressed){
this.currentStage.close(); this.currentStage.close();
this.next.UpdateNode(); this.previous.UpdateNode();
this.currentStage.setScene(this.next.GetCurrentScene()); this.currentStage.setScene(this.previous.GetCurrentScene());
this.currentStage.show(); this.currentStage.show();
} }
@FXML @FXML
private void SelectCandidateByName(MouseEvent mousePressed) { private void SelectCandidateByName(MouseEvent mousePressed) {
this.currentStage.close(); this.currentStage.close();
this.previous.UpdateNode(); this.next.UpdateNode();
this.currentStage.setScene(this.previous.GetCurrentScene()); this.currentStage.setScene(this.next.GetCurrentScene());
this.currentStage.show(); this.currentStage.show();
} }

View File

@ -36,7 +36,7 @@ public class SelectCandidateNameLoader {
SelectCandidateNameController controller = fxmlLoader.getController(); SelectCandidateNameController controller = fxmlLoader.getController();
// set the controller to be functional TwoWayNode // set the controller to be functional TwoWayNode
controller.SetParent(selectCandidateName); controller.SetCurrentScene(selectCandidateName);
controller.SetStage(currentStage); controller.SetStage(currentStage);
// set the controller to have the configuration file // set the controller to have the configuration file

View File

@ -146,7 +146,7 @@
<RowConstraints maxHeight="76.0" minHeight="10.0" prefHeight="32.0" vgrow="SOMETIMES" /> <RowConstraints maxHeight="76.0" minHeight="10.0" prefHeight="32.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<BorderPane fx:id="picture_0" prefHeight="200.0" prefWidth="200.0" onMousePressed="#submitTheSelection"> <BorderPane fx:id="picture_0" prefHeight="200.0" prefWidth="200.0" >
<center> <center>
<ImageView BorderPane.alignment="CENTER"> <ImageView BorderPane.alignment="CENTER">
<image> <image>
@ -155,7 +155,7 @@
</ImageView> </ImageView>
</center> </center>
</BorderPane> </BorderPane>
<BorderPane fx:id="picture_1" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" onMousePressed="#submitTheSelection"> <BorderPane fx:id="picture_1" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" >
<center> <center>
<ImageView BorderPane.alignment="CENTER"> <ImageView BorderPane.alignment="CENTER">
<image> <image>
@ -164,7 +164,7 @@
</ImageView> </ImageView>
</center> </center>
</BorderPane> </BorderPane>
<BorderPane fx:id="picture_2" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" onMousePressed="#submitTheSelection"> <BorderPane fx:id="picture_2" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" >
<center> <center>
<ImageView BorderPane.alignment="CENTER"> <ImageView BorderPane.alignment="CENTER">
<image> <image>