add ui view

This commit is contained in:
Sherwin Price
2025-12-22 20:58:10 -05:00
parent a89b720dc4
commit 491e64612f
10 changed files with 151 additions and 1 deletions

3
.gitignore vendored
View File

@@ -3,3 +3,6 @@
# Ignore Gradle build output directory # Ignore Gradle build output directory
build build
# Ignore bin
bin

8
Api/.gitignore vendored Normal file
View File

@@ -0,0 +1,8 @@
# Ignore Gradle project-specific cache directory
.gradle
# Ignore Gradle build output directory
build
# Ignore bin
bin

Binary file not shown.

8
Model/.gitignore vendored Normal file
View File

@@ -0,0 +1,8 @@
# Ignore Gradle project-specific cache directory
.gradle
# Ignore Gradle build output directory
build
# Ignore bin
bin

8
Ui/.gitignore vendored Normal file
View File

@@ -0,0 +1,8 @@
# Ignore Gradle project-specific cache directory
.gradle
# Ignore Gradle build output directory
build
# Ignore bin
bin

3
Ui/.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"java.compile.nullAnalysis.mode": "automatic"
}

8
UiView/.gitignore vendored Normal file
View File

@@ -0,0 +1,8 @@
# Ignore Gradle project-specific cache directory
.gradle
# Ignore Gradle build output directory
build
# Ignore bin
bin

84
UiView/build.gradle Normal file
View File

@@ -0,0 +1,84 @@
/*
* This file was generated by the Gradle 'init' task.
*
* This is a general purpose Gradle build.
* Learn more about Gradle by exploring our Samples at https://docs.gradle.org/8.14.3/samples
* This project uses @Incubating APIs which are subject to change.
*/
plugins {
id 'java'
id 'application'
id 'org.openjfx.javafxplugin' version '0.1.0'
}
group = 'lodge'
version = '1.0'
// Apply a specific Java toolchain to ease working on different environments.
java {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
}
application {
mainClass = 'edu.inventorym.ApplicationView'
}
sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
resources {
srcDirs = ['src/resources/media']
}
}
test {
java {
srcDirs = ['src/test/java']
}
runtimeClasspath = files("$projectDir/libs/*.jars")
}
}
repositories {
mavenCentral()
fileTree(dir:'libs', include:'*.jar')
}
javafx {
version = "25"
modules = [ 'javafx.controls', 'javafx.fxml', 'javafx.graphics', 'javafx.web' ]
}
dependencies {
//https://mvnrepository.com/artifact/com.google.code.gson/gson
implementation 'com.google.code.gson:gson:2.13.2'
implementation 'org.openjfx:javafx-base:25.0.1'
implementation 'org.openjfx:javafx-fxml:25.0.1'
implementation 'org.openjfx:javafx-controls:25.0.1'
implementation 'org.openjfx:javafx-graphics:25.0.1'
implementation 'org.openjfx:javafx-web:25.0.1'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.17'
implementation group: 'org.slf4j', name: 'slf4j-simple', version: '2.0.17'
}
jar {
manifest {
attributes 'Main-Class': application.mainClass
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
}
tasks.named('jar') {
manifest {
attributes('Implementation-Title': 'edu.inventorym.UiView',
'Implementation-Version': 1.0,
'Main-Class': application.mainClass,
'Class-Path': 'lodge.reservationsystem javafx.base javafx.fxml javafx.controls javafx.graphics javafx.web com.google.gson .' )
}
}

View File

@@ -0,0 +1,27 @@
package edu.inventorym;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class ApplicationView extends Application {
@Override
public void start(Stage primaryStage) {
try {
primaryStage.setTitle("Lodge ReservationSystem");
Parent root = FXMLLoader.load(getClass().getClassLoader().getResource("mainViewModel.fxml"));
Scene scene = new Scene(root, 800, 600);
primaryStage.setScene(scene);
primaryStage.show();
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
launch(args);
}
}

View File

@@ -7,4 +7,5 @@ plugins {
rootProject.name = 'inventorym' rootProject.name = 'inventorym'
include('Model') include('Model')
include('Api') include('Api')
include('Ui')
include('UiView')