properly configured maven plugin
This commit is contained in:
21
src/main/java/brainfuck/gui/Controller.java
Normal file
21
src/main/java/brainfuck/gui/Controller.java
Normal 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");
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package brainfuck.interpreter;
|
||||
|
||||
public class Controller {
|
||||
|
||||
}
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user