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)
voting-station-gui
Vladimir ELazar Tokarev 2016-06-18 17:52:29 +03:00
parent d2c9893ccf
commit b8001163b7
8 changed files with 203 additions and 10 deletions

View File

@ -2,8 +2,7 @@ package polling_station_dashboard.java;
import javafx.stage.Stage; import javafx.stage.Stage;
import polling_station_dashboard.search.SearchHandler; import polling_station_dashboard.search.SearchHandler;
import polling_station_dashboard.search.VotersFetcher.DummyVotersFetcher; import polling_station_dashboard.search.votersFetcher.DummyVotersFetcher;
import polling_station_dashboard.search.addVoter.java.AddVoterLoader;
import polling_station_dashboard.settings.java.SettingsVisualUpdater; import polling_station_dashboard.settings.java.SettingsVisualUpdater;
import polling_station_dashboard.settings.java.settingsLoader; import polling_station_dashboard.settings.java.settingsLoader;
import polling_station_dashboard.statusLog.java.StatusLogLoader; import polling_station_dashboard.statusLog.java.StatusLogLoader;

View File

@ -2,10 +2,9 @@ package polling_station_dashboard.search;
import javafx.event.Event; import javafx.event.Event;
import javafx.event.EventHandler; import javafx.event.EventHandler;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Pane; import javafx.scene.layout.Pane;
import javafx.stage.Stage; 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 polling_station_dashboard.search.addVoter.java.AddVoterLoader;
import javafx.scene.control.Button; import javafx.scene.control.Button;
@ -16,8 +15,8 @@ import java.util.List;
/** /**
* Created by Vladimir Eliezer Tokarev on 12/06/2016. * Created by Vladimir Eliezer Tokarev on 12/06/2016.
* SearchHandler trying to fetch wanted users by given strings (VotersFetcher) and then * SearchHandler trying to fetch wanted users by given strings (votersFetcher) and then
* Starts the eddit/add panel based on what the VotersFetcher Have fetched. * Starts the eddit/add panel based on what the votersFetcher Have fetched.
*/ */
public class SearchHandler implements EventHandler { public class SearchHandler implements EventHandler {

View File

@ -1,4 +1,4 @@
package polling_station_dashboard.search.VotersFetcher; package polling_station_dashboard.search.votersFetcher;
import java.util.*; import java.util.*;

View File

@ -1,11 +1,11 @@
package polling_station_dashboard.search.VotersFetcher; package polling_station_dashboard.search.votersFetcher;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
/** /**
* Created by Vladimir Eliezer Tokarev on 12/06/2016. * 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 { public interface VotersFetcher {

View File

@ -13,7 +13,7 @@ import java.io.IOException;
*/ */
public class AddVoterLoader { 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; private Stage currentStage;

View File

@ -0,0 +1,181 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.image.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.text.*?>
<?import javafx.scene.control.*?>
<?import java.lang.*?>
<?import javafx.scene.layout.*?>
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="250.0" prefWidth="753.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="polling_station_dashboard.search.addVoter.java.AddVoterController">
<columnConstraints>
<ColumnConstraints />
<ColumnConstraints />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="251.0" minWidth="10.0" prefWidth="118.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="467.0" minWidth="10.0" prefWidth="194.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="470.0" minWidth="10.0" prefWidth="458.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints />
<RowConstraints />
<RowConstraints />
<RowConstraints />
<RowConstraints />
<RowConstraints maxHeight="195.0" minHeight="10.0" prefHeight="178.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="119.0" minHeight="10.0" prefHeight="72.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<GridPane GridPane.columnIndex="3" GridPane.rowIndex="5">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="58.0" minHeight="10.0" prefHeight="41.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="85.0" minHeight="10.0" prefHeight="84.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<GridPane>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="16.0" minHeight="9.0" prefHeight="12.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="28.0" minHeight="10.0" prefHeight="25.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="9.0" minHeight="4.0" prefHeight="4.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label prefHeight="29.0" prefWidth="188.0" text="Name" GridPane.rowIndex="1" />
</children>
</GridPane>
<GridPane GridPane.rowIndex="1">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="92.0" minWidth="10.0" prefWidth="84.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="110.0" minWidth="10.0" prefWidth="110.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<BorderPane prefHeight="200.0" prefWidth="200.0">
<bottom>
<Label prefHeight="17.0" prefWidth="77.0" text="ID number" BorderPane.alignment="CENTER" />
</bottom>
</BorderPane>
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1">
<center>
<Label text="Eligible to vote" BorderPane.alignment="CENTER" />
</center>
</BorderPane>
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="2">
<center>
<Label text="Status" BorderPane.alignment="CENTER">
<padding>
<Insets right="45.0" />
</padding>
</Label>
</center>
</BorderPane>
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="3">
<center>
<Label text="Channel" BorderPane.alignment="CENTER">
<padding>
<Insets right="35.0" />
</padding>
</Label>
</center>
</BorderPane>
<Label prefHeight="29.0" prefWidth="107.0" text="234234234" GridPane.columnIndex="1" />
<Label prefHeight="23.0" prefWidth="107.0" text="YES" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Label prefHeight="38.0" prefWidth="107.0" text="Has Not Voted" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<Label prefHeight="60.0" prefWidth="107.0" text="IDC Maths" GridPane.columnIndex="1" GridPane.rowIndex="3" />
</children>
</GridPane>
</children>
</GridPane>
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="5">
<center>
<ImageView BorderPane.alignment="CENTER">
<image>
<Image url="@../../../../pictures/profile.png" />
</image>
</ImageView>
</center>
</BorderPane>
<GridPane GridPane.columnIndex="4" GridPane.rowIndex="5">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="70.0" minHeight="10.0" prefHeight="48.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="130.0" minHeight="10.0" prefHeight="125.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<GridPane>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="342.0" minWidth="10.0" prefWidth="304.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="226.0" minWidth="10.0" prefWidth="158.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<GridPane GridPane.columnIndex="1">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<BorderPane prefHeight="200.0" prefWidth="200.0">
<center>
<Button mnemonicParsing="false" onMousePressed="#RemoveAddVoterPanel" text="Cancel" BorderPane.alignment="CENTER" />
</center>
</BorderPane>
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
<left>
<Button mnemonicParsing="false" prefHeight="25.0" prefWidth="52.0" text="Save" BorderPane.alignment="CENTER" />
</left>
</BorderPane>
</children>
</GridPane>
</children>
</GridPane>
</children>
</GridPane>
<GridPane GridPane.columnIndex="4" GridPane.rowIndex="6">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="323.0" minWidth="10.0" prefWidth="295.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="224.0" minWidth="10.0" prefWidth="167.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<GridPane GridPane.columnIndex="1">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="140.0" minWidth="10.0" prefWidth="138.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="67.0" minWidth="10.0" prefWidth="29.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints />
<RowConstraints />
</rowConstraints>
<children>
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1" />
<Button mnemonicParsing="false" prefHeight="25.0" prefWidth="140.0" text="Ready To Vote" />
</children>
</GridPane>
</children>
</GridPane>
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="6">
<top>
<Button mnemonicParsing="false" text="Lodge appeal" BorderPane.alignment="CENTER" />
</top>
</BorderPane>
</children>
</GridPane>

View File

@ -0,0 +1,7 @@
package polling_station_dashboard.search.submitVoter.java;
/**
* Created by Vladimir Eliezer Tokarev on 18/06/2016.
*/
public class SubmitVoterController {
}

View File

@ -0,0 +1,7 @@
package polling_station_dashboard.search.submitVoter.java;
/**
* Created by Vladimir Eliezer Tokarev on 18/06/2016.
*/
public class SubmitVoterLoader {
}