Skip to content

Commit

Permalink
made the error message for running machine resizable
Browse files Browse the repository at this point in the history
  • Loading branch information
jherman1997 committed Oct 29, 2020
1 parent 083988a commit 2a72bda
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 0 deletions.
Binary file modified out/STEM.jar
Binary file not shown.
Binary file modified out/classes/Editor$1.class
Binary file not shown.
Binary file modified out/classes/Editor$2.class
Binary file not shown.
Binary file modified out/classes/Editor$3.class
Binary file not shown.
Binary file modified out/classes/Editor$4$1.class
Binary file not shown.
Binary file modified out/classes/Editor$4.class
Binary file not shown.
Binary file modified out/classes/Editor$5.class
Binary file not shown.
Binary file modified out/classes/Editor$6.class
Binary file not shown.
Binary file modified out/classes/Editor.class
Binary file not shown.
3 changes: 3 additions & 0 deletions src/Editor.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ private boolean deleteEditor(Stage window, Scene prev, Machine m){
ButtonType cancel = new ButtonType("Cancel", ButtonBar.ButtonData.CANCEL_CLOSE);

Alert saveAlert = new Alert(Alert.AlertType.WARNING, "You have not saved your machine, would you like to?");
saveAlert.setResizable(true);
saveAlert.initOwner(window);
saveAlert.initModality(Modality.APPLICATION_MODAL);
saveAlert.setTitle("Warning!");
Expand Down Expand Up @@ -289,6 +290,7 @@ private ToolBar initMenuBar(Stage window, Scene prev){
runMachine.setOnAction(e-> {
if(currentMachine.getStartState() == null){
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setResizable(true);
alert.initOwner(window);
alert.initModality(Modality.APPLICATION_MODAL);
alert.setTitle("The machine has finished");
Expand All @@ -305,6 +307,7 @@ private ToolBar initMenuBar(Stage window, Scene prev){
currentMachine.setSpeed(-1);
if(currentMachine.getStartState() == null){
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setResizable(true);
alert.initOwner(window);
alert.initModality(Modality.APPLICATION_MODAL);
alert.setTitle("The machine has finished");
Expand Down

0 comments on commit 2a72bda

Please sign in to comment.