From 3766478ffac8d460e218be316bb8da5ca3f2bf0a Mon Sep 17 00:00:00 2001 From: Vladimir ELazar Tokarev Date: Sun, 12 Jun 2016 16:15:50 +0300 Subject: [PATCH] Created the search part of the PSD The search have two big functionalities first one is fetch the users based on given list of filters and the second one is open add/eddit panel based on what the fetching of the users have returned. --- .../search/SearchHandler.java | 20 +++++++++++++++++++ .../search/VotersFetcher/VotersFetcher.java | 12 +++++++++++ .../votersEdit}/fxml/voter_edit.fxml | 0 .../votersEdit}/java/VoterEditController.java | 2 +- .../votersEdit}/java/VoterEditLoader.java | 2 +- 5 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 voting-station-gui/src/polling_station_dashboard/search/SearchHandler.java create mode 100644 voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/VotersFetcher.java rename voting-station-gui/src/polling_station_dashboard/{voterEdit => search/votersEdit}/fxml/voter_edit.fxml (100%) rename voting-station-gui/src/polling_station_dashboard/{voterEdit => search/votersEdit}/java/VoterEditController.java (63%) rename voting-station-gui/src/polling_station_dashboard/{voterEdit => search/votersEdit}/java/VoterEditLoader.java (62%) diff --git a/voting-station-gui/src/polling_station_dashboard/search/SearchHandler.java b/voting-station-gui/src/polling_station_dashboard/search/SearchHandler.java new file mode 100644 index 0000000..8abf1b9 --- /dev/null +++ b/voting-station-gui/src/polling_station_dashboard/search/SearchHandler.java @@ -0,0 +1,20 @@ +package polling_station_dashboard.search; + +import javafx.event.Event; +import javafx.event.EventHandler; + +/** + * 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. + */ +public class SearchHandler implements EventHandler { + + + + + @Override + public void handle(Event event) { + + } +} 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 new file mode 100644 index 0000000..74e9e83 --- /dev/null +++ b/voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/VotersFetcher.java @@ -0,0 +1,12 @@ +package polling_station_dashboard.search.VotersFetcher; + +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 + */ +public interface VotersFetcher { + + Object FectchVoters(List filters); +} diff --git a/voting-station-gui/src/polling_station_dashboard/voterEdit/fxml/voter_edit.fxml b/voting-station-gui/src/polling_station_dashboard/search/votersEdit/fxml/voter_edit.fxml similarity index 100% rename from voting-station-gui/src/polling_station_dashboard/voterEdit/fxml/voter_edit.fxml rename to voting-station-gui/src/polling_station_dashboard/search/votersEdit/fxml/voter_edit.fxml diff --git a/voting-station-gui/src/polling_station_dashboard/voterEdit/java/VoterEditController.java b/voting-station-gui/src/polling_station_dashboard/search/votersEdit/java/VoterEditController.java similarity index 63% rename from voting-station-gui/src/polling_station_dashboard/voterEdit/java/VoterEditController.java rename to voting-station-gui/src/polling_station_dashboard/search/votersEdit/java/VoterEditController.java index 0d60d95..0c0c1bf 100644 --- a/voting-station-gui/src/polling_station_dashboard/voterEdit/java/VoterEditController.java +++ b/voting-station-gui/src/polling_station_dashboard/search/votersEdit/java/VoterEditController.java @@ -1,4 +1,4 @@ -package polling_station_dashboard.voterEdit.java; +package polling_station_dashboard.search.votersEdit.java; /** * Created by Vladimir Eliezer Tokarev on 11/06/2016. diff --git a/voting-station-gui/src/polling_station_dashboard/voterEdit/java/VoterEditLoader.java b/voting-station-gui/src/polling_station_dashboard/search/votersEdit/java/VoterEditLoader.java similarity index 62% rename from voting-station-gui/src/polling_station_dashboard/voterEdit/java/VoterEditLoader.java rename to voting-station-gui/src/polling_station_dashboard/search/votersEdit/java/VoterEditLoader.java index 7a82968..c7ce4b0 100644 --- a/voting-station-gui/src/polling_station_dashboard/voterEdit/java/VoterEditLoader.java +++ b/voting-station-gui/src/polling_station_dashboard/search/votersEdit/java/VoterEditLoader.java @@ -1,4 +1,4 @@ -package polling_station_dashboard.voterEdit.java; +package polling_station_dashboard.search.votersEdit.java; /** * Created by Vladimir Eliezer Tokarev on 11/06/2016.