diff --git a/polling-station-gui/build.gradle b/polling-station-gui/build.gradle new file mode 100644 index 0000000..d96571d --- /dev/null +++ b/polling-station-gui/build.gradle @@ -0,0 +1,222 @@ + +plugins { + id "us.kirchmeier.capsule" version "1.0.1" + id 'com.google.protobuf' version '0.7.0' +} + +apply plugin: 'java' +apply plugin: 'eclipse' +apply plugin: 'idea' + +apply plugin: 'maven-publish' + +// Uncomment the lines below to define an application +// (this will also allow you to build a "fatCapsule" which includes +// the entire application, including all dependencies in a single jar) +apply plugin: 'application' +mainClassName='splash_screen_on_boot.Main' + +// Is this a snapshot version? +ext { isSnapshot = false } + +ext { + groupId = 'org.factcenter.meerkat' + nexusRepository = "https://cs.idc.ac.il/nexus/content/groups/${isSnapshot ? 'unstable' : 'public'}/" + + // Credentials for IDC nexus repositories (needed only for using unstable repositories and publishing) + // Should be set in ${HOME}/.gradle/gradle.properties + nexusUser = project.hasProperty('nexusUser') ? project.property('nexusUser') : "" + nexusPassword = project.hasProperty('nexusPassword') ? project.property('nexusPassword') : "" +} + +description = "GUI For polling station" + +// Your project version +version = "0.0" + +version += "${isSnapshot ? '-SNAPSHOT' : ''}" + + + +dependencies { + // Meerkat common + compile project(':meerkat-common') + + + // Logging + compile 'org.slf4j:slf4j-api:1.7.7' + runtime 'ch.qos.logback:logback-classic:1.1.2' + runtime 'ch.qos.logback:logback-core:1.1.2' + + // Google protobufs + compile 'com.google.protobuf:protobuf-java:3.+' + + testCompile 'junit:junit:4.+' + + runtime 'org.codehaus.groovy:groovy:2.4.+' +} + + +/*==== You probably don't have to edit below this line =======*/ + +// Setup test configuration that can appear as a dependency in +// other subprojects +configurations { + testOutput.extendsFrom (testCompile) +} + +task testJar(type: Jar, dependsOn: testClasses) { + classifier = 'tests' + from sourceSets.test.output +} + +artifacts { + testOutput testJar +} + +// The run task added by the application plugin +// is also of type JavaExec. +tasks.withType(JavaExec) { + // Assign all Java system properties from + // the command line to the JavaExec task. + systemProperties System.properties +} + + +protobuf { + // Configure the protoc executable + protoc { + // Download from repositories + artifact = 'com.google.protobuf:protoc:3.+' + } +} + + +idea { + module { + project.sourceSets.each { sourceSet -> + + def srcDir = "${protobuf.generatedFilesBaseDir}/$sourceSet.name/java" + + println "Adding $srcDir" + // add protobuf generated sources to generated source dir. + if ("test".equals(sourceSet.name)) { + testSourceDirs += file(srcDir) + } else { + sourceDirs += file(srcDir) + } + generatedSourceDirs += file(srcDir) + + } + + // Don't exclude build directory + excludeDirs -= file(buildDir) + } +} + + +/*=================================== + * "Fat" Build targets + *===================================*/ + + +if (project.hasProperty('mainClassName') && (mainClassName != null)) { + + task mavenCapsule(type: MavenCapsule) { + description = "Generate a capsule jar that automatically downloads and caches dependencies when run." + applicationClass mainClassName + destinationDir = buildDir + } + + task fatCapsule(type: FatCapsule) { + description = "Generate a single capsule jar containing everything. Use -Pfatmain=... to override main class" + + destinationDir = buildDir + + def fatMain = hasProperty('fatmain') ? fatmain : mainClassName + + applicationClass fatMain + + def testJar = hasProperty('test') + + if (hasProperty('fatmain')) { + appendix = "fat-${fatMain}" + } else { + appendix = "fat" + } + + if (testJar) { + from sourceSets.test.output + } + } +} + + +/*=================================== + * Repositories + *===================================*/ + +repositories { + + // Prefer the local nexus repository (it may have 3rd party artifacts not found in mavenCentral) + maven { + url nexusRepository + + if (isSnapshot) { + credentials { username + password + + username nexusUser + password nexusPassword + } + } + } + + // Use local maven repository + mavenLocal() + + // Use 'maven central' for other dependencies. + mavenCentral() +} + +task "info" << { + println "Project: ${project.name}" +println "Description: ${project.description}" + println "--------------------------" + println "GroupId: $groupId" + println "Version: $version (${isSnapshot ? 'snapshot' : 'release'})" + println "" +} +info.description 'Print some information about project parameters' + + +/*=================================== + * Publishing + *===================================*/ + +publishing { + publications { + mavenJava(MavenPublication) { + groupId project.groupId + pom.withXml { + asNode().appendNode('description', project.description) + } + from project.components.java + + } + } + repositories { + maven { + url "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}" + credentials { username + password + + username nexusUser + password nexusPassword + } + } + } +} + + + diff --git a/polling-station-gui/gradlew b/polling-station-gui/gradlew new file mode 120000 index 0000000..502f5a2 --- /dev/null +++ b/polling-station-gui/gradlew @@ -0,0 +1 @@ +../gradlew \ No newline at end of file diff --git a/voting-station-gui/src/polling_station_dashboard/java/EventHandlerMap.java b/polling-station-gui/src/main/java/polling_station_dashboard/EventHandlerMap.java similarity index 95% rename from voting-station-gui/src/polling_station_dashboard/java/EventHandlerMap.java rename to polling-station-gui/src/main/java/polling_station_dashboard/EventHandlerMap.java index f371501..a971a7b 100644 --- a/voting-station-gui/src/polling_station_dashboard/java/EventHandlerMap.java +++ b/polling-station-gui/src/main/java/polling_station_dashboard/EventHandlerMap.java @@ -1,4 +1,4 @@ -package polling_station_dashboard.java; +package polling_station_dashboard; import javafx.event.Event; import javafx.event.EventHandler; diff --git a/voting-station-gui/src/polling_station_dashboard/java/EventHandlerMapper.java b/polling-station-gui/src/main/java/polling_station_dashboard/EventHandlerMapper.java similarity index 84% rename from voting-station-gui/src/polling_station_dashboard/java/EventHandlerMapper.java rename to polling-station-gui/src/main/java/polling_station_dashboard/EventHandlerMapper.java index 12320ca..de50597 100644 --- a/voting-station-gui/src/polling_station_dashboard/java/EventHandlerMapper.java +++ b/polling-station-gui/src/main/java/polling_station_dashboard/EventHandlerMapper.java @@ -1,12 +1,12 @@ -package polling_station_dashboard.java; +package polling_station_dashboard; import javafx.stage.Stage; import polling_station_dashboard.search.SearchHandler; 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; -import polling_station_dashboard.statusLog.java.StatusLogVisualUpdater; +import polling_station_dashboard.settings.SettingsVisualUpdater; +import polling_station_dashboard.settings.settingsLoader; +import polling_station_dashboard.statusLog.StatusLogLoader; +import polling_station_dashboard.statusLog.StatusLogVisualUpdater; import java.io.IOException; diff --git a/voting-station-gui/src/polling_station_dashboard/java/PollingStationDashboardController.java b/polling-station-gui/src/main/java/polling_station_dashboard/PollingStationDashboardController.java similarity index 95% rename from voting-station-gui/src/polling_station_dashboard/java/PollingStationDashboardController.java rename to polling-station-gui/src/main/java/polling_station_dashboard/PollingStationDashboardController.java index d167cf7..795f5f3 100644 --- a/voting-station-gui/src/polling_station_dashboard/java/PollingStationDashboardController.java +++ b/polling-station-gui/src/main/java/polling_station_dashboard/PollingStationDashboardController.java @@ -1,4 +1,4 @@ -package polling_station_dashboard.java; +package polling_station_dashboard; import javafx.fxml.FXML; import javafx.scene.input.MouseEvent; diff --git a/voting-station-gui/src/polling_station_dashboard/java/PollingStationDashboardLoader.java b/polling-station-gui/src/main/java/polling_station_dashboard/PollingStationDashboardLoader.java similarity index 92% rename from voting-station-gui/src/polling_station_dashboard/java/PollingStationDashboardLoader.java rename to polling-station-gui/src/main/java/polling_station_dashboard/PollingStationDashboardLoader.java index e6a140c..763072b 100644 --- a/voting-station-gui/src/polling_station_dashboard/java/PollingStationDashboardLoader.java +++ b/polling-station-gui/src/main/java/polling_station_dashboard/PollingStationDashboardLoader.java @@ -1,4 +1,4 @@ -package polling_station_dashboard.java; +package polling_station_dashboard; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; @@ -13,7 +13,7 @@ import java.io.IOException; */ public class PollingStationDashboardLoader { - private static final String POLLING_STATION_DASHBOARD_FXML_PATH = "../fxml/polling_station_dashboard.fxml"; + private static final String POLLING_STATION_DASHBOARD_FXML_PATH = "/view/dashboard/polling_station_dashboard.fxml"; private Stage currentStage; diff --git a/voting-station-gui/src/polling_station_dashboard/search/SearchHandler.java b/polling-station-gui/src/main/java/polling_station_dashboard/search/SearchHandler.java similarity index 94% rename from voting-station-gui/src/polling_station_dashboard/search/SearchHandler.java rename to polling-station-gui/src/main/java/polling_station_dashboard/search/SearchHandler.java index 4cc4b82..d97a6c6 100644 --- a/voting-station-gui/src/polling_station_dashboard/search/SearchHandler.java +++ b/polling-station-gui/src/main/java/polling_station_dashboard/search/SearchHandler.java @@ -5,13 +5,12 @@ import javafx.event.EventHandler; import javafx.scene.control.TextField; import javafx.scene.layout.Pane; import javafx.stage.Stage; -import polling_station_dashboard.search.submitVoter.java.SubmitVoterLoader; +import polling_station_dashboard.search.submitVoter.SubmitVoterLoader; import polling_station_dashboard.search.votersFetcher.VotersFetcher; -import polling_station_dashboard.search.addVoter.java.AddVoterLoader; +import polling_station_dashboard.search.addVoter.AddVoterLoader; import javafx.scene.control.Button; import java.io.IOException; -import java.lang.reflect.Array; import java.util.*; /** diff --git a/voting-station-gui/src/polling_station_dashboard/search/addVoter/java/AddVoterController.java b/polling-station-gui/src/main/java/polling_station_dashboard/search/addVoter/AddVoterController.java similarity index 93% rename from voting-station-gui/src/polling_station_dashboard/search/addVoter/java/AddVoterController.java rename to polling-station-gui/src/main/java/polling_station_dashboard/search/addVoter/AddVoterController.java index 7872f1d..874b674 100644 --- a/voting-station-gui/src/polling_station_dashboard/search/addVoter/java/AddVoterController.java +++ b/polling-station-gui/src/main/java/polling_station_dashboard/search/addVoter/AddVoterController.java @@ -1,4 +1,4 @@ -package polling_station_dashboard.search.addVoter.java; +package polling_station_dashboard.search.addVoter; import javafx.fxml.FXML; import javafx.scene.layout.Pane; diff --git a/voting-station-gui/src/polling_station_dashboard/search/addVoter/java/AddVoterLoader.java b/polling-station-gui/src/main/java/polling_station_dashboard/search/addVoter/AddVoterLoader.java similarity index 85% rename from voting-station-gui/src/polling_station_dashboard/search/addVoter/java/AddVoterLoader.java rename to polling-station-gui/src/main/java/polling_station_dashboard/search/addVoter/AddVoterLoader.java index cdd9d2d..62d4ae1 100644 --- a/voting-station-gui/src/polling_station_dashboard/search/addVoter/java/AddVoterLoader.java +++ b/polling-station-gui/src/main/java/polling_station_dashboard/search/addVoter/AddVoterLoader.java @@ -1,4 +1,4 @@ -package polling_station_dashboard.search.addVoter.java; +package polling_station_dashboard.search.addVoter; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; @@ -13,7 +13,7 @@ import java.io.IOException; */ public class AddVoterLoader { - private static final String ADD_VOTER_FXML_PATH = "../fxml/add_voter.fxml"; + private static final String ADD_VOTER_FXML_PATH = "/view/dashboard/add_voter.fxml"; private Stage currentStage; diff --git a/voting-station-gui/src/polling_station_dashboard/search/submitVoter/java/SubmitVoterController.java b/polling-station-gui/src/main/java/polling_station_dashboard/search/submitVoter/SubmitVoterController.java similarity index 93% rename from voting-station-gui/src/polling_station_dashboard/search/submitVoter/java/SubmitVoterController.java rename to polling-station-gui/src/main/java/polling_station_dashboard/search/submitVoter/SubmitVoterController.java index 78074e4..9d1933e 100644 --- a/voting-station-gui/src/polling_station_dashboard/search/submitVoter/java/SubmitVoterController.java +++ b/polling-station-gui/src/main/java/polling_station_dashboard/search/submitVoter/SubmitVoterController.java @@ -1,4 +1,4 @@ -package polling_station_dashboard.search.submitVoter.java; +package polling_station_dashboard.search.submitVoter; import javafx.fxml.FXML; import javafx.scene.layout.Pane; diff --git a/voting-station-gui/src/polling_station_dashboard/search/submitVoter/java/SubmitVoterLoader.java b/polling-station-gui/src/main/java/polling_station_dashboard/search/submitVoter/SubmitVoterLoader.java similarity index 90% rename from voting-station-gui/src/polling_station_dashboard/search/submitVoter/java/SubmitVoterLoader.java rename to polling-station-gui/src/main/java/polling_station_dashboard/search/submitVoter/SubmitVoterLoader.java index 1adafc2..dad7dd2 100644 --- a/voting-station-gui/src/polling_station_dashboard/search/submitVoter/java/SubmitVoterLoader.java +++ b/polling-station-gui/src/main/java/polling_station_dashboard/search/submitVoter/SubmitVoterLoader.java @@ -1,4 +1,4 @@ -package polling_station_dashboard.search.submitVoter.java; +package polling_station_dashboard.search.submitVoter; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; @@ -15,7 +15,7 @@ import java.util.HashMap; */ public class SubmitVoterLoader { - private static final String SUBMIT_VOTER_FXML_PATH = "../fxml/submit_voter.fxml"; + private static final String SUBMIT_VOTER_FXML_PATH = "/view/dashboard/submit_voter.fxml"; private Stage currentStage; private FXMLLoader fxmlLoader; diff --git a/voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/DummyVotersFetcher.java b/polling-station-gui/src/main/java/polling_station_dashboard/search/votersFetcher/DummyVotersFetcher.java similarity index 100% rename from voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/DummyVotersFetcher.java rename to polling-station-gui/src/main/java/polling_station_dashboard/search/votersFetcher/DummyVotersFetcher.java diff --git a/voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/VotersFetcher.java b/polling-station-gui/src/main/java/polling_station_dashboard/search/votersFetcher/VotersFetcher.java similarity index 100% rename from voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/VotersFetcher.java rename to polling-station-gui/src/main/java/polling_station_dashboard/search/votersFetcher/VotersFetcher.java diff --git a/voting-station-gui/src/polling_station_dashboard/settings/java/SettingsVisualUpdater.java b/polling-station-gui/src/main/java/polling_station_dashboard/settings/SettingsVisualUpdater.java similarity index 97% rename from voting-station-gui/src/polling_station_dashboard/settings/java/SettingsVisualUpdater.java rename to polling-station-gui/src/main/java/polling_station_dashboard/settings/SettingsVisualUpdater.java index e00abe6..fa4b720 100644 --- a/voting-station-gui/src/polling_station_dashboard/settings/java/SettingsVisualUpdater.java +++ b/polling-station-gui/src/main/java/polling_station_dashboard/settings/SettingsVisualUpdater.java @@ -1,4 +1,4 @@ -package polling_station_dashboard.settings.java; +package polling_station_dashboard.settings; import javafx.event.Event; import javafx.event.EventHandler; diff --git a/voting-station-gui/src/polling_station_dashboard/settings/java/settingsController.java b/polling-station-gui/src/main/java/polling_station_dashboard/settings/settingsController.java similarity index 85% rename from voting-station-gui/src/polling_station_dashboard/settings/java/settingsController.java rename to polling-station-gui/src/main/java/polling_station_dashboard/settings/settingsController.java index 297532b..8430b09 100644 --- a/voting-station-gui/src/polling_station_dashboard/settings/java/settingsController.java +++ b/polling-station-gui/src/main/java/polling_station_dashboard/settings/settingsController.java @@ -1,4 +1,4 @@ -package polling_station_dashboard.settings.java; +package polling_station_dashboard.settings; import javafx.stage.Stage; diff --git a/voting-station-gui/src/polling_station_dashboard/settings/java/settingsLoader.java b/polling-station-gui/src/main/java/polling_station_dashboard/settings/settingsLoader.java similarity index 85% rename from voting-station-gui/src/polling_station_dashboard/settings/java/settingsLoader.java rename to polling-station-gui/src/main/java/polling_station_dashboard/settings/settingsLoader.java index f618018..0ed5a40 100644 --- a/voting-station-gui/src/polling_station_dashboard/settings/java/settingsLoader.java +++ b/polling-station-gui/src/main/java/polling_station_dashboard/settings/settingsLoader.java @@ -1,4 +1,4 @@ -package polling_station_dashboard.settings.java; +package polling_station_dashboard.settings; import javafx.fxml.FXMLLoader; import javafx.scene.layout.GridPane; @@ -12,7 +12,7 @@ import java.io.IOException; */ public class settingsLoader { - private static final String SETTINGS_FXML_PATH = "../fxml/settings.fxml"; + private static final String SETTINGS_FXML_PATH = "/view/dashboard/settings.fxml"; private Stage currentStage; private FXMLLoader fxmlLoader; diff --git a/voting-station-gui/src/polling_station_dashboard/StatusLog/java/StatusLogController.java b/polling-station-gui/src/main/java/polling_station_dashboard/statusLog/StatusLogController.java similarity index 86% rename from voting-station-gui/src/polling_station_dashboard/StatusLog/java/StatusLogController.java rename to polling-station-gui/src/main/java/polling_station_dashboard/statusLog/StatusLogController.java index 05541e8..c6437ff 100644 --- a/voting-station-gui/src/polling_station_dashboard/StatusLog/java/StatusLogController.java +++ b/polling-station-gui/src/main/java/polling_station_dashboard/statusLog/StatusLogController.java @@ -1,4 +1,4 @@ -package polling_station_dashboard.statusLog.java; +package polling_station_dashboard.statusLog; import javafx.stage.Stage; diff --git a/voting-station-gui/src/polling_station_dashboard/StatusLog/java/StatusLogLoader.java b/polling-station-gui/src/main/java/polling_station_dashboard/statusLog/StatusLogLoader.java similarity index 85% rename from voting-station-gui/src/polling_station_dashboard/StatusLog/java/StatusLogLoader.java rename to polling-station-gui/src/main/java/polling_station_dashboard/statusLog/StatusLogLoader.java index 9c725ca..7e79e5f 100644 --- a/voting-station-gui/src/polling_station_dashboard/StatusLog/java/StatusLogLoader.java +++ b/polling-station-gui/src/main/java/polling_station_dashboard/statusLog/StatusLogLoader.java @@ -1,4 +1,4 @@ -package polling_station_dashboard.statusLog.java; +package polling_station_dashboard.statusLog; import javafx.fxml.FXMLLoader; import javafx.scene.layout.GridPane; @@ -12,7 +12,7 @@ import java.io.IOException; */ public class StatusLogLoader { - private static final String STATUS_LOG_FXML_PATH = "../fxml/status_log.fxml"; + private static final String STATUS_LOG_FXML_PATH = "/view/dashboard/status_log.fxml"; private Stage currentStage; private FXMLLoader fxmlLoader; diff --git a/voting-station-gui/src/polling_station_dashboard/statusLog/java/StatusLogVisualUpdater.java b/polling-station-gui/src/main/java/polling_station_dashboard/statusLog/StatusLogVisualUpdater.java similarity index 97% rename from voting-station-gui/src/polling_station_dashboard/statusLog/java/StatusLogVisualUpdater.java rename to polling-station-gui/src/main/java/polling_station_dashboard/statusLog/StatusLogVisualUpdater.java index 41a9e6c..556616b 100644 --- a/voting-station-gui/src/polling_station_dashboard/statusLog/java/StatusLogVisualUpdater.java +++ b/polling-station-gui/src/main/java/polling_station_dashboard/statusLog/StatusLogVisualUpdater.java @@ -1,4 +1,4 @@ -package polling_station_dashboard.statusLog.java; +package polling_station_dashboard.statusLog; import javafx.event.Event; import javafx.event.EventHandler; diff --git a/voting-station-gui/src/set_up_complete/java/SetUpCompleteController.java b/polling-station-gui/src/main/java/set_up_complete/SetUpCompleteController.java similarity index 84% rename from voting-station-gui/src/set_up_complete/java/SetUpCompleteController.java rename to polling-station-gui/src/main/java/set_up_complete/SetUpCompleteController.java index 78729bb..18a919b 100644 --- a/voting-station-gui/src/set_up_complete/java/SetUpCompleteController.java +++ b/polling-station-gui/src/main/java/set_up_complete/SetUpCompleteController.java @@ -1,8 +1,8 @@ -package set_up_complete.java; +package set_up_complete; import javafx.fxml.FXML; import javafx.stage.Stage; -import polling_station_dashboard.java.PollingStationDashboardLoader; +import polling_station_dashboard.PollingStationDashboardLoader; import java.io.IOException; diff --git a/voting-station-gui/src/set_up_complete/java/SetUpCompleteLoader.java b/polling-station-gui/src/main/java/set_up_complete/SetUpCompleteLoader.java similarity index 87% rename from voting-station-gui/src/set_up_complete/java/SetUpCompleteLoader.java rename to polling-station-gui/src/main/java/set_up_complete/SetUpCompleteLoader.java index d291d39..7380eef 100644 --- a/voting-station-gui/src/set_up_complete/java/SetUpCompleteLoader.java +++ b/polling-station-gui/src/main/java/set_up_complete/SetUpCompleteLoader.java @@ -1,4 +1,4 @@ -package set_up_complete.java; +package set_up_complete; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; @@ -12,7 +12,7 @@ import java.io.IOException; * SetUpCompleteLoader represent the end state of subscription to bulletin board */ public class SetUpCompleteLoader { - private static final String SET_UP_COMPLETE_FXML_PATH = "../fxml/set_up_complete.fxml"; + private static final String SET_UP_COMPLETE_FXML_PATH = "/view/setup/set_up_complete.fxml"; private Stage currentStage; diff --git a/voting-station-gui/src/splash_screen_on_boot/java/Main.java b/polling-station-gui/src/main/java/splash_screen_on_boot/Main.java similarity index 83% rename from voting-station-gui/src/splash_screen_on_boot/java/Main.java rename to polling-station-gui/src/main/java/splash_screen_on_boot/Main.java index 7ef3bc9..5c15fa8 100644 --- a/voting-station-gui/src/splash_screen_on_boot/java/Main.java +++ b/polling-station-gui/src/main/java/splash_screen_on_boot/Main.java @@ -1,4 +1,4 @@ -package splash_screen_on_boot.java; +package splash_screen_on_boot; import javafx.application.Application; import javafx.stage.Stage; @@ -12,7 +12,7 @@ public class Main extends Application { @Override public void start(Stage primaryStage) throws Exception{ new SplashScreenOnBootLoader(primaryStage); - primaryStage.setTitle("Meerkat"); + primaryStage.setTitle("Meerkat Polling Station"); primaryStage.show(); } diff --git a/voting-station-gui/src/splash_screen_on_boot/java/SplashScreenOnBootLoader.java b/polling-station-gui/src/main/java/splash_screen_on_boot/SplashScreenOnBootLoader.java similarity index 84% rename from voting-station-gui/src/splash_screen_on_boot/java/SplashScreenOnBootLoader.java rename to polling-station-gui/src/main/java/splash_screen_on_boot/SplashScreenOnBootLoader.java index e83007c..3c458cd 100644 --- a/voting-station-gui/src/splash_screen_on_boot/java/SplashScreenOnBootLoader.java +++ b/polling-station-gui/src/main/java/splash_screen_on_boot/SplashScreenOnBootLoader.java @@ -1,13 +1,15 @@ -package splash_screen_on_boot.java; +package splash_screen_on_boot; import javafx.concurrent.Task; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; -import uploading_to_bulletin_board.java.UploadingToBulletinBoardLoader; +import uploading_to_bulletin_board.UploadingToBulletinBoardLoader; import java.io.IOException; +import java.net.URL; +import java.util.ResourceBundle; /** * Created by Vladimir Eliezer Tokarev on 28/05/2016. @@ -15,14 +17,14 @@ import java.io.IOException; */ public class SplashScreenOnBootLoader { - private static final String SPALSH_SCREEN_ON_BOOT_FXML_PATH = "../fxml/spalsh_screen_on_boot.fxml"; + private static final String SPLASH_SCREEN_ON_BOOT_FXML_PATH = "/view/splash/splash_screen_on_boot.fxml"; private static final int TWO_SECONDS_TIMEOUT_IN_MILLISECONDS = 1000; private Stage currentStage; public SplashScreenOnBootLoader(Stage primaryStage) throws IOException { - Parent splashScreenOnBootRoot = FXMLLoader.load(getClass().getResource(SPALSH_SCREEN_ON_BOOT_FXML_PATH)); + Parent splashScreenOnBootRoot = FXMLLoader.load(getClass().getResource(SPLASH_SCREEN_ON_BOOT_FXML_PATH)); currentStage = primaryStage; currentStage.setScene(new Scene(splashScreenOnBootRoot, 565, 365)); IntroSleep(); diff --git a/voting-station-gui/src/uploading_to_bulletin_board/java/UploadingToBulletinBoardController.java b/polling-station-gui/src/main/java/uploading_to_bulletin_board/UploadingToBulletinBoardController.java similarity index 85% rename from voting-station-gui/src/uploading_to_bulletin_board/java/UploadingToBulletinBoardController.java rename to polling-station-gui/src/main/java/uploading_to_bulletin_board/UploadingToBulletinBoardController.java index 77309b6..3603c38 100644 --- a/voting-station-gui/src/uploading_to_bulletin_board/java/UploadingToBulletinBoardController.java +++ b/polling-station-gui/src/main/java/uploading_to_bulletin_board/UploadingToBulletinBoardController.java @@ -1,8 +1,8 @@ -package uploading_to_bulletin_board.java; +package uploading_to_bulletin_board; import javafx.fxml.FXML; import javafx.stage.Stage; -import set_up_complete.java.SetUpCompleteLoader; +import set_up_complete.SetUpCompleteLoader; import java.io.IOException; diff --git a/voting-station-gui/src/uploading_to_bulletin_board/java/UploadingToBulletinBoardLoader.java b/polling-station-gui/src/main/java/uploading_to_bulletin_board/UploadingToBulletinBoardLoader.java similarity index 91% rename from voting-station-gui/src/uploading_to_bulletin_board/java/UploadingToBulletinBoardLoader.java rename to polling-station-gui/src/main/java/uploading_to_bulletin_board/UploadingToBulletinBoardLoader.java index 0844f82..6c0bfed 100644 --- a/voting-station-gui/src/uploading_to_bulletin_board/java/UploadingToBulletinBoardLoader.java +++ b/polling-station-gui/src/main/java/uploading_to_bulletin_board/UploadingToBulletinBoardLoader.java @@ -1,4 +1,4 @@ -package uploading_to_bulletin_board.java; +package uploading_to_bulletin_board; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; @@ -12,7 +12,7 @@ import java.io.IOException; * UploadingToBulletinBoardLoader uploads the given code to the bulletin board */ public class UploadingToBulletinBoardLoader { - private static final String UPLOADING_TO_BULLETIN_BOARD_FXM_PATH = "../fxml/uploading_to_bulletin_board.fxml"; + private static final String UPLOADING_TO_BULLETIN_BOARD_FXM_PATH = "/view/uploading/uploading_to_bulletin_board.fxml"; private Stage currentStage; diff --git a/voting-station-gui/src/gifs/VerticalLoading.gif b/polling-station-gui/src/main/resources/images/VerticalLoading.gif similarity index 100% rename from voting-station-gui/src/gifs/VerticalLoading.gif rename to polling-station-gui/src/main/resources/images/VerticalLoading.gif diff --git a/voting-station-gui/src/pictures/barcode.png b/polling-station-gui/src/main/resources/images/barcode.png similarity index 100% rename from voting-station-gui/src/pictures/barcode.png rename to polling-station-gui/src/main/resources/images/barcode.png diff --git a/voting-station-gui/src/pictures/blacktriangle.png b/polling-station-gui/src/main/resources/images/blacktriangle.png similarity index 100% rename from voting-station-gui/src/pictures/blacktriangle.png rename to polling-station-gui/src/main/resources/images/blacktriangle.png diff --git a/voting-station-gui/src/pictures/bullets.png b/polling-station-gui/src/main/resources/images/bullets.png similarity index 100% rename from voting-station-gui/src/pictures/bullets.png rename to polling-station-gui/src/main/resources/images/bullets.png diff --git a/voting-station-gui/src/pictures/exit.png b/polling-station-gui/src/main/resources/images/exit.png similarity index 100% rename from voting-station-gui/src/pictures/exit.png rename to polling-station-gui/src/main/resources/images/exit.png diff --git a/voting-station-gui/src/gifs/loadingGif.gif b/polling-station-gui/src/main/resources/images/loadingGif.gif similarity index 100% rename from voting-station-gui/src/gifs/loadingGif.gif rename to polling-station-gui/src/main/resources/images/loadingGif.gif diff --git a/voting-station-gui/src/pictures/profile.png b/polling-station-gui/src/main/resources/images/profile.png similarity index 100% rename from voting-station-gui/src/pictures/profile.png rename to polling-station-gui/src/main/resources/images/profile.png diff --git a/voting-station-gui/src/pictures/settings.png b/polling-station-gui/src/main/resources/images/settings.png similarity index 100% rename from voting-station-gui/src/pictures/settings.png rename to polling-station-gui/src/main/resources/images/settings.png diff --git a/voting-station-gui/src/pictures/women.png b/polling-station-gui/src/main/resources/images/women.png similarity index 100% rename from voting-station-gui/src/pictures/women.png rename to polling-station-gui/src/main/resources/images/women.png diff --git a/voting-station-gui/src/polling_station_dashboard/search/addVoter/fxml/add_voter.fxml b/polling-station-gui/src/main/resources/view/dashboard/add_voter.fxml similarity index 98% rename from voting-station-gui/src/polling_station_dashboard/search/addVoter/fxml/add_voter.fxml rename to polling-station-gui/src/main/resources/view/dashboard/add_voter.fxml index fad3377..4e32c84 100644 --- a/voting-station-gui/src/polling_station_dashboard/search/addVoter/fxml/add_voter.fxml +++ b/polling-station-gui/src/main/resources/view/dashboard/add_voter.fxml @@ -6,7 +6,7 @@ + xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="polling_station_dashboard.search.addVoter.AddVoterController"> @@ -102,7 +102,7 @@
- +
diff --git a/voting-station-gui/src/polling_station_dashboard/fxml/polling_station_dashboard.fxml b/polling-station-gui/src/main/resources/view/dashboard/polling_station_dashboard.fxml similarity index 96% rename from voting-station-gui/src/polling_station_dashboard/fxml/polling_station_dashboard.fxml rename to polling-station-gui/src/main/resources/view/dashboard/polling_station_dashboard.fxml index 28592af..bc72bc8 100644 --- a/voting-station-gui/src/polling_station_dashboard/fxml/polling_station_dashboard.fxml +++ b/polling-station-gui/src/main/resources/view/dashboard/polling_station_dashboard.fxml @@ -6,7 +6,7 @@ - + @@ -32,7 +32,7 @@ - + diff --git a/voting-station-gui/src/polling_station_dashboard/settings/fxml/settings.fxml b/polling-station-gui/src/main/resources/view/dashboard/settings.fxml similarity index 98% rename from voting-station-gui/src/polling_station_dashboard/settings/fxml/settings.fxml rename to polling-station-gui/src/main/resources/view/dashboard/settings.fxml index 0312ecf..b7090b7 100644 --- a/voting-station-gui/src/polling_station_dashboard/settings/fxml/settings.fxml +++ b/polling-station-gui/src/main/resources/view/dashboard/settings.fxml @@ -6,7 +6,7 @@ - + @@ -32,7 +32,7 @@ - + diff --git a/voting-station-gui/src/polling_station_dashboard/StatusLog/fxml/status_log.fxml b/polling-station-gui/src/main/resources/view/dashboard/status_log.fxml similarity index 96% rename from voting-station-gui/src/polling_station_dashboard/StatusLog/fxml/status_log.fxml rename to polling-station-gui/src/main/resources/view/dashboard/status_log.fxml index 180f299..05dc9d7 100644 --- a/voting-station-gui/src/polling_station_dashboard/StatusLog/fxml/status_log.fxml +++ b/polling-station-gui/src/main/resources/view/dashboard/status_log.fxml @@ -7,7 +7,7 @@ - +
@@ -16,7 +16,7 @@ - + diff --git a/voting-station-gui/src/polling_station_dashboard/search/submitVoter/fxml/submit_voter.fxml b/polling-station-gui/src/main/resources/view/dashboard/submit_voter.fxml similarity index 98% rename from voting-station-gui/src/polling_station_dashboard/search/submitVoter/fxml/submit_voter.fxml rename to polling-station-gui/src/main/resources/view/dashboard/submit_voter.fxml index 3405c92..e5379cc 100644 --- a/voting-station-gui/src/polling_station_dashboard/search/submitVoter/fxml/submit_voter.fxml +++ b/polling-station-gui/src/main/resources/view/dashboard/submit_voter.fxml @@ -6,7 +6,7 @@ - + @@ -101,7 +101,7 @@
- +
diff --git a/voting-station-gui/src/set_up_complete/fxml/set_up_complete.fxml b/polling-station-gui/src/main/resources/view/setup/set_up_complete.fxml similarity index 98% rename from voting-station-gui/src/set_up_complete/fxml/set_up_complete.fxml rename to polling-station-gui/src/main/resources/view/setup/set_up_complete.fxml index 6c60ed5..da12402 100644 --- a/voting-station-gui/src/set_up_complete/fxml/set_up_complete.fxml +++ b/polling-station-gui/src/main/resources/view/setup/set_up_complete.fxml @@ -7,7 +7,7 @@ - + diff --git a/voting-station-gui/src/splash_screen_on_boot/fxml/spalsh_screen_on_boot.fxml b/polling-station-gui/src/main/resources/view/splash/splash_screen_on_boot.fxml similarity index 98% rename from voting-station-gui/src/splash_screen_on_boot/fxml/spalsh_screen_on_boot.fxml rename to polling-station-gui/src/main/resources/view/splash/splash_screen_on_boot.fxml index c908ee4..670686b 100644 --- a/voting-station-gui/src/splash_screen_on_boot/fxml/spalsh_screen_on_boot.fxml +++ b/polling-station-gui/src/main/resources/view/splash/splash_screen_on_boot.fxml @@ -54,7 +54,7 @@
- +
diff --git a/voting-station-gui/src/uploading_to_bulletin_board/fxml/uploading_to_bulletin_board.fxml b/polling-station-gui/src/main/resources/view/uploading/uploading_to_bulletin_board.fxml similarity index 98% rename from voting-station-gui/src/uploading_to_bulletin_board/fxml/uploading_to_bulletin_board.fxml rename to polling-station-gui/src/main/resources/view/uploading/uploading_to_bulletin_board.fxml index 4477b42..51fa9ca 100644 --- a/voting-station-gui/src/uploading_to_bulletin_board/fxml/uploading_to_bulletin_board.fxml +++ b/polling-station-gui/src/main/resources/view/uploading/uploading_to_bulletin_board.fxml @@ -13,7 +13,7 @@ - + @@ -134,7 +134,7 @@ - + diff --git a/settings.gradle b/settings.gradle index 47d6539..43b3820 100644 --- a/settings.gradle +++ b/settings.gradle @@ -6,4 +6,5 @@ include 'polling-station' include 'restful-api-common' include 'bulletin-board-client' include 'distributed-key-generation' +include 'polling-station-gui'