diff --git a/.vscode/launch.json b/.vscode/launch.json index 8e6a9f6..caa98d8 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,6 +1,13 @@ { "version": "0.2.0", "configurations": [ + { + "type": "java", + "name": "TestReservations", + "request": "launch", + "mainClass": "lodge.TestReservations", + "projectName": "reservationsystem" + }, { "type": "java", "name": "☕ TestMainFx", diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 1b33c55..8bdaf60 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradlew b/gradlew index 23d15a9..adff685 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -114,7 +114,6 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -172,7 +171,6 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) JAVACMD=$( cygpath --unix "$JAVACMD" ) @@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" diff --git a/gradlew.bat b/gradlew.bat index db3a6ac..c4bdd3a 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -70,11 +70,10 @@ goto fail :execute @rem Setup the command line -set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/src/main/java/lodge/TestMainFx.java b/src/main/java/lodge/TestMainFx.java index 01743be..68594a1 100644 --- a/src/main/java/lodge/TestMainFx.java +++ b/src/main/java/lodge/TestMainFx.java @@ -3,14 +3,25 @@ package lodge; import javafx.application.Application; import javafx.scene.Scene; import javafx.stage.Stage; -import javafx.scene.control.Label; import javafx.scene.layout.StackPane; +import javafx.scene.paint.Color; +import javafx.scene.shape.Ellipse; +import javafx.scene.text.Font; +import javafx.scene.text.Text; public class TestMainFx extends Application{ @Override public void start(Stage primaryStage) { primaryStage.setTitle("Lodge ReservationSystem"); - Scene scene = new Scene(new StackPane(new Label("Hello World!")), 800, 600); + // Create an Ellipse and set fill color + Ellipse ellipse = new Ellipse(110, 70); + ellipse.setFill(Color.LIGHTBLUE); + // Create a Text shape with font and size + Text text = new Text("My Shapes"); + text.setFont(new Font("Arial Bold", 24)); + StackPane stackPane = new StackPane(); + stackPane.getChildren().addAll(ellipse, text); + Scene scene = new Scene(stackPane,800, 600, Color.LIGHTYELLOW); primaryStage.setScene(scene); primaryStage.show(); } diff --git a/src/main/java/lodge/reservationsystem/AccomodationManager.java b/src/main/java/lodge/reservationsystem/AccomodationManager.java index 34e0989..dd0d1f2 100644 --- a/src/main/java/lodge/reservationsystem/AccomodationManager.java +++ b/src/main/java/lodge/reservationsystem/AccomodationManager.java @@ -43,8 +43,7 @@ public final class AccomodationManager { throws IOException, IllegalArgumentException, IllegalOperationException, DuplicateObjectException { accounts.clear(); // walk directories - Path rootDir = Paths.get(getDataStoreRoot()); - DataRepository.WalkFileSystemTree(this, rootDir); + DataRepository.WalkFileSystemTree(this, Path.of(DataRepository.getPath())); System.out.println(String.format("%s LoadAll Accounts %d", "Deserializing", accounts.size())); } @@ -133,7 +132,7 @@ public final class AccomodationManager { public final static String getPath() { String home = System.getenv("HOME") != null ? System.getenv("HOME") : System.getenv("HOMEDRIVE") + System.getenv("HOMEPATH"); - return home.replace('\\', '/') + "/workspace/reservationsystem/src/resources"; + return home.replace('\\', '/') + "/workspace/reservationsystem/src/resources/db"; } } } \ No newline at end of file diff --git a/src/resources/acc-A07421233.json b/src/resources/db/acc-A07421233.json similarity index 100% rename from src/resources/acc-A07421233.json rename to src/resources/db/acc-A07421233.json diff --git a/src/resources/acc-A45098176.json b/src/resources/db/acc-A45098176.json similarity index 100% rename from src/resources/acc-A45098176.json rename to src/resources/db/acc-A45098176.json diff --git a/src/resources/res-R0123087344.json b/src/resources/db/res-R0123087344.json similarity index 100% rename from src/resources/res-R0123087344.json rename to src/resources/db/res-R0123087344.json diff --git a/src/resources/res-R0499811708.json b/src/resources/db/res-R0499811708.json similarity index 100% rename from src/resources/res-R0499811708.json rename to src/resources/db/res-R0499811708.json diff --git a/src/resources/res-R0535276622.json b/src/resources/db/res-R0535276622.json similarity index 100% rename from src/resources/res-R0535276622.json rename to src/resources/db/res-R0535276622.json diff --git a/src/resources/res-R2042828431.json b/src/resources/db/res-R2042828431.json similarity index 100% rename from src/resources/res-R2042828431.json rename to src/resources/db/res-R2042828431.json