From b8001163b7ef77568a2413871ed61d5d14c837fc Mon Sep 17 00:00:00 2001 From: Vladimir ELazar Tokarev Date: Sat, 18 Jun 2016 17:52:29 +0300 Subject: [PATCH] Created the submit voter panel when voter found that can vote or cannot his representation sits in the submit voter panel in which we can revoke his right to vote and otherwise (give him the permision to vote) --- .../java/EventHandlerMapper.java | 3 +- .../search/SearchHandler.java | 7 +- .../VotersFetcher/DummyVotersFetcher.java | 2 +- .../search/VotersFetcher/VotersFetcher.java | 4 +- .../search/addVoter/java/AddVoterLoader.java | 2 +- .../search/submitVoter/fxml/submit_voter.fxml | 181 ++++++++++++++++++ .../java/SubmitVoterController.java | 7 + .../submitVoter/java/SubmitVoterLoader.java | 7 + 8 files changed, 203 insertions(+), 10 deletions(-) create mode 100644 voting-station-gui/src/polling_station_dashboard/search/submitVoter/fxml/submit_voter.fxml create mode 100644 voting-station-gui/src/polling_station_dashboard/search/submitVoter/java/SubmitVoterController.java create mode 100644 voting-station-gui/src/polling_station_dashboard/search/submitVoter/java/SubmitVoterLoader.java diff --git a/voting-station-gui/src/polling_station_dashboard/java/EventHandlerMapper.java b/voting-station-gui/src/polling_station_dashboard/java/EventHandlerMapper.java index bd2022c..12320ca 100644 --- a/voting-station-gui/src/polling_station_dashboard/java/EventHandlerMapper.java +++ b/voting-station-gui/src/polling_station_dashboard/java/EventHandlerMapper.java @@ -2,8 +2,7 @@ package polling_station_dashboard.java; import javafx.stage.Stage; import polling_station_dashboard.search.SearchHandler; -import polling_station_dashboard.search.VotersFetcher.DummyVotersFetcher; -import polling_station_dashboard.search.addVoter.java.AddVoterLoader; +import polling_station_dashboard.search.votersFetcher.DummyVotersFetcher; import polling_station_dashboard.settings.java.SettingsVisualUpdater; import polling_station_dashboard.settings.java.settingsLoader; import polling_station_dashboard.statusLog.java.StatusLogLoader; diff --git a/voting-station-gui/src/polling_station_dashboard/search/SearchHandler.java b/voting-station-gui/src/polling_station_dashboard/search/SearchHandler.java index 24c9515..77b75fd 100644 --- a/voting-station-gui/src/polling_station_dashboard/search/SearchHandler.java +++ b/voting-station-gui/src/polling_station_dashboard/search/SearchHandler.java @@ -2,10 +2,9 @@ package polling_station_dashboard.search; import javafx.event.Event; import javafx.event.EventHandler; -import javafx.scene.layout.GridPane; import javafx.scene.layout.Pane; import javafx.stage.Stage; -import polling_station_dashboard.search.VotersFetcher.VotersFetcher; +import polling_station_dashboard.search.votersFetcher.VotersFetcher; import polling_station_dashboard.search.addVoter.java.AddVoterLoader; import javafx.scene.control.Button; @@ -16,8 +15,8 @@ import java.util.List; /** * Created by Vladimir Eliezer Tokarev on 12/06/2016. - * SearchHandler trying to fetch wanted users by given strings (VotersFetcher) and then - * Starts the eddit/add panel based on what the VotersFetcher Have fetched. + * SearchHandler trying to fetch wanted users by given strings (votersFetcher) and then + * Starts the eddit/add panel based on what the votersFetcher Have fetched. */ public class SearchHandler implements EventHandler { diff --git a/voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/DummyVotersFetcher.java b/voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/DummyVotersFetcher.java index 39f9b94..7d226ab 100644 --- a/voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/DummyVotersFetcher.java +++ b/voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/DummyVotersFetcher.java @@ -1,4 +1,4 @@ -package polling_station_dashboard.search.VotersFetcher; +package polling_station_dashboard.search.votersFetcher; import java.util.*; diff --git a/voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/VotersFetcher.java b/voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/VotersFetcher.java index 18348d7..a79556b 100644 --- a/voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/VotersFetcher.java +++ b/voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/VotersFetcher.java @@ -1,11 +1,11 @@ -package polling_station_dashboard.search.VotersFetcher; +package polling_station_dashboard.search.votersFetcher; import java.util.HashMap; import java.util.List; /** * Created by Vladimir Eliezer Tokarev on 12/06/2016. - * VotersFetcher gives the ability of fetching voters based on given list of filters + * votersFetcher gives the ability of fetching voters based on given list of filters */ public interface VotersFetcher { diff --git a/voting-station-gui/src/polling_station_dashboard/search/addVoter/java/AddVoterLoader.java b/voting-station-gui/src/polling_station_dashboard/search/addVoter/java/AddVoterLoader.java index 73e106e..e5cc69f 100644 --- a/voting-station-gui/src/polling_station_dashboard/search/addVoter/java/AddVoterLoader.java +++ b/voting-station-gui/src/polling_station_dashboard/search/addVoter/java/AddVoterLoader.java @@ -13,7 +13,7 @@ import java.io.IOException; */ public class AddVoterLoader { - private static final String POLLING_STATION_DASHBOARD_FXML_PATH = "../fxml/add_voter.fxml"; + private static final String POLLING_STATION_DASHBOARD_FXML_PATH = "../fxml/submit_voter.fxml"; private Stage currentStage; diff --git a/voting-station-gui/src/polling_station_dashboard/search/submitVoter/fxml/submit_voter.fxml b/voting-station-gui/src/polling_station_dashboard/search/submitVoter/fxml/submit_voter.fxml new file mode 100644 index 0000000..35bb9f9 --- /dev/null +++ b/voting-station-gui/src/polling_station_dashboard/search/submitVoter/fxml/submit_voter.fxml @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+
+
+
+
+ +
+ + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +