diff --git a/voting-station-gui/src/pictures/[Originals]/bullets.png b/voting-station-gui/src/pictures/[Originals]/bullets.png new file mode 100644 index 0000000..b4e8384 Binary files /dev/null and b/voting-station-gui/src/pictures/[Originals]/bullets.png differ diff --git a/voting-station-gui/src/pictures/[Originals]/exit.png b/voting-station-gui/src/pictures/[Originals]/exit.png new file mode 100644 index 0000000..557b3e2 Binary files /dev/null and b/voting-station-gui/src/pictures/[Originals]/exit.png differ diff --git a/voting-station-gui/src/pictures/[Originals]/settings.png b/voting-station-gui/src/pictures/[Originals]/settings.png new file mode 100644 index 0000000..d3d54e2 Binary files /dev/null and b/voting-station-gui/src/pictures/[Originals]/settings.png differ diff --git a/voting-station-gui/src/pictures/[Originals]/women.png b/voting-station-gui/src/pictures/[Originals]/women.png new file mode 100644 index 0000000..760fad6 Binary files /dev/null and b/voting-station-gui/src/pictures/[Originals]/women.png differ diff --git a/voting-station-gui/src/pictures/bullets.png b/voting-station-gui/src/pictures/bullets.png new file mode 100644 index 0000000..96443a0 Binary files /dev/null and b/voting-station-gui/src/pictures/bullets.png differ diff --git a/voting-station-gui/src/pictures/exit.png b/voting-station-gui/src/pictures/exit.png new file mode 100644 index 0000000..ca9675a Binary files /dev/null and b/voting-station-gui/src/pictures/exit.png differ diff --git a/voting-station-gui/src/pictures/settings.png b/voting-station-gui/src/pictures/settings.png new file mode 100644 index 0000000..e6e5a26 Binary files /dev/null and b/voting-station-gui/src/pictures/settings.png differ diff --git a/voting-station-gui/src/pictures/women.png b/voting-station-gui/src/pictures/women.png new file mode 100644 index 0000000..55fa39e Binary files /dev/null and b/voting-station-gui/src/pictures/women.png differ 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 index 12d403a..1ceabb0 100644 --- a/voting-station-gui/src/polling_station_dashboard/StatusLog/java/StatusLogLoader.java +++ b/voting-station-gui/src/polling_station_dashboard/StatusLog/java/StatusLogLoader.java @@ -12,7 +12,7 @@ import java.io.IOException; */ public class StatusLogLoader { - private static final String POLLING_STATION_DASHBOARD_FXML_PATH = "../fxml/status_log.fxml"; + private static final String POLLING_STATION_DASHBOARD_FXML_PATH = "../fxml/settings.fxml"; private Stage currentStage; private FXMLLoader fxmlLoader; 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 e44cfbc..234ea19 100644 --- a/voting-station-gui/src/polling_station_dashboard/java/PollingStationDashboardController.java +++ b/voting-station-gui/src/polling_station_dashboard/java/PollingStationDashboardController.java @@ -6,12 +6,13 @@ import javafx.scene.layout.GridPane; import javafx.scene.layout.Pane; import javafx.stage.Stage; import polling_station_dashboard.StatusLog.java.StatusLogUpdate; +import polling_station_dashboard.settings.java.SettingsUpdate; /** * Created by Vladimir Eliezer Tokarev on 28/05/2016. * PollingStationDashboardController controls the behavior of the polling station dashboard */ -public class PollingStationDashboardController implements StatusLogUpdate { +public class PollingStationDashboardController implements StatusLogUpdate, SettingsUpdate { private Stage currentStage; private GridPane statusLog; @@ -40,6 +41,12 @@ public class PollingStationDashboardController implements StatusLogUpdate { statusLogOpened = !statusLogOpened; } + @Override + public void UpdateSettings() { + + } + + private void showStatusLogButton(boolean showOrNot){ Button statusLogButton = (Button) currentStage.getScene().lookup("#StatusLogButton"); statusLogButton.setVisible(showOrNot); @@ -61,7 +68,6 @@ public class PollingStationDashboardController implements StatusLogUpdate { statusLogPane.setPrefWidth(expansionWidth); } - @FXML private void OnStatusLogPressed() { UpdateStatusLog(); diff --git a/voting-station-gui/src/polling_station_dashboard/settings/fxml/settings.fxml b/voting-station-gui/src/polling_station_dashboard/settings/fxml/settings.fxml new file mode 100644 index 0000000..4ca13cc --- /dev/null +++ b/voting-station-gui/src/polling_station_dashboard/settings/fxml/settings.fxml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/voting-station-gui/src/polling_station_dashboard/settings/java/SettingsUpdate.java b/voting-station-gui/src/polling_station_dashboard/settings/java/SettingsUpdate.java new file mode 100644 index 0000000..33caeb0 --- /dev/null +++ b/voting-station-gui/src/polling_station_dashboard/settings/java/SettingsUpdate.java @@ -0,0 +1,11 @@ +package polling_station_dashboard.settings.java; + +/** + * Created by Vladimir Eliezer Tokarev on 04/06/2016. + * SettingsUpdate gives the ability to update the settings object + * decouple settings from polling station dashboard + */ +public interface SettingsUpdate { + + void UpdateSettings(); +} diff --git a/voting-station-gui/src/polling_station_dashboard/settings/java/settingsController.java b/voting-station-gui/src/polling_station_dashboard/settings/java/settingsController.java new file mode 100644 index 0000000..0bdb122 --- /dev/null +++ b/voting-station-gui/src/polling_station_dashboard/settings/java/settingsController.java @@ -0,0 +1,22 @@ +package polling_station_dashboard.settings.java; + +import javafx.stage.Stage; + +/** + * Created by Vladimir Eliezer Tokarev on 04/06/2016. + * manages the button pressing of the settings + */ +public class settingsController { + + private Stage currentStage; + private SettingsUpdate settingsUpdater; + + public void SetStage(Stage stage){ + this.currentStage = stage; + } + + public void SetSettingsUpdate(SettingsUpdate updater){ + this.settingsUpdater = updater; + } + +} diff --git a/voting-station-gui/src/polling_station_dashboard/settings/java/settingsLoader.java b/voting-station-gui/src/polling_station_dashboard/settings/java/settingsLoader.java new file mode 100644 index 0000000..31e6557 --- /dev/null +++ b/voting-station-gui/src/polling_station_dashboard/settings/java/settingsLoader.java @@ -0,0 +1,38 @@ +package polling_station_dashboard.settings.java; + +import javafx.fxml.FXMLLoader; +import javafx.scene.layout.GridPane; +import javafx.stage.Stage; +import polling_station_dashboard.StatusLog.java.StatusLogController; +import polling_station_dashboard.StatusLog.java.StatusLogUpdate; + +import java.io.IOException; + +/** + * Created by Vladimir Eliezer Tokarev on 04/06/2016. + * Loads the settings fxml file + */ +public class settingsLoader { + + private static final String POLLING_STATION_DASHBOARD_FXML_PATH = "../fxml/settings.fxml"; + + private Stage currentStage; + private FXMLLoader fxmlLoader; + private SettingsUpdate settingsUpdater; + + public settingsLoader(Stage primaryStage, SettingsUpdate updater) throws IOException + { + currentStage = primaryStage; + settingsUpdater = updater; + fxmlLoader = new FXMLLoader(getClass().getResource(POLLING_STATION_DASHBOARD_FXML_PATH)); + } + + public GridPane GetSettingsInstance() throws IOException { + GridPane settings = fxmlLoader.load(); + settingsController controller = fxmlLoader.getController(); + controller.SetStage(currentStage); + controller.SetSettingsUpdate(settingsUpdater); + + return settings; + } +}