starting fx window and communicating with graphicalUI thread
parent
0b1d334d3c
commit
c97519c28e
|
@ -5,12 +5,11 @@ package meerkat.voting.gui.ui;
|
|||
*/
|
||||
|
||||
import javafx.application.Application;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.event.EventHandler;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.stage.Stage;
|
||||
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;
|
||||
|
@ -23,6 +22,8 @@ public class GraphicalFX extends Application {
|
|||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GraphicalUI.class);
|
||||
private static GraphicalUI parent;
|
||||
private Stage activeStage;
|
||||
private static UICommand currentCommand;
|
||||
|
||||
public static void setParent(GraphicalUI ui) {
|
||||
if (GraphicalFX.parent==null) {
|
||||
|
@ -39,42 +40,75 @@ public class GraphicalFX extends Application {
|
|||
|
||||
// public static void main(String[] args) {
|
||||
// launch(args);
|
||||
// }
|
||||
|
||||
// @Override
|
||||
// public void start(Stage primaryStage) {
|
||||
// primaryStage.setTitle("Hello World!");
|
||||
// Button btn = new Button();
|
||||
// btn.setText("Say 'Hello World'");
|
||||
// btn.setOnAction(new EventHandler<ActionEvent>() {
|
||||
//
|
||||
// @Override
|
||||
// public void handle(ActionEvent event) {
|
||||
// System.out.println("Hello World!");
|
||||
// System.out.println(parent.testPrint());
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// StackPane root = new StackPane();
|
||||
// root.getChildren().add(btn);
|
||||
// Scene scene = new Scene(root, 300, 250);
|
||||
//
|
||||
// primaryStage.setScene(scene);
|
||||
// primaryStage.show();
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) {
|
||||
primaryStage.setTitle("Hello World!");
|
||||
Button btn = new Button();
|
||||
btn.setText("Say 'Hello World'");
|
||||
btn.setOnAction(new EventHandler<ActionEvent>() {
|
||||
this.activeStage=primaryStage;
|
||||
|
||||
@Override
|
||||
public void handle(ActionEvent event) {
|
||||
System.out.println("Hello World!");
|
||||
System.out.println(parent.testPrint());
|
||||
}
|
||||
});
|
||||
|
||||
StackPane root = new StackPane();
|
||||
root.getChildren().add(btn);
|
||||
Scene scene = new Scene(root, 300, 250);
|
||||
|
||||
// System.out.println("Working Directory = " +
|
||||
// System.getProperty("user.dir"));
|
||||
// Parent root = null;
|
||||
// try {
|
||||
// File dir1 = new File (".");
|
||||
// System.out.println ("Current dir : " + dir1.getCanonicalPath());
|
||||
// root = FXMLLoader.load(getClass().getClassLoader().getResource("/graphical_fxml/welcome_splash_screen.fxml"));
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// System.out.println("Working Directory = " +
|
||||
// System.getProperty("user.dir"));
|
||||
// }
|
||||
//
|
||||
// Parent root = new StackPane();
|
||||
// Scene scene = new Scene(root, 300, 275);
|
||||
// primaryStage.setScene(scene);
|
||||
// primaryStage.show();
|
||||
|
||||
primaryStage.setScene(scene);
|
||||
primaryStage.show();
|
||||
Parent root = null;
|
||||
try {
|
||||
root = FXMLLoader.load(getClass().getResource("/graphical_fxml/welcome_splash_screen.fxml"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Scene scene = new Scene(root, 300, 275);
|
||||
|
||||
this.activeStage.setScene(scene);
|
||||
this.activeStage.show();
|
||||
}
|
||||
|
||||
public void showWelcomeScreen(UICommand command) {
|
||||
GraphicalFX.currentCommand = command;
|
||||
System.out.println("in FX showWelcomeScreen");
|
||||
}
|
||||
|
||||
public void answerWelcomeScreen() {
|
||||
GraphicalFX.parent.answerWelcomeScreen((StartSessionUICommand) GraphicalFX.currentCommand);
|
||||
}
|
||||
|
||||
public void showChannelChoiceScreen(UICommand command) {
|
||||
GraphicalFX.currentCommand = command;
|
||||
System.out.println("in FX showChannelChoiceScreen");
|
||||
Parent root = null;
|
||||
try {
|
||||
root = FXMLLoader.load(getClass().getResource("/graphical_fxml/welcome_splash_screen.fxml"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Scene scene = new Scene(root, 300, 275);
|
||||
|
||||
this.activeStage.setScene(scene);
|
||||
this.activeStage.show();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -60,15 +60,26 @@ public class GraphicalUI implements VotingBoothUI, Runnable {
|
|||
@Override
|
||||
public void run () {
|
||||
logger.info("UI starts running");
|
||||
// Application.launch(GraphicalFX.class);
|
||||
new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
Application.launch(GraphicalFX.class);
|
||||
}
|
||||
}.start();
|
||||
try {
|
||||
Thread.sleep(500);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
while (! wasShutDownCalled()) {
|
||||
Application.launch(GraphicalFX.class);
|
||||
// try {
|
||||
// UICommand command = cmdPend.take();
|
||||
// handleSingleCommand(command);
|
||||
// }
|
||||
// catch (InterruptedException e) {
|
||||
// logger.warn ("Interrupted while reading the pending command " + e);
|
||||
// }
|
||||
try {
|
||||
UICommand command = cmdPend.take();
|
||||
handleSingleCommand(command);
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
logger.warn ("Interrupted while reading the pending command " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -146,8 +157,13 @@ public class GraphicalUI implements VotingBoothUI, Runnable {
|
|||
*/
|
||||
private void doShowWelcomeScreen(StartSessionUICommand command) {
|
||||
logger.debug("UI entered doShowWelcomeScreen");
|
||||
System.out.println("Welcome, new voter!");
|
||||
waitForEnter(null);
|
||||
this.ui.showWelcomeScreen(command);
|
||||
// waitForEnter(null);
|
||||
// ControllerCallback<Void> callback = command.getCallback();
|
||||
// callback.onSuccess(null);
|
||||
}
|
||||
|
||||
protected void answerWelcomeScreen(StartSessionUICommand command) {
|
||||
ControllerCallback<Void> callback = command.getCallback();
|
||||
callback.onSuccess(null);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,109 @@
|
|||
package meerkat.voting.gui.ui.controllerFX;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import meerkat.voting.gui.managment.TwoWayNode;
|
||||
import meerkat.voting.gui.ui.GraphicalFX;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 8/27/2016.
|
||||
* StraightChannelSectionController handle the behavior of select channel section screen
|
||||
*/
|
||||
public class StraightChannelSectionController {
|
||||
|
||||
private List<Integer> chanelValue;
|
||||
private int pointer;
|
||||
private boolean lock;
|
||||
|
||||
@FXML
|
||||
public void answerWelcomeScreen() {
|
||||
GraphicalFX.parent.answerWelcomeScreen((StartSessionUICommand) GraphicalFX.currentCommand);
|
||||
}
|
||||
|
||||
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
|
||||
*/
|
||||
private void updateVisualChanel(){
|
||||
for (int i = 0 ; i < 4 ; i ++ ){
|
||||
String id = "#textarea_"+i;
|
||||
TextField textField = ((TextField)this.currentStage.getScene().lookup(id));
|
||||
textField.setText(String.valueOf(this.chanelValue.get(i)));
|
||||
}
|
||||
// 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,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.GraphicalFX">
|
||||
<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>
|
|
@ -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.panels.welcome_splash.WelcomeSplashController">
|
||||
<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.GraphicalFX">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
|
@ -61,7 +61,7 @@
|
|||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1">
|
||||
<center>
|
||||
<Button mnemonicParsing="false" onMousePressed="#StartVotingProcess" prefHeight="50.0" prefWidth="170.0" text="Start Here" BorderPane.alignment="CENTER">
|
||||
<Button mnemonicParsing="false" onMousePressed="#answerWelcomeScreen" prefHeight="50.0" prefWidth="170.0" text="Start Here" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="24.0" />
|
||||
</font>
|
||||
|
|
Loading…
Reference in New Issue