summaryrefslogtreecommitdiffhomepage
path: root/IDE
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-14 11:54:23 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-14 11:54:31 +0100
commitaa4ffd40714feb73622d7e814f43e84b1b1cfaf1 (patch)
tree8043a059409bfb2af792d50a157a992f4fa0a2d8 /IDE
parentabb79c6a6d5e511f2a91434d2b33325d0285c522 (diff)
IDE: Add Java code for embedded IDE.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'IDE')
-rw-r--r--IDE/pom.xml39
-rw-r--r--IDE/src/main/java/module-info.java4
-rw-r--r--IDE/src/main/java/org/elmahrouss/App.java38
-rw-r--r--IDE/src/main/java/org/elmahrouss/SystemInfo.java13
4 files changed, 94 insertions, 0 deletions
diff --git a/IDE/pom.xml b/IDE/pom.xml
new file mode 100644
index 0000000..98cf221
--- /dev/null
+++ b/IDE/pom.xml
@@ -0,0 +1,39 @@
+<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>org.elmahrouss</groupId>
+ <artifactId>IDE</artifactId>
+ <version>1.0.0</version>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <maven.compiler.source>11</maven.compiler.source>
+ <maven.compiler.target>11</maven.compiler.target>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.openjfx</groupId>
+ <artifactId>javafx-controls</artifactId>
+ <version>21.0.1</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.8.0</version>
+ <configuration>
+ <release>11</release>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.openjfx</groupId>
+ <artifactId>javafx-maven-plugin</artifactId>
+ <version>0.0.3</version>
+ <configuration>
+ <mainClass>org.elmahrouss.App</mainClass>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project> \ No newline at end of file
diff --git a/IDE/src/main/java/module-info.java b/IDE/src/main/java/module-info.java
new file mode 100644
index 0000000..c928630
--- /dev/null
+++ b/IDE/src/main/java/module-info.java
@@ -0,0 +1,4 @@
+module org.elmahrouss {
+ requires javafx.controls;
+ exports org.elmahrouss;
+} \ No newline at end of file
diff --git a/IDE/src/main/java/org/elmahrouss/App.java b/IDE/src/main/java/org/elmahrouss/App.java
new file mode 100644
index 0000000..3b2cd3f
--- /dev/null
+++ b/IDE/src/main/java/org/elmahrouss/App.java
@@ -0,0 +1,38 @@
+package org.elmahrouss;
+
+import javafx.application.Application;
+import javafx.scene.Scene;
+import javafx.scene.control.Label;
+import javafx.scene.layout.StackPane;
+import javafx.scene.layout.VBox;
+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();
+
+ stage.setTitle("CDE");
+
+ var labelCde = new Label("CDE");
+ var labelVer = new Label(javafxVersion + ", running on Java " + javaVersion + ".");
+
+ var labelPane = new VBox();
+ labelPane.setSpacing(10);
+ labelPane.getChildren().addAll(labelCde, labelVer);
+
+ var scene = new Scene(labelPane, 1280, 720);
+ stage.setScene(scene);
+ stage.show();
+ }
+
+ public static void main(String[] args) {
+ launch();
+ }
+
+} \ No newline at end of file
diff --git a/IDE/src/main/java/org/elmahrouss/SystemInfo.java b/IDE/src/main/java/org/elmahrouss/SystemInfo.java
new file mode 100644
index 0000000..c8e3f68
--- /dev/null
+++ b/IDE/src/main/java/org/elmahrouss/SystemInfo.java
@@ -0,0 +1,13 @@
+package org.elmahrouss;
+
+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