diff --git a/classes/production/main/meerkat/voting/gui/ChainBuilder.class b/classes/production/main/meerkat/voting/gui/ChainBuilder.class new file mode 100644 index 0000000..a015431 Binary files /dev/null and b/classes/production/main/meerkat/voting/gui/ChainBuilder.class differ diff --git a/classes/production/main/meerkat/voting/gui/Main.class b/classes/production/main/meerkat/voting/gui/Main.class new file mode 100644 index 0000000..8ec96c5 Binary files /dev/null and b/classes/production/main/meerkat/voting/gui/Main.class differ diff --git a/classes/production/main/meerkat/voting/gui/TwoWayNode.class b/classes/production/main/meerkat/voting/gui/TwoWayNode.class new file mode 100644 index 0000000..09a6141 Binary files /dev/null and b/classes/production/main/meerkat/voting/gui/TwoWayNode.class differ diff --git a/classes/production/main/meerkat/voting/gui/VotingBoothConfiguration.class b/classes/production/main/meerkat/voting/gui/VotingBoothConfiguration.class new file mode 100644 index 0000000..cd1225a Binary files /dev/null and b/classes/production/main/meerkat/voting/gui/VotingBoothConfiguration.class differ diff --git a/classes/production/main/meerkat/voting/gui/VotingBoothGUIManager.class b/classes/production/main/meerkat/voting/gui/VotingBoothGUIManager.class new file mode 100644 index 0000000..bc40f55 Binary files /dev/null and b/classes/production/main/meerkat/voting/gui/VotingBoothGUIManager.class differ diff --git a/classes/production/main/meerkat/voting/gui/ballot_summary/BallotSummaryController.class b/classes/production/main/meerkat/voting/gui/ballot_summary/BallotSummaryController.class new file mode 100644 index 0000000..0f444ed Binary files /dev/null and b/classes/production/main/meerkat/voting/gui/ballot_summary/BallotSummaryController.class differ diff --git a/classes/production/main/meerkat/voting/gui/ballot_summary/BallotSummaryLoader.class b/classes/production/main/meerkat/voting/gui/ballot_summary/BallotSummaryLoader.class new file mode 100644 index 0000000..bbb13b7 Binary files /dev/null and b/classes/production/main/meerkat/voting/gui/ballot_summary/BallotSummaryLoader.class differ diff --git a/classes/production/main/meerkat/voting/gui/cast_or_audit/CastOrAuditController.class b/classes/production/main/meerkat/voting/gui/cast_or_audit/CastOrAuditController.class new file mode 100644 index 0000000..8ed0b6f Binary files /dev/null and b/classes/production/main/meerkat/voting/gui/cast_or_audit/CastOrAuditController.class differ diff --git a/classes/production/main/meerkat/voting/gui/cast_or_audit/CastOrAuditLoader.class b/classes/production/main/meerkat/voting/gui/cast_or_audit/CastOrAuditLoader.class new file mode 100644 index 0000000..54dded4 Binary files /dev/null and b/classes/production/main/meerkat/voting/gui/cast_or_audit/CastOrAuditLoader.class differ diff --git a/classes/production/main/meerkat/voting/gui/select_candidate_by_picture/SelectCandidateByPictureController.class b/classes/production/main/meerkat/voting/gui/select_candidate_by_picture/SelectCandidateByPictureController.class new file mode 100644 index 0000000..e0e8f3c Binary files /dev/null and b/classes/production/main/meerkat/voting/gui/select_candidate_by_picture/SelectCandidateByPictureController.class differ diff --git a/classes/production/main/meerkat/voting/gui/select_candidate_by_picture/SelectCandidateByPictureLoader.class b/classes/production/main/meerkat/voting/gui/select_candidate_by_picture/SelectCandidateByPictureLoader.class new file mode 100644 index 0000000..0f52de6 Binary files /dev/null and b/classes/production/main/meerkat/voting/gui/select_candidate_by_picture/SelectCandidateByPictureLoader.class differ diff --git a/classes/production/main/meerkat/voting/gui/select_candidate_name/SelectCandidateNameController.class b/classes/production/main/meerkat/voting/gui/select_candidate_name/SelectCandidateNameController.class new file mode 100644 index 0000000..184ad14 Binary files /dev/null and b/classes/production/main/meerkat/voting/gui/select_candidate_name/SelectCandidateNameController.class differ diff --git a/classes/production/main/meerkat/voting/gui/select_candidate_name/SelectCandidateNameLoader.class b/classes/production/main/meerkat/voting/gui/select_candidate_name/SelectCandidateNameLoader.class new file mode 100644 index 0000000..bc0c432 Binary files /dev/null and b/classes/production/main/meerkat/voting/gui/select_candidate_name/SelectCandidateNameLoader.class differ diff --git a/classes/production/main/meerkat/voting/gui/straight_channel_section/StraightChannelSectionController.class b/classes/production/main/meerkat/voting/gui/straight_channel_section/StraightChannelSectionController.class new file mode 100644 index 0000000..fdb1b7f Binary files /dev/null and b/classes/production/main/meerkat/voting/gui/straight_channel_section/StraightChannelSectionController.class differ diff --git a/classes/production/main/meerkat/voting/gui/straight_channel_section/StraightChannelSectionLoader.class b/classes/production/main/meerkat/voting/gui/straight_channel_section/StraightChannelSectionLoader.class new file mode 100644 index 0000000..b324be1 Binary files /dev/null and b/classes/production/main/meerkat/voting/gui/straight_channel_section/StraightChannelSectionLoader.class differ diff --git a/classes/production/main/meerkat/voting/gui/vote_have_been_cast/VoteHaveBeenCastController.class b/classes/production/main/meerkat/voting/gui/vote_have_been_cast/VoteHaveBeenCastController.class new file mode 100644 index 0000000..0051f99 Binary files /dev/null and b/classes/production/main/meerkat/voting/gui/vote_have_been_cast/VoteHaveBeenCastController.class differ diff --git a/classes/production/main/meerkat/voting/gui/vote_have_been_cast/VoteHaveBeenCastLoader.class b/classes/production/main/meerkat/voting/gui/vote_have_been_cast/VoteHaveBeenCastLoader.class new file mode 100644 index 0000000..162eb1a Binary files /dev/null and b/classes/production/main/meerkat/voting/gui/vote_have_been_cast/VoteHaveBeenCastLoader.class differ diff --git a/classes/production/main/meerkat/voting/gui/welcome_splash/WelcomeSplashController.class b/classes/production/main/meerkat/voting/gui/welcome_splash/WelcomeSplashController.class new file mode 100644 index 0000000..8466d59 Binary files /dev/null and b/classes/production/main/meerkat/voting/gui/welcome_splash/WelcomeSplashController.class differ diff --git a/classes/production/main/meerkat/voting/gui/welcome_splash/WelcomeSplashLoader.class b/classes/production/main/meerkat/voting/gui/welcome_splash/WelcomeSplashLoader.class new file mode 100644 index 0000000..e440c84 Binary files /dev/null and b/classes/production/main/meerkat/voting/gui/welcome_splash/WelcomeSplashLoader.class differ diff --git a/classes/production/main/meerkat/voting/ui/GraphicalUserInterface.class b/classes/production/main/meerkat/voting/ui/GraphicalUserInterface.class new file mode 100644 index 0000000..3f30adc Binary files /dev/null and b/classes/production/main/meerkat/voting/ui/GraphicalUserInterface.class differ diff --git a/voting-booth-gui/src/main/java/meerkat/voting/gui/Main.java b/voting-booth-gui/src/main/java/meerkat/voting/gui/Main.java index 5bd2223..2c874e0 100644 --- a/voting-booth-gui/src/main/java/meerkat/voting/gui/Main.java +++ b/voting-booth-gui/src/main/java/meerkat/voting/gui/Main.java @@ -18,7 +18,7 @@ public class Main extends Application { ChainBuilder.Build(primaryStage, config); primaryStage.setTitle("Meerkat Polling Station"); primaryStage.show(); -} + } public static void main(String[] args) throws InterruptedException { launch(args); diff --git a/voting-booth-gui/src/main/java/meerkat/voting/gui/TwoWayNode.java b/voting-booth-gui/src/main/java/meerkat/voting/gui/TwoWayNode.java index ce0320a..16cbcc2 100644 --- a/voting-booth-gui/src/main/java/meerkat/voting/gui/TwoWayNode.java +++ b/voting-booth-gui/src/main/java/meerkat/voting/gui/TwoWayNode.java @@ -13,28 +13,28 @@ public abstract class TwoWayNode { protected Scene next; protected Scene previous; protected Stage currentStage; - protected Scene currentNode; + protected Scene currentScene; protected VotingBoothConfiguration config; /** * Sets which next TwoWayNode - * @param nextObject + * @param nextObject the next TwoWayNode to which the flow will eventual arrive */ - public void SetNext(TwoWayNode nextObject) { - this.next = nextObject.GetNode(); + void SetNext(TwoWayNode nextObject) { + this.next = nextObject.GetCurrentScene(); } /** * Sets which previous TwoWayNode - * @param previousObject + * @param previousObject the object that is one twoWayNode before current object */ - public void SetPrevious(TwoWayNode previousObject) { - this.previous = previousObject.GetNode(); + void SetPrevious(TwoWayNode previousObject) { + this.previous = previousObject.GetCurrentScene(); } /** * Sets the stage of current object - * @param primaryStage + * @param primaryStage the primary stage on which all the panels displayed */ public void SetStage(Stage primaryStage) { this.currentStage = primaryStage; @@ -42,18 +42,18 @@ public abstract class TwoWayNode { /** * Sets the current parent node - * @param parent + * @param parent the object that is the current new scene */ - public void SetParent(Parent parent) { - this.currentNode = new Scene(parent); + public void SetCurrentScene(Parent parent) { + this.currentScene = new Scene(parent); } /** - * GetNode return the paren node that represents current object + * GetCurrentScene return the paren node that represents current object * @return Paren object */ - public Scene GetNode() { - return this.currentNode; + private Scene GetCurrentScene() { + return this.currentScene; } /** @@ -63,4 +63,10 @@ public abstract class TwoWayNode { public void SetConfig(VotingBoothConfiguration config) { this.config = config; } + + /** + * Should updates the visual state of the node baed on pased configuration + * this method will be called right before we going get this node to be represented + */ + public abstract void UpdateNode(); } diff --git a/voting-booth-gui/src/main/java/meerkat/voting/gui/VotingBoothGUIManager.java b/voting-booth-gui/src/main/java/meerkat/voting/gui/VotingBoothGUIManager.java index 2834cd1..9b3f1ca 100644 --- a/voting-booth-gui/src/main/java/meerkat/voting/gui/VotingBoothGUIManager.java +++ b/voting-booth-gui/src/main/java/meerkat/voting/gui/VotingBoothGUIManager.java @@ -8,7 +8,6 @@ import meerkat.voting.VotingBooth; import meerkat.voting.ui.VotingBoothUI; import org.slf4j.LoggerFactory; -import javax.validation.constraints.Null; import java.io.IOException; import java.util.List; import java.util.Map; diff --git a/voting-booth-gui/src/main/java/meerkat/voting/gui/select_candidate_name/SelectCandidateNameController.java b/voting-booth-gui/src/main/java/meerkat/voting/gui/select_candidate_name/SelectCandidateNameController.java index e352c33..b14ad77 100644 --- a/voting-booth-gui/src/main/java/meerkat/voting/gui/select_candidate_name/SelectCandidateNameController.java +++ b/voting-booth-gui/src/main/java/meerkat/voting/gui/select_candidate_name/SelectCandidateNameController.java @@ -23,4 +23,17 @@ public class SelectCandidateNameController extends TwoWayNode { this.currentStage.setScene(this.next); this.currentStage.show(); } + + /** + * Updates the voter options according to the VotingBoothConfiguration + */ + private void UpdateVoterOptions(){ + + + } + + @Override + public void UpdateNode() { + this.UpdateVoterOptions(); + } } diff --git a/voting-booth-gui/src/main/java/meerkat/voting/gui/straight_channel_section/StraightChannelSectionController.java b/voting-booth-gui/src/main/java/meerkat/voting/gui/straight_channel_section/StraightChannelSectionController.java index bcd77f2..62ccfcd 100644 --- a/voting-booth-gui/src/main/java/meerkat/voting/gui/straight_channel_section/StraightChannelSectionController.java +++ b/voting-booth-gui/src/main/java/meerkat/voting/gui/straight_channel_section/StraightChannelSectionController.java @@ -19,4 +19,9 @@ public class StraightChannelSectionController extends TwoWayNode { this.currentStage.setScene(this.next); this.currentStage.show(); } + + @Override + public void UpdateNode() { + // Does it suppose to show the channel ? + } } diff --git a/voting-booth-gui/src/main/java/meerkat/voting/gui/straight_channel_section/StraightChannelSectionLoader.java b/voting-booth-gui/src/main/java/meerkat/voting/gui/straight_channel_section/StraightChannelSectionLoader.java index 9a7d2a4..8ed626e 100644 --- a/voting-booth-gui/src/main/java/meerkat/voting/gui/straight_channel_section/StraightChannelSectionLoader.java +++ b/voting-booth-gui/src/main/java/meerkat/voting/gui/straight_channel_section/StraightChannelSectionLoader.java @@ -36,7 +36,7 @@ public class StraightChannelSectionLoader { StraightChannelSectionController controller = fxmlLoader.getController(); // set the controller to be functional TwoWayNode - controller.SetParent(straightChannelSection); + controller.SetCurrentScene(straightChannelSection); controller.SetStage(currentStage); // set the controller to have the configuration file diff --git a/voting-booth-gui/src/main/java/meerkat/voting/gui/vote_have_been_cast/VoteHaveBeenCastController.java b/voting-booth-gui/src/main/java/meerkat/voting/gui/vote_have_been_cast/VoteHaveBeenCastController.java index 5680048..fc433fd 100644 --- a/voting-booth-gui/src/main/java/meerkat/voting/gui/vote_have_been_cast/VoteHaveBeenCastController.java +++ b/voting-booth-gui/src/main/java/meerkat/voting/gui/vote_have_been_cast/VoteHaveBeenCastController.java @@ -7,4 +7,9 @@ import meerkat.voting.gui.TwoWayNode; * VoteHaveBeenCastController is in charge of handle the vote that have been casted */ public class VoteHaveBeenCastController extends TwoWayNode { + + @Override + public void UpdateNode() { + // This panel doesn't have any questions representations that why there is nothing ti show here + } } diff --git a/voting-booth-gui/src/main/java/meerkat/voting/gui/vote_have_been_cast/VoteHaveBeenCastLoader.java b/voting-booth-gui/src/main/java/meerkat/voting/gui/vote_have_been_cast/VoteHaveBeenCastLoader.java index 3499703..fbbe670 100644 --- a/voting-booth-gui/src/main/java/meerkat/voting/gui/vote_have_been_cast/VoteHaveBeenCastLoader.java +++ b/voting-booth-gui/src/main/java/meerkat/voting/gui/vote_have_been_cast/VoteHaveBeenCastLoader.java @@ -37,7 +37,7 @@ public class VoteHaveBeenCastLoader { VoteHaveBeenCastController controller = fxmlLoader.getController(); // set the controller to be functional TwoWayNode - controller.SetParent(voteHaveBeenCast); + controller.SetCurrentScene(voteHaveBeenCast); controller.SetStage(currentStage); // set the controller to have the configuration file diff --git a/voting-booth-gui/src/main/java/meerkat/voting/gui/welcome_splash/WelcomeSplashController.java b/voting-booth-gui/src/main/java/meerkat/voting/gui/welcome_splash/WelcomeSplashController.java index be83e69..8e572d1 100644 --- a/voting-booth-gui/src/main/java/meerkat/voting/gui/welcome_splash/WelcomeSplashController.java +++ b/voting-booth-gui/src/main/java/meerkat/voting/gui/welcome_splash/WelcomeSplashController.java @@ -17,4 +17,9 @@ public class WelcomeSplashController extends TwoWayNode { this.currentStage.setScene(this.next); this.currentStage.show(); } + + @Override + public void UpdateNode() { + // There is no questions relevant to this panel so this method does nothing + } } diff --git a/voting-booth-gui/src/main/java/meerkat/voting/gui/welcome_splash/WelcomeSplashLoader.java b/voting-booth-gui/src/main/java/meerkat/voting/gui/welcome_splash/WelcomeSplashLoader.java index 405cf8f..9914f86 100644 --- a/voting-booth-gui/src/main/java/meerkat/voting/gui/welcome_splash/WelcomeSplashLoader.java +++ b/voting-booth-gui/src/main/java/meerkat/voting/gui/welcome_splash/WelcomeSplashLoader.java @@ -38,7 +38,7 @@ public class WelcomeSplashLoader { WelcomeSplashController controller = this.fxmlLoader.getController(); // set the controller to be functional TwoWayNode - controller.SetParent(welcomeSplash); + controller.SetCurrentScene(welcomeSplash); controller.SetStage(currentStage); // set the controller to have the configuration file