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"?>
|
||||
|
||||
<!-- Created By Vladimir Eliezer Tokarev !-->
|
||||
|
||||
<?import java.lang.*?>
|
||||
<?import javafx.scene.image.*?>
|
||||
<?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"?>
|
||||
|
||||
<!-- Created By Vladimir Eliezer Tokarev !-->
|
||||
|
||||
<?import javafx.scene.text.*?>
|
||||
<?import javafx.scene.image.*?>
|
||||
<?import javafx.geometry.*?>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- Created By Vladimir Eliezer Tokarev !-->
|
||||
|
||||
<?import javafx.scene.image.*?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
package splash_screen_on_boot.java;
|
||||
|
||||
import javafx.concurrent.Task;
|
||||
import javafx.concurrent.WorkerStateEvent;
|
||||
import javafx.event.EventHandler;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.stage.Stage;
|
||||
import uploading_to_bulletin_board.java.UploadingToBulletinBoardController;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -14,15 +13,19 @@ import java.io.IOException;
|
|||
* SplashScreenOnBootController starts the entry point into meerkat it displays the loading
|
||||
*/
|
||||
public class SplashScreenOnBootController {
|
||||
|
||||
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;
|
||||
|
||||
protected Parent SplashScreenOnBootRoot;
|
||||
/** The primary stage which displays data, should pass it to next controller **/
|
||||
private Stage currentStage;
|
||||
|
||||
|
||||
public SplashScreenOnBootController(Stage primaryStage) throws IOException
|
||||
{
|
||||
SplashScreenOnBootRoot = FXMLLoader.load(getClass().getResource(SPALSH_SCREEN_ON_BOOT_FXML_PATH));
|
||||
primaryStage.setScene(new Scene(SplashScreenOnBootRoot, 565, 365));
|
||||
Parent splashScreenOnBootRoot = FXMLLoader.load(getClass().getResource(SPALSH_SCREEN_ON_BOOT_FXML_PATH));
|
||||
currentStage = primaryStage;
|
||||
currentStage.setScene(new Scene(splashScreenOnBootRoot, 565, 365));
|
||||
IntroSleep();
|
||||
}
|
||||
|
||||
|
@ -35,28 +38,29 @@ public class SplashScreenOnBootController {
|
|||
Task<Void> sleeper = new Task<Void>() {
|
||||
@Override
|
||||
protected Void call() throws Exception {
|
||||
try {
|
||||
Thread.sleep(TWO_SECONDS_TIMEOUT_IN_MILLISECONDS);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
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();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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(){}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- Created By Vladimir Eliezer Tokarev !-->
|
||||
|
||||
<?import javafx.scene.text.*?>
|
||||
<?import javafx.scene.image.*?>
|
||||
<?import javafx.geometry.*?>
|
||||
|
@ -132,7 +134,7 @@
|
|||
<top>
|
||||
<ImageView fx:id="LoadingGif" BorderPane.alignment="CENTER">
|
||||
<image>
|
||||
<Image url="@../gifs/VerticalLoading.gif" />
|
||||
<Image url="@../../gifs/VerticalLoading.gif" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</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