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 @@
-
+
-
+
diff --git a/voting-station-gui/src/polling_station_dashboard/java/PollingStationDashboardController.java b/voting-station-gui/src/polling_station_dashboard/java/PollingStationDashboardController.java
index 967ac3e..263498c 100644
--- a/voting-station-gui/src/polling_station_dashboard/java/PollingStationDashboardController.java
+++ b/voting-station-gui/src/polling_station_dashboard/java/PollingStationDashboardController.java
@@ -1,5 +1,7 @@
package polling_station_dashboard.java;
+import javafx.fxml.FXML;
+import javafx.scene.layout.Pane;
import javafx.stage.Stage;
/**
@@ -9,8 +11,32 @@ public class PollingStationDashboardController {
private Stage currentStage;
+ private boolean statusLogOpened = false;
+
public void SetStage(Stage primaryStage)
{
this.currentStage = primaryStage;
}
+
+ private void setStatusLog(){
+ if (!statusLogOpened) {
+ SetStatusLogSize(400);
+ }
+ else {
+ SetStatusLogSize(-400);
+ }
+ statusLogOpened = !statusLogOpened;
+ }
+
+ private void SetStatusLogSize(int expansionWidth) {
+ currentStage.setWidth(currentStage.getWidth() + expansionWidth);
+ Pane statusLogGrid = (Pane) currentStage.getScene().lookup("#StatusLog");
+ statusLogGrid.setPrefWidth(expansionWidth);
+ }
+
+
+ @FXML
+ private void OnStatusLogPressed() {
+ setStatusLog();
+ }
}
diff --git a/voting-station-gui/src/polling_station_dashboard/java/PollingStationDashboardLoader.java b/voting-station-gui/src/polling_station_dashboard/java/PollingStationDashboardLoader.java
index f1b0a1a..39a50d3 100644
--- a/voting-station-gui/src/polling_station_dashboard/java/PollingStationDashboardLoader.java
+++ b/voting-station-gui/src/polling_station_dashboard/java/PollingStationDashboardLoader.java
@@ -13,7 +13,7 @@ import java.io.IOException;
*/
public class PollingStationDashboardLoader {
- private static final String POLLING_STATION_DASHBOARD_FXML_PATH = "../fxml/polling_station_dashboard.fxml";
+ private static final String POLLING_STATION_DASHBOARD_FXML_PATH = "../fxml/status_log.fxml";
private Stage currentStage;
@@ -28,8 +28,6 @@ public class PollingStationDashboardLoader {
currentStage.setScene(new Scene(root, 850, 615));
currentStage.show();
-
- System.out.println("heyeyeye");
controller.SetStage(currentStage);
}
}