Added the uploading bulletin board controller
after the slash screen displayed we go to uploading bulletin board scenevoting-station-gui
parent
c97910644f
commit
c08fbdfa76
|
@ -1,5 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!-- Created By Vladimir Eliezer Tokarev !-->
|
||||||
|
|
||||||
<?import java.lang.*?>
|
<?import java.lang.*?>
|
||||||
<?import javafx.scene.image.*?>
|
<?import javafx.scene.image.*?>
|
||||||
<?import javafx.scene.control.*?>
|
<?import javafx.scene.control.*?>
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
package set_up_complete;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Vladimir Eliezer Tokarev on 28/05/2016.
|
||||||
|
*/
|
||||||
|
public class SetUpCompleteController {
|
||||||
|
|
||||||
|
}
|
|
@ -1,5 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!-- Created By Vladimir Eliezer Tokarev !-->
|
||||||
|
|
||||||
<?import javafx.scene.text.*?>
|
<?import javafx.scene.text.*?>
|
||||||
<?import javafx.scene.image.*?>
|
<?import javafx.scene.image.*?>
|
||||||
<?import javafx.geometry.*?>
|
<?import javafx.geometry.*?>
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!-- Created By Vladimir Eliezer Tokarev !-->
|
||||||
|
|
||||||
<?import javafx.scene.image.*?>
|
<?import javafx.scene.image.*?>
|
||||||
<?import javafx.geometry.*?>
|
<?import javafx.geometry.*?>
|
||||||
<?import javafx.scene.control.*?>
|
<?import javafx.scene.control.*?>
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
package splash_screen_on_boot.java;
|
package splash_screen_on_boot.java;
|
||||||
|
|
||||||
import javafx.concurrent.Task;
|
import javafx.concurrent.Task;
|
||||||
import javafx.concurrent.WorkerStateEvent;
|
|
||||||
import javafx.event.EventHandler;
|
|
||||||
import javafx.fxml.FXMLLoader;
|
import javafx.fxml.FXMLLoader;
|
||||||
import javafx.scene.Parent;
|
import javafx.scene.Parent;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
|
import uploading_to_bulletin_board.java.UploadingToBulletinBoardController;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@ -14,15 +13,19 @@ import java.io.IOException;
|
||||||
* SplashScreenOnBootController starts the entry point into meerkat it displays the loading
|
* SplashScreenOnBootController starts the entry point into meerkat it displays the loading
|
||||||
*/
|
*/
|
||||||
public class SplashScreenOnBootController {
|
public class SplashScreenOnBootController {
|
||||||
|
|
||||||
private static final String SPALSH_SCREEN_ON_BOOT_FXML_PATH = "../fxml/spalsh_screen_on_boot.fxml";
|
private static final String SPALSH_SCREEN_ON_BOOT_FXML_PATH = "../fxml/spalsh_screen_on_boot.fxml";
|
||||||
private static final int TWO_SECONDS_TIMEOUT_IN_MILLISECONDS = 2000;
|
private static final int TWO_SECONDS_TIMEOUT_IN_MILLISECONDS = 2000;
|
||||||
|
|
||||||
protected Parent SplashScreenOnBootRoot;
|
/** The primary stage which displays data, should pass it to next controller **/
|
||||||
|
private Stage currentStage;
|
||||||
|
|
||||||
|
|
||||||
public SplashScreenOnBootController(Stage primaryStage) throws IOException
|
public SplashScreenOnBootController(Stage primaryStage) throws IOException
|
||||||
{
|
{
|
||||||
SplashScreenOnBootRoot = FXMLLoader.load(getClass().getResource(SPALSH_SCREEN_ON_BOOT_FXML_PATH));
|
Parent splashScreenOnBootRoot = FXMLLoader.load(getClass().getResource(SPALSH_SCREEN_ON_BOOT_FXML_PATH));
|
||||||
primaryStage.setScene(new Scene(SplashScreenOnBootRoot, 565, 365));
|
currentStage = primaryStage;
|
||||||
|
currentStage.setScene(new Scene(splashScreenOnBootRoot, 565, 365));
|
||||||
IntroSleep();
|
IntroSleep();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,28 +38,29 @@ public class SplashScreenOnBootController {
|
||||||
Task<Void> sleeper = new Task<Void>() {
|
Task<Void> sleeper = new Task<Void>() {
|
||||||
@Override
|
@Override
|
||||||
protected Void call() throws Exception {
|
protected Void call() throws Exception {
|
||||||
try {
|
Thread.sleep(TWO_SECONDS_TIMEOUT_IN_MILLISECONDS);
|
||||||
Thread.sleep(TWO_SECONDS_TIMEOUT_IN_MILLISECONDS);
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
sleeper.setOnSucceeded(event -> StartUploadingToBulletinBoard());
|
sleeper.setOnSucceeded(event -> {
|
||||||
|
try {
|
||||||
|
StartUploadingToBulletinBoard();
|
||||||
|
} catch (IOException e) {
|
||||||
|
System.out.println("Could not create new uploading to bulletin board scene!");
|
||||||
|
}
|
||||||
|
});
|
||||||
new Thread(sleeper).start();
|
new Thread(sleeper).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates instance of uploading to bulletin board and set it as the scene
|
* Creates instance of uploading to bulletin board and set it as the scene
|
||||||
*/
|
*/
|
||||||
private void StartUploadingToBulletinBoard()
|
private void StartUploadingToBulletinBoard() throws IOException {
|
||||||
{
|
new UploadingToBulletinBoardController(currentStage);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Needed for normal output fllow
|
* Needed for normal output flow
|
||||||
*/
|
*/
|
||||||
public SplashScreenOnBootController(){}
|
public SplashScreenOnBootController(){}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!-- Created By Vladimir Eliezer Tokarev !-->
|
||||||
|
|
||||||
<?import javafx.scene.text.*?>
|
<?import javafx.scene.text.*?>
|
||||||
<?import javafx.scene.image.*?>
|
<?import javafx.scene.image.*?>
|
||||||
<?import javafx.geometry.*?>
|
<?import javafx.geometry.*?>
|
||||||
|
@ -132,7 +134,7 @@
|
||||||
<top>
|
<top>
|
||||||
<ImageView fx:id="LoadingGif" BorderPane.alignment="CENTER">
|
<ImageView fx:id="LoadingGif" BorderPane.alignment="CENTER">
|
||||||
<image>
|
<image>
|
||||||
<Image url="@../gifs/VerticalLoading.gif" />
|
<Image url="@../../gifs/VerticalLoading.gif" />
|
||||||
</image>
|
</image>
|
||||||
</ImageView>
|
</ImageView>
|
||||||
</top>
|
</top>
|
|
@ -0,0 +1,36 @@
|
||||||
|
package uploading_to_bulletin_board.java;
|
||||||
|
|
||||||
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.fxml.FXMLLoader;
|
||||||
|
import javafx.scene.Parent;
|
||||||
|
import javafx.scene.Scene;
|
||||||
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Vladimir Eliezer Tokarev on 28/05/2016.
|
||||||
|
*/
|
||||||
|
public class UploadingToBulletinBoardController {
|
||||||
|
private static final String UPLOADING_TO_BULLETIN_BOARD_FXM_PATH = "../fxml/uploading_to_bulletin_board.fxml";
|
||||||
|
|
||||||
|
protected Parent UploadToBulletinBoardRoot;
|
||||||
|
|
||||||
|
public UploadingToBulletinBoardController(Stage primaryStage) throws IOException
|
||||||
|
{
|
||||||
|
UploadToBulletinBoardRoot = FXMLLoader.load(getClass().getResource(UPLOADING_TO_BULLETIN_BOARD_FXM_PATH));
|
||||||
|
primaryStage.setScene(new Scene(UploadToBulletinBoardRoot, 565, 365));
|
||||||
|
primaryStage.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method called when the override button had been clicked/pressed
|
||||||
|
*/
|
||||||
|
@FXML
|
||||||
|
private void Override()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue