meerkat-java/voting-station-gui/src/polling_station_dashboard/search/SearchHandler.java

39 lines
1.0 KiB
Java
Raw Normal View History

package polling_station_dashboard.search;
import javafx.event.Event;
import javafx.event.EventHandler;
import javafx.stage.Stage;
import polling_station_dashboard.search.VotersFetcher.VotersFetcher;
import polling_station_dashboard.search.addVoter.java.AddVoterLoader;
import java.io.IOException;
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.
*/
public class SearchHandler implements EventHandler, VotersFetcher {
private Stage currentStage;
public SearchHandler(Stage primaryStage){
this.currentStage = primaryStage;
}
@Override
public void handle(Event event) {
try {
AddVoterLoader addVoterLoader = new AddVoterLoader(currentStage);
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
public Object FetchVoters(List<String> filters) {
return null;
}
}