add ui view
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -3,3 +3,6 @@
|
||||
|
||||
# Ignore Gradle build output directory
|
||||
build
|
||||
|
||||
# Ignore bin
|
||||
bin
|
||||
|
||||
8
Api/.gitignore
vendored
Normal file
8
Api/.gitignore
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
# Ignore Gradle project-specific cache directory
|
||||
.gradle
|
||||
|
||||
# Ignore Gradle build output directory
|
||||
build
|
||||
|
||||
# Ignore bin
|
||||
bin
|
||||
BIN
Api/bin/main/edu/inventorym/Api.class
Normal file
BIN
Api/bin/main/edu/inventorym/Api.class
Normal file
Binary file not shown.
8
Model/.gitignore
vendored
Normal file
8
Model/.gitignore
vendored
Normal 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
8
Ui/.gitignore
vendored
Normal 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
3
Ui/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"java.compile.nullAnalysis.mode": "automatic"
|
||||
}
|
||||
8
UiView/.gitignore
vendored
Normal file
8
UiView/.gitignore
vendored
Normal 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
84
UiView/build.gradle
Normal 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 .' )
|
||||
}
|
||||
}
|
||||
27
UiView/src/main/java/edu/inventorym/ApplicationView.java
Normal file
27
UiView/src/main/java/edu/inventorym/ApplicationView.java
Normal 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);
|
||||
}
|
||||
}
|
||||
@@ -7,4 +7,5 @@ plugins {
|
||||
rootProject.name = 'inventorym'
|
||||
include('Model')
|
||||
include('Api')
|
||||
|
||||
include('Ui')
|
||||
include('UiView')
|
||||
|
||||
Reference in New Issue
Block a user