summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore28
-rw-r--r--.vscode/settings.json3
-rw-r--r--pom.xml38
-rw-r--r--src/main/java/design/HelloWorld.java7
-rw-r--r--src/main/resources/activities/primary.fxml16
-rw-r--r--src/main/resources/activities/secondary.fxml16
-rw-r--r--src/test/java/design/HelloWorldTest.java12
7 files changed, 120 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..65dbea6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,28 @@
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+
+target/**
+
+# Ignore tool files
+.vscode
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..e0f15db
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "java.configuration.updateBuildConfiguration": "automatic"
+} \ No newline at end of file
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..28c2fb7
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,38 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>design</groupId>
+ <artifactId>design</artifactId>
+ <version>1</version>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <maven.compiler.source>19</maven.compiler.source>
+ <maven.compiler.target>19</maven.compiler.target>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
+ <version>5.4.0</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.8.0</version>
+ <configuration>
+ <release>20</release>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <!-- JUnit 5 requires Surefire version 2.22.0 or higher -->
+ <version>3.0.0-M8</version>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/src/main/java/design/HelloWorld.java b/src/main/java/design/HelloWorld.java
new file mode 100644
index 0000000..ea552f9
--- /dev/null
+++ b/src/main/java/design/HelloWorld.java
@@ -0,0 +1,7 @@
+package design;
+
+public class HelloWorld {
+ public static void main(String[] args) {
+ System.out.println("Hello, World!");
+ }
+}
diff --git a/src/main/resources/activities/primary.fxml b/src/main/resources/activities/primary.fxml
new file mode 100644
index 0000000..f3ac66e
--- /dev/null
+++ b/src/main/resources/activities/primary.fxml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?import javafx.scene.layout.VBox?>
+<?import javafx.scene.control.Label?>
+<?import javafx.scene.control.Button?>
+<?import javafx.geometry.Insets?>
+
+<VBox alignment="CENTER" spacing="20.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="activities.PrimaryController">
+ <children>
+ <Label text="Primary View" />
+ <Button fx:id="primaryButton" text="Switch to Secondary View" onAction="#switchToSecondary"/>
+ </children>
+ <padding>
+ <Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
+ </padding>
+</VBox>
diff --git a/src/main/resources/activities/secondary.fxml b/src/main/resources/activities/secondary.fxml
new file mode 100644
index 0000000..8157d73
--- /dev/null
+++ b/src/main/resources/activities/secondary.fxml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?import javafx.scene.layout.VBox?>
+<?import javafx.scene.control.Label?>
+<?import javafx.scene.control.Button?>
+<?import javafx.geometry.Insets?>
+
+<VBox alignment="CENTER" spacing="20.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="activities.SecondaryController">
+ <children>
+ <Label text="Secondary View" />
+ <Button fx:id="secondaryButton" text="Switch to Primary View" onAction="#switchToPrimary" />
+ </children>
+ <padding>
+ <Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
+ </padding>
+</VBox>
diff --git a/src/test/java/design/HelloWorldTest.java b/src/test/java/design/HelloWorldTest.java
new file mode 100644
index 0000000..98238d7
--- /dev/null
+++ b/src/test/java/design/HelloWorldTest.java
@@ -0,0 +1,12 @@
+package design;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import org.junit.jupiter.api.Test;
+
+public class HelloWorldTest {
+ @Test
+ public void helloWorld() {
+ assertEquals("Hello, World!", "Hello, World!");
+ }
+}