Added the protobuf that describes the voting booth question
And changed the panels to work with voting booth configuration object instead of the backend.android-scanner
parent
5c2de6d009
commit
68291d34f3
|
@ -4,7 +4,7 @@ package meerkat;
|
|||
|
||||
option java_package = "meerkat.protobuf";
|
||||
|
||||
import 'meerkat/crypto.proto';
|
||||
import 'meerkat/crypto.proto';
|
||||
import 'google/protobuf/timestamp.proto';
|
||||
|
||||
message BoolMsg {
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
package meerkat.voting.gui;
|
||||
import meerkat.protobuf.BallotQuestionUIElementOuterClass;
|
||||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 10/1/2016.
|
||||
* This object contains all the questions and configurations needed for the voting-booth-gui work
|
||||
*/
|
||||
public class VotingBoothConfiguration {
|
||||
// will have fields that represent different question and their answers and decription tools
|
||||
private BallotQuestionUIElementOuterClass.BallotQuestionUIElement NameSelectionQuestion;
|
||||
private BallotQuestionUIElementOuterClass.BallotQuestionUIElement NameSelectionByPictureQuestion;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,12 +4,17 @@ import com.google.common.util.concurrent.FutureCallback;
|
|||
import javafx.application.Application;
|
||||
import javafx.stage.Stage;
|
||||
import meerkat.protobuf.Voting;
|
||||
import meerkat.voting.VotingBooth;
|
||||
import meerkat.voting.ui.VotingBoothUI;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.validation.constraints.Null;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* NOTE: For current state of voting-booth-gui (which doesnt have backed) this is class is unrelevant
|
||||
*/
|
||||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 9/17/2016.
|
||||
|
@ -31,7 +36,7 @@ public class VotingBoothGUIManager extends Application implements VotingBoothUI
|
|||
* @throws IOException
|
||||
*/
|
||||
private void doStartNewSession(Stage primaryStage) throws IOException {
|
||||
this.visualPanelsMap = ChainBuilder.Build(primaryStage);
|
||||
this.visualPanelsMap = ChainBuilder.Build(primaryStage, new VotingBoothConfiguration());
|
||||
this.currentStage = primaryStage;
|
||||
this.currentStage.setTitle("Voting Booth");
|
||||
this.currentStage.show();
|
||||
|
|
Loading…
Reference in New Issue