From a87e5186f6042e3c0d299ac2c218745754ff702e Mon Sep 17 00:00:00 2001 From: Sage The DM Date: Tue, 22 Oct 2024 11:01:03 +0200 Subject: [PATCH] Testing --- .../ost/_01_hello_world/.vscode/settings.json | 3 ++ Code/ost/_01_hello_world/pom.xml | 5 ++ .../src/main/java/module-info.java | 1 + .../target/classes/module-info.class | Bin 200 -> 222 bytes Code/ost/_02_web_view/pom.xml | 51 ++++++++++++++++++ .../src/main/java/module-info.java | 6 +++ .../src/main/java/org/interstellar/App.java | 30 +++++++++++ .../java/org/interstellar/SystemInfo.java | 13 +++++ .../target/classes/module-info.class | Bin 0 -> 232 bytes .../target/classes/org/interstellar/App.class | Bin 0 -> 1326 bytes .../classes/org/interstellar/SystemInfo.class | Bin 0 -> 571 bytes Code/ost/_03_event_handling/pom.xml | 46 ++++++++++++++++ .../src/main/java/com/example/App.java | 28 ++++++++++ .../src/main/java/module-info.java | 4 ++ .../target/classes/com/example/App.class | Bin 0 -> 1167 bytes .../target/classes/module-info.class | Bin 0 -> 200 bytes Code/ost/_04_several_scenes/pom.xml | 46 ++++++++++++++++ .../src/main/java/com/example/App.java | 30 +++++++++++ .../src/main/java/com/example/SystemInfo.java | 13 +++++ .../src/main/java/module-info.java | 4 ++ 20 files changed, 280 insertions(+) create mode 100644 Code/ost/_01_hello_world/.vscode/settings.json create mode 100644 Code/ost/_02_web_view/pom.xml create mode 100644 Code/ost/_02_web_view/src/main/java/module-info.java create mode 100644 Code/ost/_02_web_view/src/main/java/org/interstellar/App.java create mode 100644 Code/ost/_02_web_view/src/main/java/org/interstellar/SystemInfo.java create mode 100644 Code/ost/_02_web_view/target/classes/module-info.class create mode 100644 Code/ost/_02_web_view/target/classes/org/interstellar/App.class create mode 100644 Code/ost/_02_web_view/target/classes/org/interstellar/SystemInfo.class create mode 100644 Code/ost/_03_event_handling/pom.xml create mode 100644 Code/ost/_03_event_handling/src/main/java/com/example/App.java create mode 100644 Code/ost/_03_event_handling/src/main/java/module-info.java create mode 100644 Code/ost/_03_event_handling/target/classes/com/example/App.class create mode 100644 Code/ost/_03_event_handling/target/classes/module-info.class create mode 100644 Code/ost/_04_several_scenes/pom.xml create mode 100644 Code/ost/_04_several_scenes/src/main/java/com/example/App.java create mode 100644 Code/ost/_04_several_scenes/src/main/java/com/example/SystemInfo.java create mode 100644 Code/ost/_04_several_scenes/src/main/java/module-info.java diff --git a/Code/ost/_01_hello_world/.vscode/settings.json b/Code/ost/_01_hello_world/.vscode/settings.json new file mode 100644 index 0000000..385f27a --- /dev/null +++ b/Code/ost/_01_hello_world/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.configuration.updateBuildConfiguration": "interactive" +} diff --git a/Code/ost/_01_hello_world/pom.xml b/Code/ost/_01_hello_world/pom.xml index 1ca6d84..fc56fab 100644 --- a/Code/ost/_01_hello_world/pom.xml +++ b/Code/ost/_01_hello_world/pom.xml @@ -15,6 +15,11 @@ javafx-controls 13 + + org.openjfx + javafx-web + 19 + diff --git a/Code/ost/_01_hello_world/src/main/java/module-info.java b/Code/ost/_01_hello_world/src/main/java/module-info.java index 5918012..bfdc616 100644 --- a/Code/ost/_01_hello_world/src/main/java/module-info.java +++ b/Code/ost/_01_hello_world/src/main/java/module-info.java @@ -1,4 +1,5 @@ module com.example { requires javafx.controls; + requires javafx.web; exports com.example; } diff --git a/Code/ost/_01_hello_world/target/classes/module-info.class b/Code/ost/_01_hello_world/target/classes/module-info.class index 5e9b472ec74bff92562a22c38f5335636f119ef6..5d9ba5943e255337811fd3109552c5704361543a 100644 GIT binary patch delta 93 zcmX@Xc#o0m)W2Q(7#JAL83ZPBrOI+;C6*D?0G#8lUX#i1-418c7m;eAr+7Lnj delta 71 zcmcb|c!H7Z)W2Q(7#JAL8Tcl0rSfuSC6*=XB_$T8iZJj_?9o(KVqgQxGB7YPaDZv9 N1`x%_zys!i2>^h^3=9AO diff --git a/Code/ost/_02_web_view/pom.xml b/Code/ost/_02_web_view/pom.xml new file mode 100644 index 0000000..ad0f693 --- /dev/null +++ b/Code/ost/_02_web_view/pom.xml @@ -0,0 +1,51 @@ + + 4.0.0 + org.interstellar + _02_web_view + 1.0-SNAPSHOT + + UTF-8 + 11 + 11 + + + + org.openjfx + javafx-controls + 13 + + + org.openjfx + javafx-web + 13 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.0 + + 11 + + + + org.openjfx + javafx-maven-plugin + 0.0.6 + + + + + default-cli + + org.interstellar.App + + + + + + + diff --git a/Code/ost/_02_web_view/src/main/java/module-info.java b/Code/ost/_02_web_view/src/main/java/module-info.java new file mode 100644 index 0000000..b5790eb --- /dev/null +++ b/Code/ost/_02_web_view/src/main/java/module-info.java @@ -0,0 +1,6 @@ +module org.interstellar { + requires javafx.controls; + requires javafx.web; + + exports org.interstellar; +} diff --git a/Code/ost/_02_web_view/src/main/java/org/interstellar/App.java b/Code/ost/_02_web_view/src/main/java/org/interstellar/App.java new file mode 100644 index 0000000..876dfa1 --- /dev/null +++ b/Code/ost/_02_web_view/src/main/java/org/interstellar/App.java @@ -0,0 +1,30 @@ +package org.interstellar; + +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.control.Label; +import javafx.scene.layout.StackPane; +import javafx.scene.web.WebView; +import javafx.stage.Stage; + +public class App extends Application { + + @Override + public void start(Stage stage) { + WebView browser = new WebView(); + browser.getEngine().load("https://interstellardevelopment.org/"); + + StackPane root = new StackPane(browser); + + Scene scene = new Scene(root, 1080, 720); + + stage.setTitle("Test Webseite"); + stage.setScene(scene); + stage.show(); + } + + public static void main(String[] args) { + launch(); + } + +} \ No newline at end of file diff --git a/Code/ost/_02_web_view/src/main/java/org/interstellar/SystemInfo.java b/Code/ost/_02_web_view/src/main/java/org/interstellar/SystemInfo.java new file mode 100644 index 0000000..ae765e3 --- /dev/null +++ b/Code/ost/_02_web_view/src/main/java/org/interstellar/SystemInfo.java @@ -0,0 +1,13 @@ +package org.interstellar; + +public class SystemInfo { + + public static String javaVersion() { + return System.getProperty("java.version"); + } + + public static String javafxVersion() { + return System.getProperty("javafx.version"); + } + +} \ No newline at end of file diff --git a/Code/ost/_02_web_view/target/classes/module-info.class b/Code/ost/_02_web_view/target/classes/module-info.class new file mode 100644 index 0000000000000000000000000000000000000000..899da2ad58a134900278d3367365141a2687d747 GIT binary patch literal 232 zcmYjLK@Ng25S#@S0Tq(^2rt&7Kk(+s7ZfZ8Q)yB_J@PIOKEOvAOYy)SW_D&Lll^>O zZvcCw0X#x{)8|&nZCMqX5S?^ua(O6~B&4Ggzlysc%#JS25ZJRe7hYD4G<74D5{4lp zBz>@W@?2Mq(W+*MZSCKD$c$l02z$*lQOh-wp=md6>HxAo4&%YMi-!rOmN%F=+sE8- NBP=?*94v`wsxCI0&MHA#T|vO*dU(JFYMcZfjeW zN)QUe_*;I$-@Mm&rDEts?&_8)?=JTYfpy)~-3cOkAM%1B7-DIw$c-Ggb@|^oRNS)eF!ZPYha|<|cU*3}3ymCOYZ zWf;7?Dhg9*r=p;}5`~;DPQ&OyNSb&AeduQhm4v%%mIxYAOeC*jwmz)ir&J6w%#>ZX z;;d9-6jNdl|iB!Y^Z|B3PH*r8s5lwB8*hDrNkNa5Eb< zPq1KHr;f0R#g#*ArDcndn_^oQwb(?v&)>>>%_v{DrfUI6agMoeQZG03|EIW58G5Ar ztruZ1JdfZ7_GqLGUNwtl3dHRa4MlIgj;-zlBAm6Vc2VrwEAzILH$ab4ur|dYtZf**+|`i)=v6k=t4JH`S=T2Kdq0?(UU(zY=6Fn z-q=75L+6;tD;Jo``{uJ}xSl!3Y!c7eodK+X*Dd(4JkFO%+;{g%sdU1B6gAO zMwGrO^kRvoa~1t~hyiS2&_lIc&)h&o80dC`aH&|sBWx0nDf+hP+(+-D*v1YNgs_Xf n2Kp6RB}>(JfhXVatcf8^uYpnWA8AoQMH>5b&X6J7ftP;(*~T=} literal 0 HcmV?d00001 diff --git a/Code/ost/_02_web_view/target/classes/org/interstellar/SystemInfo.class b/Code/ost/_02_web_view/target/classes/org/interstellar/SystemInfo.class new file mode 100644 index 0000000000000000000000000000000000000000..45a8179e4805705c18799866dffc9433c3dc2583 GIT binary patch literal 571 zcmaJ<%TB^j5Iw`IP|8EZw=CQca6y+YFm6mtOd2)8urGM2mz36A3X#9kmBxi1;71wf zw)l#~&CH#1&zU)Q+PC+YR{%$77)TNJLgm>qh=iI(!uMTe_ZEDboCl-OK!#8qyK~p} z-N3Ui2V*ge2)Sb!$moQSZngV_%xQQdOr%k;kVTGAabzGaW|M(X*Y3axeL5lVW>=zi%Zk6l7Jfj&nQ%w9NCLvbec(<|Tm>}Vnm zz>DKA0FI;=#?j!)=1iQkhfl~q@*xG2qrTSEB1bDBa4vCGKp7QAw741HFuPWLM(u%- ZpXyw!PQ{w-6`GwD8uLrTKS|tg{{yfZc{u<8 literal 0 HcmV?d00001 diff --git a/Code/ost/_03_event_handling/pom.xml b/Code/ost/_03_event_handling/pom.xml new file mode 100644 index 0000000..23f2001 --- /dev/null +++ b/Code/ost/_03_event_handling/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + com.example + _04_event_handling + 1.0-SNAPSHOT + + UTF-8 + 11 + 11 + + + + org.openjfx + javafx-controls + 13 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.0 + + 11 + + + + org.openjfx + javafx-maven-plugin + 0.0.6 + + + + + default-cli + + com.example.App + + + + + + + diff --git a/Code/ost/_03_event_handling/src/main/java/com/example/App.java b/Code/ost/_03_event_handling/src/main/java/com/example/App.java new file mode 100644 index 0000000..7c1bebf --- /dev/null +++ b/Code/ost/_03_event_handling/src/main/java/com/example/App.java @@ -0,0 +1,28 @@ +package com.example; + +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.control.Button; +import javafx.scene.control.Label; +import javafx.scene.layout.StackPane; +import javafx.stage.Stage; + +public class App extends Application { + private int counter = 0; + + @Override + public void start(Stage stage) { + try { + Button btn = new Button("Click me"); + StackPane root = new StackPane(); + root.getChildren().add(btn); + } catch (Exception e) { + e.printStackTrace(); + } + } + + public static void main(String[] args) { + launch(); + } + +} \ No newline at end of file diff --git a/Code/ost/_03_event_handling/src/main/java/module-info.java b/Code/ost/_03_event_handling/src/main/java/module-info.java new file mode 100644 index 0000000..5918012 --- /dev/null +++ b/Code/ost/_03_event_handling/src/main/java/module-info.java @@ -0,0 +1,4 @@ +module com.example { + requires javafx.controls; + exports com.example; +} diff --git a/Code/ost/_03_event_handling/target/classes/com/example/App.class b/Code/ost/_03_event_handling/target/classes/com/example/App.class new file mode 100644 index 0000000000000000000000000000000000000000..ea82770b742f1261e9ebbf637412afd1fe3f9257 GIT binary patch literal 1167 zcmZ`(TT|0O6#lj?q@?9mZUPpl3bqKu3xZlik{hjlco&*9G`sV zK~Nd}0sbh*Z_`$wgAdv4o;~|r&YtA=pC7*fEMi4NM4;RB%7%3$%N55mRw@+@F@dpt zc_=>~8M0DwY*Pld=c>KtTtG9unj2WYfOsv?zGS<0uq+VG=C%c5tKP1qBZ@>48sZ%g z=uDyw?PM$1uC-n(7cGBF79C3qamZ?AcX;-a?DGyg*wukbWRAlr1zw zGElONO*Q6o+ZqN0Mw?rv!{FV5c=5irOE411u*P42<$`wIsy+|px#o^z-54V|r*Phts+ zY*I(oTyu}=q+eol^<9A@pl^CL-?U!YsyE~8`8kD&41uEjY6K#xkvWTU&gSOW!POGu zf^U8Lluz_4lE+*{(8aMUJgFmw1aozCGnTApqX)fQ@hd=I1L-rfV~kCmp?@bec#3Ol zXBgc%MS6Yq1Yb!^h#LH001I#n_kZ1V2_@E&dqlpFnKI+C7_*TZ_(Vuwq c4NuN(>pZ69#4vopavV>w%(%cajuAZn3vB2Db^rhX literal 0 HcmV?d00001 diff --git a/Code/ost/_03_event_handling/target/classes/module-info.class b/Code/ost/_03_event_handling/target/classes/module-info.class new file mode 100644 index 0000000000000000000000000000000000000000..5e9b472ec74bff92562a22c38f5335636f119ef6 GIT binary patch literal 200 zcmYk0Jr2S!427Qqw6x_<3MXJEjNE{Yi4%m9N<~S7T8cXMTnrq5Lm`rs0T2G{=l3MP zKhGC{Jr*$-Av5;UYPBt^!V=PxZR=beO05X1zmvGiha^PD;O2;3GPg#kPMVum90_6R zJw+#STit7`8;*>Scu|~Xqt=)Yq1`Xk1LQs#iecmihA}3N8$>~7m + 4.0.0 + com.example + _04_several_scenes + 1.0-SNAPSHOT + + UTF-8 + 11 + 11 + + + + org.openjfx + javafx-controls + 13 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.0 + + 11 + + + + org.openjfx + javafx-maven-plugin + 0.0.6 + + + + + default-cli + + com.example.App + + + + + + + diff --git a/Code/ost/_04_several_scenes/src/main/java/com/example/App.java b/Code/ost/_04_several_scenes/src/main/java/com/example/App.java new file mode 100644 index 0000000..f7f7cfc --- /dev/null +++ b/Code/ost/_04_several_scenes/src/main/java/com/example/App.java @@ -0,0 +1,30 @@ +package com.example; + +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.control.Label; +import javafx.scene.layout.StackPane; +import javafx.stage.Stage; + + +/** + * JavaFX App + */ +public class App extends Application { + + @Override + public void start(Stage stage) { + var javaVersion = SystemInfo.javaVersion(); + var javafxVersion = SystemInfo.javafxVersion(); + + var label = new Label("Hello, JavaFX " + javafxVersion + ", running on Java " + javaVersion + "."); + var scene = new Scene(new StackPane(label), 640, 480); + stage.setScene(scene); + stage.show(); + } + + public static void main(String[] args) { + launch(); + } + +} \ No newline at end of file diff --git a/Code/ost/_04_several_scenes/src/main/java/com/example/SystemInfo.java b/Code/ost/_04_several_scenes/src/main/java/com/example/SystemInfo.java new file mode 100644 index 0000000..b566a3e --- /dev/null +++ b/Code/ost/_04_several_scenes/src/main/java/com/example/SystemInfo.java @@ -0,0 +1,13 @@ +package com.example; + +public class SystemInfo { + + public static String javaVersion() { + return System.getProperty("java.version"); + } + + public static String javafxVersion() { + return System.getProperty("javafx.version"); + } + +} \ No newline at end of file diff --git a/Code/ost/_04_several_scenes/src/main/java/module-info.java b/Code/ost/_04_several_scenes/src/main/java/module-info.java new file mode 100644 index 0000000..5918012 --- /dev/null +++ b/Code/ost/_04_several_scenes/src/main/java/module-info.java @@ -0,0 +1,4 @@ +module com.example { + requires javafx.controls; + exports com.example; +}