javafx integration runs till channel choice
parent
c8044fc93d
commit
29b8ef9734
|
@ -9,7 +9,7 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 8/27/2016.
|
||||
* StartSessionController handle the behavior of welcome splash class
|
||||
* WelcomeScreenController handle the behavior of welcome splash class
|
||||
*/
|
||||
public class WelcomeSplashController extends TwoWayNode {
|
||||
|
||||
|
|
|
@ -2,6 +2,14 @@ package meerkat.voting.gui.ui;
|
|||
|
||||
import com.google.common.util.concurrent.FutureCallback;
|
||||
import javafx.application.Application;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.control.RadioButton;
|
||||
import javafx.scene.control.ToggleGroup;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.scene.text.Font;
|
||||
import javafx.scene.text.FontPosture;
|
||||
import javafx.scene.text.Text;
|
||||
import meerkat.protobuf.Voting.BallotAnswer;
|
||||
import meerkat.protobuf.Voting.BallotQuestion;
|
||||
import meerkat.protobuf.Voting.UIElement;
|
||||
|
@ -14,10 +22,7 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Timer;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -36,6 +41,7 @@ public class GraphicalUI implements VotingBoothUI, Runnable {
|
|||
|
||||
private MainFX ui;
|
||||
|
||||
|
||||
public GraphicalUI() {
|
||||
final int tickDurationInMillisec = 10; // period between view update calls
|
||||
|
||||
|
@ -64,7 +70,7 @@ public class GraphicalUI implements VotingBoothUI, Runnable {
|
|||
}
|
||||
}.start();
|
||||
try {
|
||||
Thread.sleep(500);
|
||||
MainFX.waitUntilLaunched();
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -154,6 +160,7 @@ public class GraphicalUI implements VotingBoothUI, Runnable {
|
|||
private void doShowWelcomeScreen(StartSessionUICommand command) {
|
||||
logger.debug("UI entered doShowWelcomeScreen");
|
||||
VistaNavigator.setCurrentCommand(command);
|
||||
VistaNavigator.loadVista(VistaNavigator.WELCOME_SCREEN);
|
||||
// waitForEnter(null);
|
||||
// ControllerCallback<Void> callback = command.getCallback();
|
||||
// callback.onSuccess(null);
|
||||
|
@ -212,7 +219,9 @@ public class GraphicalUI implements VotingBoothUI, Runnable {
|
|||
*/
|
||||
private void doAskChannelChoiceQuestions (ChannelChoiceUICommand command) {
|
||||
logger.debug("UI: doAskChannelChoiceQuestions");
|
||||
VistaNavigator.getMainController().showChannelChoiceScreen(command, logger);
|
||||
UIUtils.assertQuestionsAreValid(command.getQuestions(), logger);
|
||||
VistaNavigator.setCurrentCommand(command);
|
||||
VistaNavigator.loadVista(VistaNavigator.CHANNEL_CHOICE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -478,6 +487,45 @@ public class GraphicalUI implements VotingBoothUI, Runnable {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* present a question in a JavaFX environment to the voter
|
||||
* @param question a text ballot question
|
||||
*/
|
||||
public VBox showQuestionInFX(BallotQuestion question, ToggleGroup answerGroup) {
|
||||
if (!UIUtils.isQuestionOnlyText(question)) {
|
||||
System.err.println("debug: an element in question is not of TEXT type");
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
String questionText = UIUtils.bytesToString(question.getQuestion().getData());
|
||||
String description = UIUtils.bytesToString(question.getDescription().getData());
|
||||
|
||||
VBox vbox = new VBox();
|
||||
vbox.setPadding(new Insets(10));
|
||||
vbox.setSpacing(8);
|
||||
|
||||
Text title = new Text(questionText);
|
||||
vbox.getChildren().add(title);
|
||||
|
||||
Text descr = new Text(description);
|
||||
descr.setFont(Font.font(Font.getDefault().getFamily(), FontPosture.ITALIC, Font.getDefault().getSize()));
|
||||
vbox.getChildren().add(descr);
|
||||
|
||||
int answerIndex = 0;
|
||||
List<RadioButton> options = new ArrayList<RadioButton>();
|
||||
for (UIElement answer : question.getAnswerList()) {
|
||||
++answerIndex;
|
||||
RadioButton rb1 = new RadioButton(UIUtils.bytesToString(answer.getData()));
|
||||
rb1.setUserData(answerIndex);
|
||||
rb1.setToggleGroup(answerGroup);
|
||||
VBox.setMargin(rb1, new Insets(0, 0, 0, 8));
|
||||
vbox.getChildren().add(rb1);
|
||||
}
|
||||
|
||||
return vbox;
|
||||
}
|
||||
|
||||
|
||||
private boolean wasShutDownCalled () {
|
||||
return shutDownHasBeenCalled;
|
||||
}
|
||||
|
|
|
@ -10,11 +10,8 @@ import javafx.scene.layout.Pane;
|
|||
import javafx.stage.Stage;
|
||||
import meerkat.voting.gui.ui.controllersFX.MainController;
|
||||
import meerkat.voting.gui.ui.controllersFX.VistaNavigator;
|
||||
import meerkat.voting.gui.ui.uicommands.StartSessionUICommand;
|
||||
import meerkat.voting.gui.ui.uicommands.UICommand;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -32,6 +29,25 @@ public class MainFX extends Application {
|
|||
// launch(args);
|
||||
// }
|
||||
|
||||
private static boolean launched = false;
|
||||
|
||||
private static Object monitor = new Object();
|
||||
|
||||
public static void waitUntilLaunched() throws InterruptedException {
|
||||
synchronized (monitor) {
|
||||
while (!launched) {
|
||||
monitor.wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void notifyLaunched() {
|
||||
synchronized (monitor) {
|
||||
launched = true;
|
||||
monitor.notifyAll();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(Stage stage) throws Exception{
|
||||
stage.setTitle("Vista Viewer");
|
||||
|
@ -41,6 +57,7 @@ public class MainFX extends Application {
|
|||
)
|
||||
);
|
||||
stage.show();
|
||||
notifyLaunched();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -57,10 +74,10 @@ public class MainFX extends Application {
|
|||
Pane mainPane = (Pane) loader.load();
|
||||
|
||||
MainController mainController = loader.getController();
|
||||
mainController.setCurrentCommand(null);
|
||||
mainController.init();//setCurrentCommand(null);
|
||||
|
||||
VistaNavigator.setMainController(mainController);
|
||||
VistaNavigator.loadVista(VistaNavigator.VISTA_1);
|
||||
VistaNavigator.loadVista(VistaNavigator.EMPTY_START);
|
||||
|
||||
return mainPane;
|
||||
}
|
||||
|
|
|
@ -10,14 +10,14 @@ import java.util.StringTokenizer;
|
|||
* Created by Vladimir Eliezer Tokarev on 9/17/2016.
|
||||
* This class contains methods that are used by all the UI's implementations
|
||||
*/
|
||||
class UIUtils {
|
||||
public class UIUtils {
|
||||
|
||||
/**
|
||||
* Convert string into protobuff message answer
|
||||
* @param s string represent of an answer for a question
|
||||
* @return protobuff message answer
|
||||
*/
|
||||
static Voting.BallotAnswer translateStringAnswerToProtoBufMessageAnswer(String s) {
|
||||
public static Voting.BallotAnswer translateStringAnswerToProtoBufMessageAnswer(String s) {
|
||||
Voting.BallotAnswer.Builder bab = Voting.BallotAnswer.newBuilder();
|
||||
StringTokenizer st = new StringTokenizer(s);
|
||||
while (st.hasMoreTokens()) {
|
||||
|
|
|
@ -2,9 +2,16 @@ package meerkat.voting.gui.ui.controllersFX;
|
|||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.control.Toggle;
|
||||
import javafx.scene.control.ToggleGroup;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.scene.text.Text;
|
||||
import meerkat.protobuf.Voting;
|
||||
import meerkat.voting.controller.callbacks.VoterCancelThrowable;
|
||||
//import meerkat.voting.gui.ui.UIUtils;
|
||||
import meerkat.voting.gui.ui.UIUtils;
|
||||
import meerkat.voting.gui.ui.uicommands.ChannelChoiceUICommand;
|
||||
import meerkat.voting.gui.ui.uicommands.UICommand;
|
||||
|
@ -19,98 +26,71 @@ import java.util.List;
|
|||
*/
|
||||
public class ChannelChoiceController {
|
||||
|
||||
private List<Integer> chanelValue;
|
||||
private int pointer;
|
||||
private boolean lock;
|
||||
// private List<Integer> chanelValue;
|
||||
// private int pointer;
|
||||
// private boolean lock;
|
||||
|
||||
List<Voting.BallotAnswer> answers = new ArrayList<>();
|
||||
List<Voting.BallotQuestion> questions = new ArrayList<>();
|
||||
int index = 0;
|
||||
ChannelChoiceUICommand command = (ChannelChoiceUICommand) VistaNavigator.getCurrentCommand();
|
||||
|
||||
@FXML ToggleGroup answerGroup;
|
||||
@FXML private Text question;
|
||||
@FXML private Pane questionPane;
|
||||
|
||||
@FXML
|
||||
public void answerWelcomeScreen() {
|
||||
// MainFX.parent.answerWelcomeScreen((StartSessionUICommand) MainFX.currentCommand);
|
||||
private void nextQuestion() {
|
||||
if (questions.size()==0) {
|
||||
questions = command.getQuestions();
|
||||
answerGroup = new ToggleGroup();
|
||||
}
|
||||
if (answerGroup.getSelectedToggle()!=null) {
|
||||
String s = answerGroup.getSelectedToggle().getUserData().toString();
|
||||
answers.add(UIUtils.translateStringAnswerToProtoBufMessageAnswer(s));
|
||||
index++;
|
||||
}
|
||||
if (index < questions.size()) {
|
||||
showQuestion();
|
||||
} else {
|
||||
//return answers to main threads
|
||||
nextPane();
|
||||
}
|
||||
}
|
||||
|
||||
private void showQuestion() {
|
||||
Voting.BallotQuestion ballotQuestion = questions.get(index);
|
||||
question.setText("This question n. "+index);
|
||||
answerGroup.getToggles().clear();
|
||||
VBox vbox = VistaNavigator.uiThread.showQuestionInFX(ballotQuestion, answerGroup);
|
||||
questionPane.getChildren().clear();
|
||||
questionPane.getChildren().addAll(vbox);
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void goBack() throws VoterCancelThrowable{
|
||||
if (index == 0) {
|
||||
doCancel();
|
||||
} else {
|
||||
--index;
|
||||
answers.remove(index);
|
||||
nextQuestion();
|
||||
}
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void doCancel() throws VoterCancelThrowable{
|
||||
VoterCancelThrowable e = new VoterCancelThrowable();
|
||||
command.getCallback().onFailure(e);
|
||||
//see what is done in the original (basically need to call the callback of the command onFailure()
|
||||
}
|
||||
|
||||
|
||||
private void nextPane() {
|
||||
ChannelChoiceUICommand command = (ChannelChoiceUICommand) VistaNavigator.getCurrentCommand();
|
||||
System.out.println("Showing questions for choosing channel:\n");
|
||||
try {
|
||||
List<Voting.BallotAnswer> answers = askVoterForAnswers(command.getQuestions());
|
||||
VistaNavigator.getCurrentCommand().getCallback().onSuccess(answers);
|
||||
}
|
||||
catch (VoterCancelThrowable e) {
|
||||
VistaNavigator.getCurrentCommand().getCallback().onFailure(e);
|
||||
}
|
||||
catch (IOException e) {
|
||||
// String errorMessage = "Channel choice failed due to IOException: " + e;
|
||||
// logger.error (errorMessage);
|
||||
// System.err.println(errorMessage);
|
||||
VistaNavigator.getCurrentCommand().getCallback().onFailure(e);
|
||||
}
|
||||
|
||||
//askVoterForAnswers:
|
||||
List<Voting.BallotAnswer> answers = new ArrayList<>();
|
||||
int index = 0;
|
||||
while (index < questions.size()) {
|
||||
Voting.BallotQuestion question = questions.get(index);
|
||||
System.out.println("Question number " + index);
|
||||
showQuestionInConsole(question);
|
||||
|
||||
System.out.println("UI screen: Enter your answer. You can also type '(b)ack' or '(c)ancel' or '(s)kip");
|
||||
String s = readInputLine();
|
||||
|
||||
if ((s.equals("cancel") || s.equals("c")) || (index == 0 && (s.equals("back") || s.equals("b")))) {
|
||||
throw new VoterCancelThrowable();
|
||||
}
|
||||
else if (s.equals("back") || s.equals("b")) {
|
||||
--index;
|
||||
answers.remove(index);
|
||||
}
|
||||
else if (s.equals("skip") || s.equals("s")) {
|
||||
answers.add(UIUtils.translateStringAnswerToProtoBufMessageAnswer(""));
|
||||
++index;
|
||||
}
|
||||
else {
|
||||
answers.add(UIUtils.translateStringAnswerToProtoBufMessageAnswer(s));
|
||||
++index;
|
||||
}
|
||||
}
|
||||
return answers;
|
||||
VistaNavigator.loadVista(VistaNavigator.LOADING);
|
||||
command.getCallback().onSuccess(answers);
|
||||
}
|
||||
|
||||
private void ProceedToNameSelection(MouseEvent boutonPressed) {
|
||||
// this.currentStage.close();
|
||||
// this.currentStage.setScene(this.next.GetCurrentScene());
|
||||
// this.next.UpdateNode();
|
||||
// this.currentStage.show();
|
||||
// this.logger.debug("Created the proceess to name selection object loader.");
|
||||
}
|
||||
|
||||
// @Override
|
||||
/**
|
||||
* Creates the array of the canel value
|
||||
*/
|
||||
public void UpdateNode() {
|
||||
this.pointer = 0;
|
||||
this.lock = false;
|
||||
|
||||
// created the channel value list
|
||||
// every value in the list represents one of the cells values
|
||||
this.chanelValue = new ArrayList<>();
|
||||
this.chanelValue.add(0);
|
||||
this.chanelValue.add(0);
|
||||
this.chanelValue.add(0);
|
||||
this.chanelValue.add(0);
|
||||
// this.logger.debug("Created and filled with zeros the channel value.");
|
||||
|
||||
this.updateVisualChanel();
|
||||
// this.UpdateVotersChoise();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the channel in the voters choise
|
||||
*/
|
||||
// private void UpdateVotersChoise(){
|
||||
// this.votersBallot.VoterChannel = this.chanelValue;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Updates the visual channel value
|
||||
*/
|
||||
|
@ -123,35 +103,4 @@ public class ChannelChoiceController {
|
|||
// this.logger.debug("Updated the visual representation of the channel (its visual value).");
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void numberPressed(MouseEvent mousePressed){
|
||||
if (!this.lock) {
|
||||
String value = ((Button) mousePressed.getSource()).getId().split("_")[1];
|
||||
this.chanelValue.set(this.pointer, Integer.parseInt(value));
|
||||
this.pointer++;
|
||||
this.updateVisualChanel();
|
||||
// this.UpdateVotersChoise();
|
||||
if (this.pointer == 4) {
|
||||
this.lock = true;
|
||||
}
|
||||
// this.logger.debug("The " + value +" button have been pressed, then this value was pushed to channel value.");
|
||||
}
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void clearLastNumber(MouseEvent mousePressed){
|
||||
if (this.pointer >= 1) {
|
||||
int lastValueLocation = this.pointer - 1;
|
||||
int lastValue = this.chanelValue.get(lastValueLocation);
|
||||
this.chanelValue.set(lastValueLocation, 0);
|
||||
// this.currentStage.show();
|
||||
this.pointer--;
|
||||
this.updateVisualChanel();
|
||||
// this.UpdateVotersChoise();
|
||||
this.lock = false;
|
||||
// this.logger.debug("The last value was removed from channel value (the value was " + lastValue + " ).");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
package meerkat.voting.gui.ui.controllersFX;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import meerkat.voting.gui.ui.uicommands.StartSessionUICommand;
|
||||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 8/27/2016.
|
||||
* WelcomeScreenController handle the behavior of welcome splash class
|
||||
*/
|
||||
public class EmptyStartController {
|
||||
|
||||
/**
|
||||
* Event handler fired when the user requests a new vista.
|
||||
*
|
||||
*/
|
||||
// @FXML
|
||||
// void nextPane() {
|
||||
// VistaNavigator.loadVista(VistaNavigator.VISTA_2);
|
||||
// }
|
||||
|
||||
}
|
|
@ -9,6 +9,7 @@ import javafx.scene.Parent;
|
|||
import javafx.scene.layout.StackPane;
|
||||
import meerkat.protobuf.Voting;
|
||||
import meerkat.voting.controller.callbacks.VoterCancelThrowable;
|
||||
import meerkat.voting.gui.ui.CommandPend;
|
||||
import org.slf4j.Logger;
|
||||
import meerkat.voting.gui.ui.uicommands.ChannelChoiceUICommand;
|
||||
import meerkat.voting.gui.ui.uicommands.UICommand;
|
||||
|
@ -21,12 +22,16 @@ import java.util.List;
|
|||
*/
|
||||
public class MainController {
|
||||
|
||||
private UICommand currentCommand;
|
||||
private CommandPend<UICommand> cmdPend;
|
||||
|
||||
/** Holder of a switchable vista. */
|
||||
@FXML
|
||||
private StackPane vistaHolder;
|
||||
|
||||
public void init() {
|
||||
cmdPend = new CommandPend<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces the vista displayed in the vista holder with a new vista.
|
||||
*
|
||||
|
@ -37,22 +42,16 @@ public class MainController {
|
|||
}
|
||||
|
||||
public void setCurrentCommand(UICommand command) {
|
||||
this.currentCommand = command;
|
||||
cmdPend.trample(command);
|
||||
}
|
||||
|
||||
public UICommand getCurrentCommand() {
|
||||
while (this.currentCommand==null) {
|
||||
;
|
||||
try {
|
||||
return cmdPend.take();
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
return this.currentCommand;
|
||||
}
|
||||
|
||||
public void showChannelChoiceScreen(ChannelChoiceUICommand command, Logger logger) {
|
||||
this.currentCommand = command;
|
||||
System.out.println("in FX showChannelChoiceScreen");
|
||||
// UIUtils.assertQuestionsAreValid (command.getQuestions(), logger);
|
||||
|
||||
VistaNavigator.loadVista(VistaNavigator.CHANNEL_CHOICE);
|
||||
}
|
||||
|
||||
}
|
|
@ -18,7 +18,7 @@ public class Vista2Controller {
|
|||
*/
|
||||
@FXML
|
||||
void previousPane(ActionEvent event) {
|
||||
VistaNavigator.loadVista(VistaNavigator.VISTA_1);
|
||||
VistaNavigator.loadVista(VistaNavigator.EMPTY_START);
|
||||
}
|
||||
|
||||
}
|
|
@ -3,11 +3,15 @@ package meerkat.voting.gui.ui.controllersFX;
|
|||
/**
|
||||
* Created by Laura on 12/16/2016.
|
||||
*/
|
||||
import javafx.application.Platform;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Node;
|
||||
import meerkat.voting.gui.ui.GraphicalUI;
|
||||
import meerkat.voting.gui.ui.uicommands.UICommand;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.ArrayBlockingQueue;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
|
||||
/**
|
||||
* Utility class for controlling navigation between vistas.
|
||||
|
@ -22,7 +26,8 @@ public class VistaNavigator {
|
|||
*/
|
||||
public static final String MAIN = "/views/main.fxml";
|
||||
public static final String LOADING = "/views/loading.fxml";
|
||||
public static final String VISTA_1 = "/views/starting_session.fxml";
|
||||
public static final String EMPTY_START = "/views/empty_start.fxml";
|
||||
public static final String WELCOME_SCREEN = "/views/welcome_screen.fxml";
|
||||
public static final String VISTA_2 = "/views/vista2.fxml";
|
||||
public static final String CHANNEL_CHOICE = "/views/channel_choice.fxml";
|
||||
|
||||
|
@ -88,10 +93,18 @@ public class VistaNavigator {
|
|||
*/
|
||||
public static void loadVista(String fxml) {
|
||||
try {
|
||||
mainController.setVista(
|
||||
FXMLLoader.load(VistaNavigator.class.getResource(fxml)
|
||||
)
|
||||
// mainController.setVista(FXMLLoader.load(VistaNavigator.class.getResource(fxml)));
|
||||
// final BlockingQueue queue = new ArrayBlockingQueue(1);
|
||||
Node node = FXMLLoader.load(VistaNavigator.class.getResource(fxml));
|
||||
Platform.runLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mainController.setVista(node);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -5,9 +5,9 @@ import meerkat.voting.gui.ui.uicommands.StartSessionUICommand;
|
|||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 8/27/2016.
|
||||
* StartSessionController handle the behavior of welcome splash class
|
||||
* WelcomeScreenController handle the behavior of welcome splash class
|
||||
*/
|
||||
public class StartSessionController {
|
||||
public class WelcomeScreenController {
|
||||
|
||||
/**
|
||||
* Event handler fired when the user requests a new vista.
|
|
@ -1,322 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.text.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import java.lang.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
<GridPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="meerkat.voting.gui.ui.MainFX">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="129.0" minHeight="0.0" prefHeight="31.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="326.0" minHeight="10.0" prefHeight="315.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="75.0" minHeight="10.0" prefHeight="35.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="meerkat.voting.gui.ui.controllersFX.ChannelChoiceController">
|
||||
<children>
|
||||
<GridPane>
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="295.0" minWidth="10.0" prefWidth="193.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="416.0" minWidth="10.0" prefWidth="407.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<center>
|
||||
<Label text="Organization Logo" BorderPane.alignment="CENTER" />
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<left>
|
||||
<Label text="This is the Name of the Election" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="16.0" />
|
||||
</font>
|
||||
<opaqueInsets>
|
||||
<Insets left="300.0" />
|
||||
</opaqueInsets>
|
||||
</Label>
|
||||
</left>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="193.0" minWidth="10.0" prefWidth="54.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="490.0" minWidth="10.0" prefWidth="481.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="145.0" minWidth="10.0" prefWidth="59.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="88.0" minHeight="3.0" prefHeight="21.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="272.0" minHeight="10.0" prefHeight="270.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="56.0" minHeight="6.0" prefHeight="8.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||
<center>
|
||||
<GridPane prefHeight="251.0" prefWidth="483.0" BorderPane.alignment="CENTER">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="72.0" minHeight="0.0" prefHeight="16.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="156.0" minHeight="10.0" prefHeight="17.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="217.0" minHeight="10.0" prefHeight="217.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<top>
|
||||
<Label text="Choose Your channel" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="15.0" />
|
||||
</font>
|
||||
</Label>
|
||||
</top>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1">
|
||||
<top>
|
||||
<Label text="Use the keypad to enter your 4 digit code" BorderPane.alignment="CENTER" />
|
||||
</top>
|
||||
</BorderPane>
|
||||
<GridPane prefHeight="203.0" prefWidth="483.0" GridPane.rowIndex="2">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="116.0" minWidth="10.0" prefWidth="104.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="333.0" minWidth="10.0" prefWidth="275.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="156.0" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<center>
|
||||
<GridPane BorderPane.alignment="CENTER">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane>
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="67.0" prefWidth="46.0">
|
||||
<center>
|
||||
<TextField fx:id="textarea_0" maxHeight="74.0" maxWidth="74.0" minHeight="54.0" minWidth="58.0" prefHeight="69.0" prefWidth="69.0" text="1" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="30.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<center>
|
||||
<TextField fx:id="textarea_1" maxHeight="74.0" maxWidth="74.0" minHeight="54.0" minWidth="58.0" prefHeight="69.0" prefWidth="69.0" text="6" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="30.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2">
|
||||
<center>
|
||||
<TextField fx:id="textarea_2" maxHeight="74.0" maxWidth="74.0" minHeight="54.0" minWidth="58.0" prefHeight="54.0" prefWidth="69.0" text="8" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="30.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="55.0" prefWidth="70.0" GridPane.columnIndex="3">
|
||||
<center>
|
||||
<TextField fx:id="textarea_3" maxHeight="74.0" maxWidth="74.0" minHeight="54.0" minWidth="58.0" prefHeight="54.0" prefWidth="69.0" text="5" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="30.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<center>
|
||||
<Button fx:id="button_2" mnemonicParsing="false" onMousePressed="#numberPressed" prefHeight="54.0" prefWidth="69.0" text="2" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" />
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2">
|
||||
<center>
|
||||
<Button fx:id="button_3" mnemonicParsing="false" onMousePressed="#numberPressed" prefHeight="54.0" prefWidth="69.0" text="3" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="3">
|
||||
<center>
|
||||
<Button fx:id="button_4" mnemonicParsing="false" onMousePressed="#numberPressed" prefHeight="54.0" prefWidth="69.0" text="4" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<Button fx:id="button_1" mnemonicParsing="false" onMousePressed="#numberPressed" prefHeight="54.0" prefWidth="69.0" text="1">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.rowIndex="2">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<center>
|
||||
<Button fx:id="button_5" mnemonicParsing="false" onMousePressed="#numberPressed" prefHeight="54.0" prefWidth="69.0" text="5" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<center>
|
||||
<Button fx:id="button_6" mnemonicParsing="false" onMousePressed="#numberPressed" prefHeight="54.0" prefWidth="69.0" text="6" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2">
|
||||
<center>
|
||||
<Button fx:id="button_7" mnemonicParsing="false" onMousePressed="#numberPressed" prefHeight="54.0" prefWidth="69.0" text="7" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="3">
|
||||
<center>
|
||||
<Button fx:id="button_8" mnemonicParsing="false" onMousePressed="#numberPressed" prefHeight="54.0" prefWidth="69.0" text="8" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.rowIndex="3">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="92.0" minWidth="10.0" prefWidth="71.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="87.0" minWidth="10.0" prefWidth="68.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="138.0" minWidth="10.0" prefWidth="138.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" />
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<center>
|
||||
<Button fx:id="button_0" mnemonicParsing="false" onMousePressed="#numberPressed" prefHeight="54.0" prefWidth="69.0" text="0" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2">
|
||||
<right>
|
||||
<Button fx:id="button_clear_last" mnemonicParsing="false" onMousePressed="#clearLastNumber" prefHeight="54.0" prefWidth="138.0" text="Clear Last" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="24.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</right>
|
||||
</BorderPane>
|
||||
<Button fx:id="button_9" mnemonicParsing="false" onMousePressed="#numberPressed" prefHeight="54.0" prefWidth="69.0" text="9">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.rowIndex="2">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2">
|
||||
<center>
|
||||
<Button mnemonicParsing="false" onMousePressed="#ProceedToNameSelection" prefHeight="39.0" prefWidth="128.0" text="Next" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<Button layoutX="469.0" layoutY="343.0" mnemonicParsing="false" onMousePressed="#nextQuestion" text="Next" />
|
||||
<Text fx:id="question" layoutX="84.0" layoutY="89.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Click 'Next' to see the first question." wrappingWidth="431.3046875" />
|
||||
<Pane fx:id="questionPane" layoutX="84.0" layoutY="97.0" prefHeight="234.0" prefWidth="422.0" />
|
||||
<Button layoutX="275.0" layoutY="343.0" mnemonicParsing="false" onMousePressed="#doCancel" text="Cancel" />
|
||||
<Button layoutX="84.0" layoutY="343.0" mnemonicParsing="false" onMousePressed="#goBack" text="Back" />
|
||||
</children>
|
||||
</GridPane>
|
||||
</Pane>
|
||||
|
|
|
@ -0,0 +1,322 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.text.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import java.lang.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<GridPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="meerkat.voting.gui.ui.MainFX">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="129.0" minHeight="0.0" prefHeight="31.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="326.0" minHeight="10.0" prefHeight="315.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="75.0" minHeight="10.0" prefHeight="35.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane>
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="295.0" minWidth="10.0" prefWidth="193.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="416.0" minWidth="10.0" prefWidth="407.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<center>
|
||||
<Label text="Organization Logo" BorderPane.alignment="CENTER" />
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<left>
|
||||
<Label text="This is the Name of the Election" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="16.0" />
|
||||
</font>
|
||||
<opaqueInsets>
|
||||
<Insets left="300.0" />
|
||||
</opaqueInsets>
|
||||
</Label>
|
||||
</left>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="193.0" minWidth="10.0" prefWidth="54.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="490.0" minWidth="10.0" prefWidth="481.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="145.0" minWidth="10.0" prefWidth="59.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="88.0" minHeight="3.0" prefHeight="21.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="272.0" minHeight="10.0" prefHeight="270.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="56.0" minHeight="6.0" prefHeight="8.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||
<center>
|
||||
<GridPane prefHeight="251.0" prefWidth="483.0" BorderPane.alignment="CENTER">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="72.0" minHeight="0.0" prefHeight="16.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="156.0" minHeight="10.0" prefHeight="17.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="217.0" minHeight="10.0" prefHeight="217.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<top>
|
||||
<Label text="Choose Your channel" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="15.0" />
|
||||
</font>
|
||||
</Label>
|
||||
</top>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1">
|
||||
<top>
|
||||
<Label text="Use the keypad to enter your 4 digit code" BorderPane.alignment="CENTER" />
|
||||
</top>
|
||||
</BorderPane>
|
||||
<GridPane prefHeight="203.0" prefWidth="483.0" GridPane.rowIndex="2">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="116.0" minWidth="10.0" prefWidth="104.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="333.0" minWidth="10.0" prefWidth="275.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="156.0" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<center>
|
||||
<GridPane BorderPane.alignment="CENTER">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane>
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="67.0" prefWidth="46.0">
|
||||
<center>
|
||||
<TextField fx:id="textarea_0" maxHeight="74.0" maxWidth="74.0" minHeight="54.0" minWidth="58.0" prefHeight="69.0" prefWidth="69.0" text="1" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="30.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<center>
|
||||
<TextField fx:id="textarea_1" maxHeight="74.0" maxWidth="74.0" minHeight="54.0" minWidth="58.0" prefHeight="69.0" prefWidth="69.0" text="6" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="30.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2">
|
||||
<center>
|
||||
<TextField fx:id="textarea_2" maxHeight="74.0" maxWidth="74.0" minHeight="54.0" minWidth="58.0" prefHeight="54.0" prefWidth="69.0" text="8" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="30.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="55.0" prefWidth="70.0" GridPane.columnIndex="3">
|
||||
<center>
|
||||
<TextField fx:id="textarea_3" maxHeight="74.0" maxWidth="74.0" minHeight="54.0" minWidth="58.0" prefHeight="54.0" prefWidth="69.0" text="5" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="30.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<center>
|
||||
<Button fx:id="button_2" mnemonicParsing="false" onMousePressed="#numberPressed" prefHeight="54.0" prefWidth="69.0" text="2" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" />
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2">
|
||||
<center>
|
||||
<Button fx:id="button_3" mnemonicParsing="false" onMousePressed="#numberPressed" prefHeight="54.0" prefWidth="69.0" text="3" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="3">
|
||||
<center>
|
||||
<Button fx:id="button_4" mnemonicParsing="false" onMousePressed="#numberPressed" prefHeight="54.0" prefWidth="69.0" text="4" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<Button fx:id="button_1" mnemonicParsing="false" onMousePressed="#numberPressed" prefHeight="54.0" prefWidth="69.0" text="1">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.rowIndex="2">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<center>
|
||||
<Button fx:id="button_5" mnemonicParsing="false" onMousePressed="#numberPressed" prefHeight="54.0" prefWidth="69.0" text="5" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<center>
|
||||
<Button fx:id="button_6" mnemonicParsing="false" onMousePressed="#numberPressed" prefHeight="54.0" prefWidth="69.0" text="6" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2">
|
||||
<center>
|
||||
<Button fx:id="button_7" mnemonicParsing="false" onMousePressed="#numberPressed" prefHeight="54.0" prefWidth="69.0" text="7" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="3">
|
||||
<center>
|
||||
<Button fx:id="button_8" mnemonicParsing="false" onMousePressed="#numberPressed" prefHeight="54.0" prefWidth="69.0" text="8" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.rowIndex="3">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="92.0" minWidth="10.0" prefWidth="71.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="87.0" minWidth="10.0" prefWidth="68.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="138.0" minWidth="10.0" prefWidth="138.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" />
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<center>
|
||||
<Button fx:id="button_0" mnemonicParsing="false" onMousePressed="#numberPressed" prefHeight="54.0" prefWidth="69.0" text="0" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2">
|
||||
<right>
|
||||
<Button fx:id="button_clear_last" mnemonicParsing="false" onMousePressed="#clearLastNumber" prefHeight="54.0" prefWidth="138.0" text="Clear Last" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="24.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</right>
|
||||
</BorderPane>
|
||||
<Button fx:id="button_9" mnemonicParsing="false" onMousePressed="#numberPressed" prefHeight="54.0" prefWidth="69.0" text="9">
|
||||
<font>
|
||||
<Font size="25.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.rowIndex="2">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2">
|
||||
<center>
|
||||
<Button mnemonicParsing="false" onMousePressed="#ProceedToNameSelection" prefHeight="39.0" prefWidth="128.0" text="Next" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.BorderPane?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.layout.RowConstraints?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
|
||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="meerkat.voting.gui.ui.controllersFX.EmptyStartController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints />
|
||||
<RowConstraints maxHeight="129.0" minHeight="10.0" prefHeight="47.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="222.0" minHeight="10.0" prefHeight="201.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="170.0" minHeight="10.0" prefHeight="129.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="185.0" minWidth="10.0" prefWidth="185.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="334.0" minWidth="10.0" prefWidth="258.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="194.0" minWidth="10.0" prefWidth="124.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<center>
|
||||
<Label text="Organization Logo" BorderPane.alignment="CENTER" />
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2">
|
||||
<center>
|
||||
<Label text="Date" BorderPane.alignment="CENTER" />
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="74.0" minHeight="10.0" prefHeight="74.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="123.0" minHeight="10.0" prefHeight="93.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="59.0" minHeight="10.0" prefHeight="29.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
</GridPane>
|
||||
<GridPane GridPane.columnIndex="1" GridPane.rowIndex="2">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="75.0" minHeight="10.0" prefHeight="75.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="107.0" minHeight="10.0" prefHeight="107.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="56.0" minHeight="10.0" prefHeight="27.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1" />
|
||||
<GridPane>
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<center>
|
||||
<Label text="This is the name of the Election" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1">
|
||||
<top>
|
||||
<Label text="Location | Precinct" BorderPane.alignment="CENTER" />
|
||||
</top>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="3">
|
||||
<center>
|
||||
<Label fx:id="ErrorPanel" maxHeight="30.0" maxWidth="500.0" minHeight="30.0" minWidth="500.0" prefHeight="30.0" prefWidth="500.0" BorderPane.alignment="CENTER" />
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
|
@ -1,12 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.StackPane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?scenebuilder-stylesheet vista.css?>
|
||||
|
||||
<VBox prefHeight="200.0" prefWidth="300.0" xmlns:fx="http://javafx.com/fxml" fx:controller="meerkat.voting.gui.ui.controllersFX.MainController">
|
||||
<VBox prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="meerkat.voting.gui.ui.controllersFX.MainController">
|
||||
<children>
|
||||
<Label fx:id="headerLabel" maxWidth="1.7976931348623157E308" text="Header" VBox.vgrow="NEVER" />
|
||||
<StackPane fx:id="vistaHolder" VBox.vgrow="ALWAYS" />
|
||||
<StackPane fx:id="vistaHolder" prefHeight="404.0" prefWidth="524.0" VBox.vgrow="ALWAYS" />
|
||||
</children>
|
||||
</VBox>
|
||||
</VBox>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<?import java.lang.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="meerkat.voting.gui.ui.controllersFX.StartSessionController">
|
||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="meerkat.voting.gui.ui.controllersFX.WelcomeScreenController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
Loading…
Reference in New Issue