summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2021-11-29 20:54:48 +0000
committerjwansek <eddie.atten.ea29@gmail.com>2021-11-29 20:54:48 +0000
commit63ddd9e636e374bb3a3a3fe8a97ab26c6abc04c9 (patch)
tree86bc9ec8874429b37895942d44ab6762c1c7a55c
parent23df8ac74740bff51382d2b7fd19945d04e865f1 (diff)
downloadesotericFORTRAN-63ddd9e636e374bb3a3a3fe8a97ab26c6abc04c9.tar.gz
esotericFORTRAN-63ddd9e636e374bb3a3a3fe8a97ab26c6abc04c9.zip
added hello world javafx program
-rw-r--r--.gitignore1
-rw-r--r--src/IDE/IDE/HelloApplication.java25
-rw-r--r--src/IDE/IDE/HelloController.java14
-rw-r--r--src/IDE/IDE/hello-view.fxml16
-rw-r--r--src/IDE/Makefile5
-rw-r--r--src/IDE/readme.md19
-rw-r--r--src/UI/.gitkeep0
7 files changed, 80 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index be47fdb..84253af 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
src/.vscode/
src/build/
*.jar
+src/IDE/.idea/
*.class
code/simpleSableCCCalulator/sableCCCalculator/analysis/
diff --git a/src/IDE/IDE/HelloApplication.java b/src/IDE/IDE/HelloApplication.java
new file mode 100644
index 0000000..aaa728f
--- /dev/null
+++ b/src/IDE/IDE/HelloApplication.java
@@ -0,0 +1,25 @@
+package IDE;
+
+import javafx.application.Application;
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Scene;
+import javafx.stage.Stage;
+import java.io.File;
+import javafx.scene.Parent;
+
+import java.io.IOException;
+
+public class HelloApplication extends Application {
+ @Override
+ public void start(Stage stage) throws IOException {
+ Parent root = FXMLLoader.load(getClass().getResource("hello-view.fxml"));
+ Scene scene = new Scene(root, 320, 240);
+ stage.setTitle("Hello!");
+ stage.setScene(scene);
+ stage.show();
+ }
+
+ public static void main(String[] args) {
+ launch();
+ }
+} \ No newline at end of file
diff --git a/src/IDE/IDE/HelloController.java b/src/IDE/IDE/HelloController.java
new file mode 100644
index 0000000..877e5ba
--- /dev/null
+++ b/src/IDE/IDE/HelloController.java
@@ -0,0 +1,14 @@
+package IDE;
+
+import javafx.fxml.FXML;
+import javafx.scene.control.Label;
+
+public class HelloController {
+ @FXML
+ private Label welcomeText;
+
+ @FXML
+ protected void onHelloButtonClick() {
+ welcomeText.setText("Welcome to the FORTRAN compiler application!");
+ }
+} \ No newline at end of file
diff --git a/src/IDE/IDE/hello-view.fxml b/src/IDE/IDE/hello-view.fxml
new file mode 100644
index 0000000..c31d9e2
--- /dev/null
+++ b/src/IDE/IDE/hello-view.fxml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?import javafx.geometry.Insets?>
+<?import javafx.scene.control.Label?>
+<?import javafx.scene.layout.VBox?>
+
+<?import javafx.scene.control.Button?>
+<VBox alignment="CENTER" spacing="20.0" xmlns:fx="http://javafx.com/fxml"
+ fx:controller="IDE.HelloController">
+ <padding>
+ <Insets bottom="20.0" left="20.0" right="20.0" top="20.0"/>
+ </padding>
+
+ <Label fx:id="welcomeText"/>
+ <Button text="Hello!" onAction="#onHelloButtonClick"/>
+</VBox>
diff --git a/src/IDE/Makefile b/src/IDE/Makefile
new file mode 100644
index 0000000..127db02
--- /dev/null
+++ b/src/IDE/Makefile
@@ -0,0 +1,5 @@
+all:
+ javac --module-path ../../../javafx-sdk-17.0.1/lib/ --add-modules javafx.controls,javafx.fxml ./IDE/*.java
+
+clean:
+ rm -vf IDE/*.class
diff --git a/src/IDE/readme.md b/src/IDE/readme.md
new file mode 100644
index 0000000..0dc9faa
--- /dev/null
+++ b/src/IDE/readme.md
@@ -0,0 +1,19 @@
+# esotericFORTRAN IDE
+
+## Setting Up
+
+Install FXML from [here](https://gluonhq.com/products/javafx/) and extract it in the directory behind `EsotericProject`
+
+## Running
+
+To compile, simply run `make`. Then to run:
+
+`java --module-path ..\..\..\javafx-sdk-17.0.1\lib\ --add-modules javafx.controls,javafx.fxml IDE.HelloApplication`
+
+## Editors?
+
+If you got intellisense and stuff to work in vscodium, well done, coz I couldn't do that :3
+
+### IntelliJ
+
+I hate IntelliJ but its the only way I could get a working intellisense. Right click on this folder and select 'Open Folder as an IntelliJ IDEA Community Edition Project', then follow [this](https://openjfx.io/openjfx-docs/#install-javafx) guide (select 'JavaFX and IntelliJ' in the website sidebar). \ No newline at end of file
diff --git a/src/UI/.gitkeep b/src/UI/.gitkeep
deleted file mode 100644
index e69de29..0000000
--- a/src/UI/.gitkeep
+++ /dev/null