From b0c4fff11af9e757d85ddf72ed784232580bebce Mon Sep 17 00:00:00 2001 From: Vladimir ELazar Tokarev Date: Sat, 4 Jun 2016 13:01:06 +0300 Subject: [PATCH] Created Status Log Status log is inchage of representing the progress other people voting process. --- .../StatusLog/fxml/status_log.fxml | 65 +++++++++++++++++++ .../StatusLog/java/StatusLogController.java | 18 +++++ .../StatusLog/java/StatusLogLoader.java | 33 ++++++++++ .../fxml/polling_station_dashboard.fxml | 4 +- .../PollingStationDashboardController.java | 26 ++++++++ .../java/PollingStationDashboardLoader.java | 4 +- 6 files changed, 145 insertions(+), 5 deletions(-) create mode 100644 voting-station-gui/src/polling_station_dashboard/StatusLog/fxml/status_log.fxml create mode 100644 voting-station-gui/src/polling_station_dashboard/StatusLog/java/StatusLogController.java create mode 100644 voting-station-gui/src/polling_station_dashboard/StatusLog/java/StatusLogLoader.java diff --git a/voting-station-gui/src/polling_station_dashboard/StatusLog/fxml/status_log.fxml b/voting-station-gui/src/polling_station_dashboard/StatusLog/fxml/status_log.fxml new file mode 100644 index 0000000..4992518 --- /dev/null +++ b/voting-station-gui/src/polling_station_dashboard/StatusLog/fxml/status_log.fxml @@ -0,0 +1,65 @@ + + + + + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
diff --git a/voting-station-gui/src/polling_station_dashboard/StatusLog/java/StatusLogController.java b/voting-station-gui/src/polling_station_dashboard/StatusLog/java/StatusLogController.java new file mode 100644 index 0000000..f62cd82 --- /dev/null +++ b/voting-station-gui/src/polling_station_dashboard/StatusLog/java/StatusLogController.java @@ -0,0 +1,18 @@ +package polling_station_dashboard.StatusLog.java; + +import javafx.stage.Stage; + +/** + * Created by Vladimir Eliezer Tokarev on 04/06/2016. + * This class represent status of other users progress in the voting process + */ +public class StatusLogController { + + private Stage primaryStage; + + + public void SetStage(Stage stage){ + primaryStage = stage; + } + +} diff --git a/voting-station-gui/src/polling_station_dashboard/StatusLog/java/StatusLogLoader.java b/voting-station-gui/src/polling_station_dashboard/StatusLog/java/StatusLogLoader.java new file mode 100644 index 0000000..d8ffa31 --- /dev/null +++ b/voting-station-gui/src/polling_station_dashboard/StatusLog/java/StatusLogLoader.java @@ -0,0 +1,33 @@ +package polling_station_dashboard.StatusLog.java; + +import javafx.fxml.FXMLLoader; +import javafx.scene.layout.GridPane; +import javafx.stage.Stage; + +import java.io.IOException; + +/** + * Created by Vladimir Eliezer Tokarev on 04/06/2016. + * Loads the status log object + */ +public class StatusLogLoader { + + private static final String POLLING_STATION_DASHBOARD_FXML_PATH = "../fxml/status_log.fxml"; + + private Stage currentStage; + private FXMLLoader fxmlLoader; + + public StatusLogLoader (Stage primaryStage) throws IOException + { + currentStage = primaryStage; + fxmlLoader = new FXMLLoader(getClass().getResource(POLLING_STATION_DASHBOARD_FXML_PATH)); + } + + private GridPane GetStatusLogInstance() throws IOException { + GridPane StatusLog = (GridPane) fxmlLoader.load(); + StatusLogController controller = fxmlLoader.getController(); + controller.SetStage(currentStage); + + return StatusLog; + } +} diff --git a/voting-station-gui/src/polling_station_dashboard/fxml/polling_station_dashboard.fxml b/voting-station-gui/src/polling_station_dashboard/fxml/polling_station_dashboard.fxml index a8d60d0..a83d831 100644 --- a/voting-station-gui/src/polling_station_dashboard/fxml/polling_station_dashboard.fxml +++ b/voting-station-gui/src/polling_station_dashboard/fxml/polling_station_dashboard.fxml @@ -67,9 +67,9 @@ - + -