properly configured maven plugin

This commit is contained in:
Sem van der Hoeven
2019-12-27 20:55:01 +01:00
parent 2c3b5f2487
commit a9213d6169
7 changed files with 42 additions and 19 deletions

View File

@@ -0,0 +1,21 @@
package brainfuck.gui;
import javafx.fxml.FXML;
import javafx.scene.control.Menu;
import javafx.scene.control.MenuBar;
import javafx.scene.control.MenuItem;
public class Controller {
@FXML
MenuBar menuBar;
@FXML
MenuItem saveMenu;
public void initialize() {
saveMenu.setOnAction(e -> {
System.out.println("menu clicked");
});
}
}

View File

@@ -1,5 +0,0 @@
package brainfuck.interpreter;
public class Controller {
}

View File

@@ -18,14 +18,6 @@ public class Main extends Application {
public static void main(String[] args) {
String excl = ">,[[----------[ >>>[>>>>]+[[-]+<[->>>>++>>>>+[>>>>]++[->+<<<<<]]<<<] ++++++[>------<-]>--[>>[->>>>]+>+[<<<<]>-],< ]> ]>>>++>+>>[ <<[>>>>[-]+++++++++<[>-<-]+++++++++>[-[<->-]+[<<<<]]<[>+<-]>] >[>[>>>>]+[[-]<[+[->>>>]>+<]>[<+>[<<<<]]+<<<<]>>>[->>>>]+>+[<<<<]] >[[>+>>[<<<<+>>>>-]>]<<<<[-]>[-<<<<]]>>>>>>> ]>>+[[-]++++++>>>>]<<<<[[<++++++++>-]<.[-]<[-]<[-]<]<, ]";
launch(Main.class);
// try {
// BfInterpreter interpreter = new BfInterpreter(",.");
// interpreter.setCodeFromFile("mandelbrot-tiny.bf");
// interpreter.interpret();
// // interpreter.interpretAgain(excl);
// } catch (Exception e) {
// e.printStackTrace();
// }
}
@@ -33,6 +25,7 @@ public class Main extends Application {
public void start(Stage stage) throws Exception {
Parent pane = FXMLLoader.load(getClass().getResource("/fxml/layout.fxml"));
Scene scene = new Scene(pane);
stage.setTitle("Brainfuck Interpreter");
stage.setScene(scene);
stage.show();

View File

@@ -6,9 +6,17 @@
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
fx:controller="brainfuck.interpreter.Controller"
prefHeight="400.0" prefWidth="600.0">
<AnchorPane prefHeight="800.0" prefWidth="1200.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="brainfuck.gui.Controller">
<children>
<MenuBar fx:id="menuBar" layoutY="2.0">
<menus>
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem fx:id="saveMenu" mnemonicParsing="false" text="Save" />
</items>
</Menu>
</menus>
</MenuBar>
</children>
</AnchorPane>