Connected the Welcome splash to straight channel section

When start voting pressed in welcome splash panel strair channel loaded
android-scanner
Vladimir Eliezer Tokarev 2016-08-27 15:07:18 +03:00
parent e200bc0f8b
commit 01cda996f9
14 changed files with 42 additions and 35 deletions

View File

@ -6,7 +6,7 @@
<?import java.lang.*?>
<?import javafx.scene.layout.*?>
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8">
<GridPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="main.straight_channel_section.StraightChannelSectionController">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
@ -116,40 +116,40 @@
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<BorderPane prefHeight="200.0" prefWidth="200.0">
<BorderPane prefHeight="67.0" prefWidth="46.0">
<center>
<TextArea prefHeight="200.0" prefWidth="200.0" text="2" BorderPane.alignment="CENTER">
<TextField 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>
</TextArea>
</TextField>
</center>
</BorderPane>
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
<center>
<TextArea prefHeight="200.0" prefWidth="200.0" text="4" BorderPane.alignment="CENTER">
<TextField 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>
</TextArea>
</TextField>
</center>
</BorderPane>
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2">
<center>
<TextArea prefHeight="200.0" prefWidth="200.0" text="8" BorderPane.alignment="CENTER">
<TextField 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>
</TextArea>
</TextField>
</center>
</BorderPane>
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="3">
<BorderPane prefHeight="55.0" prefWidth="70.0" GridPane.columnIndex="3">
<center>
<TextArea prefHeight="200.0" prefWidth="200.0" text="5" BorderPane.alignment="CENTER">
<TextField 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>
</TextArea>
</TextField>
</center>
</BorderPane>
</children>

View File

@ -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:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8" fx:controller="main.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="main.welcome_splash.WelcomeSplashController">
<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" prefHeight="50.0" prefWidth="170.0" text="Start Here" BorderPane.alignment="CENTER">
<Button mnemonicParsing="false" onMousePressed="#StartVotingProcess" prefHeight="50.0" prefWidth="170.0" text="Start Here" BorderPane.alignment="CENTER">
<font>
<Font size="24.0" />
</font>

View File

@ -2,6 +2,7 @@ package main;
import javafx.scene.Scene;
import javafx.stage.Stage;
import main.straight_channel_section.StraightChannelSectionLoader;
import main.welcome_splash.WelcomeSplashLoader;
import java.io.IOException;
@ -20,8 +21,13 @@ public class ChainBuilder {
WelcomeSplashLoader welcomeSplashLoader = new WelcomeSplashLoader(primaryStage);
TwoWayNode welcomeSplashController = welcomeSplashLoader.GetWelcomeSplash();
StraightChannelSectionLoader straightChannelSectionLoader = new StraightChannelSectionLoader(primaryStage);
TwoWayNode straightChannelSectionController = straightChannelSectionLoader.GetStraightChannelSection();
welcomeSplashController.SetNext(straightChannelSectionController);
straightChannelSectionController.SetPrevious(welcomeSplashController);
/**
* all other two way nodes initilaized
* all other two way nodes initialized
*/
primaryStage.setScene(new Scene(welcomeSplashController.GetNode()));

View File

@ -4,7 +4,6 @@ import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.stage.Stage;
import main.TwoWayNode;
import main.welcome_splash.WelcomeSplashController;
import java.io.IOException;
@ -20,10 +19,8 @@ public class StraightChannelSectionLoader {
public StraightChannelSectionLoader(Stage primaryStage) throws IOException
{
// Parent splashScreenOnBootRoot = FXMLLoader.load(getClass().getResource(SPLASH_SCREEN_ON_BOOT_FXML_PATH));
fxmlLoader = new FXMLLoader(getClass().getResource(STRAIGHT_CHANNEL_LOADER_FXML_PATH));
currentStage = primaryStage;
// currentStage.setScene(new Scene(splashScreenOnBootRoot));
}
/**
@ -36,7 +33,7 @@ public class StraightChannelSectionLoader {
StraightChannelSectionController controller = fxmlLoader.getController();
// set the controller to be functional TwoWayNode
controller.SetParent(welcomeSplash);
controller.SetParent(straightChannelSection);
controller.SetStage(currentStage);
return controller;

View File

@ -6,7 +6,7 @@
<?import java.lang.*?>
<?import javafx.scene.layout.*?>
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8">
<GridPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="main.straight_channel_section.StraightChannelSectionController">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
@ -116,40 +116,40 @@
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<BorderPane prefHeight="200.0" prefWidth="200.0">
<BorderPane prefHeight="67.0" prefWidth="46.0">
<center>
<TextArea prefHeight="200.0" prefWidth="200.0" text="2" BorderPane.alignment="CENTER">
<TextField 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>
</TextArea>
</TextField>
</center>
</BorderPane>
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
<center>
<TextArea prefHeight="200.0" prefWidth="200.0" text="4" BorderPane.alignment="CENTER">
<TextField 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>
</TextArea>
</TextField>
</center>
</BorderPane>
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2">
<center>
<TextArea prefHeight="200.0" prefWidth="200.0" text="8" BorderPane.alignment="CENTER">
<TextField 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>
</TextArea>
</TextField>
</center>
</BorderPane>
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="3">
<BorderPane prefHeight="55.0" prefWidth="70.0" GridPane.columnIndex="3">
<center>
<TextArea prefHeight="200.0" prefWidth="200.0" text="5" BorderPane.alignment="CENTER">
<TextField 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>
</TextArea>
</TextField>
</center>
</BorderPane>
</children>

View File

@ -1,7 +1,8 @@
package main.welcome_splash;
import javafx.scene.Parent;
import javafx.stage.Stage;
import javafx.fxml.FXML;
import javafx.scene.Scene;
import javafx.scene.input.MouseEvent;
import main.TwoWayNode;
/**
@ -9,4 +10,9 @@ import main.TwoWayNode;
* WelcomeSplashController handle the behavior of welcome splash class
*/
public class WelcomeSplashController extends TwoWayNode {
@FXML
private void StartVotingProcess(MouseEvent mousePressed) {
this.currentStage.setScene(new Scene(this.next));
}
}

View File

@ -21,10 +21,8 @@ public class WelcomeSplashLoader {
public WelcomeSplashLoader(Stage primaryStage) throws IOException
{
// Parent splashScreenOnBootRoot = FXMLLoader.load(getClass().getResource(SPLASH_SCREEN_ON_BOOT_FXML_PATH));
fxmlLoader = new FXMLLoader(getClass().getResource(WELCOME_SPLASH_FXML_PATH));
currentStage = primaryStage;
// currentStage.setScene(new Scene(splashScreenOnBootRoot));
}
/**

View File

@ -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:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8" fx:controller="main.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="main.welcome_splash.WelcomeSplashController">
<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" prefHeight="50.0" prefWidth="170.0" text="Start Here" BorderPane.alignment="CENTER">
<Button mnemonicParsing="false" onMousePressed="#StartVotingProcess" prefHeight="50.0" prefWidth="170.0" text="Start Here" BorderPane.alignment="CENTER">
<font>
<Font size="24.0" />
</font>