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
|
@ -1,9 +1,12 @@
|
||||||
package meerkat.voting.gui;
|
package meerkat.voting.gui;
|
||||||
|
import meerkat.protobuf.BallotQuestionUIElementOuterClass;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Vladimir Eliezer Tokarev on 10/1/2016.
|
* Created by Vladimir Eliezer Tokarev on 10/1/2016.
|
||||||
* This object contains all the questions and configurations needed for the voting-booth-gui work
|
* This object contains all the questions and configurations needed for the voting-booth-gui work
|
||||||
*/
|
*/
|
||||||
public class VotingBoothConfiguration {
|
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.application.Application;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import meerkat.protobuf.Voting;
|
import meerkat.protobuf.Voting;
|
||||||
|
import meerkat.voting.VotingBooth;
|
||||||
import meerkat.voting.ui.VotingBoothUI;
|
import meerkat.voting.ui.VotingBoothUI;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Null;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
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.
|
* Created by Vladimir Eliezer Tokarev on 9/17/2016.
|
||||||
|
@ -31,7 +36,7 @@ public class VotingBoothGUIManager extends Application implements VotingBoothUI
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
private void doStartNewSession(Stage primaryStage) 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 = primaryStage;
|
||||||
this.currentStage.setTitle("Voting Booth");
|
this.currentStage.setTitle("Voting Booth");
|
||||||
this.currentStage.show();
|
this.currentStage.show();
|
||||||
|
|
Loading…
Reference in New Issue