This commit is contained in:
2024-04-15 15:06:42 +02:00
commit 5d65b097f7
13 changed files with 746 additions and 0 deletions

View File

@ -0,0 +1,23 @@
package fabrik.simulator.pic16f84;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.stage.Stage;
import java.io.IOException;
public class HelloApplication extends Application {
@Override
public void start(Stage stage) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("hello-view.fxml"));
Scene scene = new Scene(fxmlLoader.load(), 320, 240);
stage.setTitle("Hello!");
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch();
}
}

View File

@ -0,0 +1,14 @@
package fabrik.simulator.pic16f84;
import javafx.fxml.FXML;
import javafx.scene.control.Label;
public class HelloController {
@FXML
private Label welcomeText;
@FXML
protected void onHelloButtonClick() {
welcomeText.setText("Welcome to JavaFX Application!");
}
}

View File

@ -0,0 +1,12 @@
module fabrik.simulator.pic16f84 {
requires javafx.controls;
requires javafx.fxml;
requires javafx.web;
requires org.controlsfx.controls;
requires org.kordamp.ikonli.javafx;
requires eu.hansolo.tilesfx;
opens fabrik.simulator.pic16f84 to javafx.fxml;
exports fabrik.simulator.pic16f84;
}

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<VBox alignment="CENTER" spacing="20.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/17.0.2-ea" fx:controller="fabrik.simulator.pic16f84.HelloController">
<padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
</padding>
<TitledPane animated="false" text="untitled">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" />
</content>
</TitledPane>
<Label fx:id="welcomeText" />
<Button onAction="#onHelloButtonClick" text="Hello!" />
</VBox>