Creating configuration file
parent
272e40647e
commit
ef1ff8dea1
|
@ -23,7 +23,7 @@ message Question {
|
|||
|
||||
// Message object which contains the question and its type
|
||||
message UIQuestion{
|
||||
int32 type = 1;
|
||||
int32 Type = 1;
|
||||
|
||||
Question question = 2;
|
||||
}
|
||||
|
|
|
@ -10,11 +10,45 @@ import javafx.stage.Stage;
|
|||
* Main calls to ChainBuilder which initilizes all the TwoWayNode's
|
||||
*/
|
||||
public class Main extends Application {
|
||||
public VotingBoothConfiguration GetConfig(){
|
||||
/** VotingBoothConfiguration config = new VotingBoothConfiguration();
|
||||
|
||||
config.NameSelectionQuestion = BallotQuestionUIElementOuterClass.BallotQuestionUIElement.newBuilder()
|
||||
.setQuestion(BallotQuestionUIElementOuterClass.UIQuestion.newBuilder()
|
||||
.setType(0)
|
||||
.setQuestion(BallotQuestionUIElementOuterClass.Question.newBuilder()
|
||||
.setQuestion(ByteString.copyFromUtf8("Who you vote for?"))
|
||||
.setType(0))
|
||||
.setAnswers(BallotQuestionUIElementOuterClass.UIAnswers.newBuilder()
|
||||
.setAnswersType(0)
|
||||
.setAnswers(BallotQuestionUIElementOuterClass.ListOfAnswers.newBuilder()
|
||||
.setAnswers(0, ByteString.copyFromUtf8("George Boosh"))
|
||||
.setAnswers(1, ByteString.copyFromUtf8("Antonio Banderas"))
|
||||
.setAnswers(2, ByteString.copyFromUtf8("Michal Jakson"))))
|
||||
.setRandomizeListOrder(true).build();
|
||||
|
||||
config.NameSelectionByPictureQuestion = BallotQuestionUIElementOuterClass.BallotQuestionUIElement.newBuilder()
|
||||
.setQuestion(BallotQuestionUIElementOuterClass.UIQuestion.newBuilder()
|
||||
.setType(2)
|
||||
.setQuestion(BallotQuestionUIElementOuterClass.Question.newBuilder()
|
||||
.mergeFrom()
|
||||
.setAnswers(BallotQuestionUIElementOuterClass.UIAnswers.newBuilder()
|
||||
.setAnswersType(0)
|
||||
.setAnswers(BallotQuestionUIElementOuterClass.ListOfAnswers.newBuilder()
|
||||
.setAnswers(0, ByteString.copyFromUtf8("George Boosh"))
|
||||
.setAnswers(1, ByteString.copyFromUtf8("Antonio Banderas"))
|
||||
.setAnswers(2, ByteString.copyFromUtf8("Michal Jakson"))))
|
||||
.setRandomizeListOrder(true).build();
|
||||
.
|
||||
|
||||
**/
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) throws Exception
|
||||
{
|
||||
VotingBoothConfiguration config = new VotingBoothConfiguration();
|
||||
VotingBoothConfiguration config = GetConfig();
|
||||
ChainBuilder.Build(primaryStage, config);
|
||||
primaryStage.setTitle("Meerkat Polling Station");
|
||||
primaryStage.show();
|
||||
|
|
|
@ -6,7 +6,7 @@ import meerkat.protobuf.BallotQuestionUIElementOuterClass;
|
|||
* This object contains all the questions and configurations needed for the voting-booth-gui work
|
||||
*/
|
||||
public class VotingBoothConfiguration {
|
||||
private BallotQuestionUIElementOuterClass.BallotQuestionUIElement NameSelectionQuestion;
|
||||
private BallotQuestionUIElementOuterClass.BallotQuestionUIElement NameSelectionByPictureQuestion;
|
||||
public BallotQuestionUIElementOuterClass.BallotQuestionUIElement NameSelectionQuestion;
|
||||
public BallotQuestionUIElementOuterClass.BallotQuestionUIElement NameSelectionByPictureQuestion;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 7.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
Loading…
Reference in New Issue