Skip to content
Snippets Groups Projects
Commit c5c1a6f0 authored by Harry Linrui XU's avatar Harry Linrui XU
Browse files

Renamed method + Implemented new buttons in BudgetNewest.fxml

parent 52fc3b33
No related branches found
No related tags found
1 merge request!43Merging frontend-testing into master
...@@ -51,9 +51,8 @@ public interface FinanceController { ...@@ -51,9 +51,8 @@ public interface FinanceController {
void saveDataToFile() throws IOException; void saveDataToFile() throws IOException;
/** /**
* Switches scenes back to main menu, by loading a new FXML file and setting the scene to this location. * Switches scenes, by loading a new FXML file and setting the scene to this location.
* @param event A button click on the return to main menu button * @param event A button click on the return to main menu button
* @throws IOException If an error occurs with loading any of the FXML files.
*/ */
void returnToMainMenu(javafx.event.ActionEvent event) throws IOException; void switchScene(javafx.event.ActionEvent event);
} }
...@@ -581,7 +581,7 @@ public class IncomeExpenseController implements FinanceController { ...@@ -581,7 +581,7 @@ public class IncomeExpenseController implements FinanceController {
* @param event A button click on the return to main menu button * @param event A button click on the return to main menu button
*/ */
@FXML @FXML
public void returnToMainMenu(javafx.event.ActionEvent event) { public void switchScene(javafx.event.ActionEvent event) {
try { try {
saveDataToFile(); saveDataToFile();
FXMLLoader loader = new FXMLLoader(); FXMLLoader loader = new FXMLLoader();
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<left> <left>
<Pane prefWidth="175.0" BorderPane.alignment="CENTER"> <Pane prefWidth="175.0" BorderPane.alignment="CENTER">
<children> <children>
<Button fx:id="returnBtn" alignment="CENTER" layoutX="-2.0" layoutY="58.0" mnemonicParsing="false" onAction="#returnToMainMenu" text="Return to Main Menu"> <Button fx:id="returnBtn" alignment="CENTER" layoutX="-2.0" layoutY="58.0" mnemonicParsing="false" onAction="#switchScene" text="Return to Main Menu">
<font> <font>
<Font name="Lucida Console" size="14.0" /> <Font name="Lucida Console" size="14.0" />
</font> </font>
...@@ -177,6 +177,8 @@ ...@@ -177,6 +177,8 @@
<Insets top="10.0" /> <Insets top="10.0" />
</VBox.margin> </VBox.margin>
</TableView> </TableView>
<Button fx:id="backBtn" mnemonicParsing="false" text="back" />
<Button fx:id="continueBtn" mnemonicParsing="false" text="continue" />
</children> </children>
<GridPane.margin> <GridPane.margin>
<Insets top="30.0" /> <Insets top="30.0" />
......
...@@ -85,12 +85,12 @@ ...@@ -85,12 +85,12 @@
</StackPane> </StackPane>
<HBox alignment="CENTER_RIGHT" GridPane.columnIndex="1" GridPane.rowIndex="2"> <HBox alignment="CENTER_RIGHT" GridPane.columnIndex="1" GridPane.rowIndex="2">
<children> <children>
<Button fx:id="returnBtn1" mnemonicParsing="false" onAction="#returnToMainMenu" prefWidth="100.0" text="Back"> <Button fx:id="backBtn" mnemonicParsing="false" onAction="#switchScene" prefWidth="100.0" text="Back">
<font> <font>
<Font size="14.0" /> <Font size="14.0" />
</font> </font>
</Button> </Button>
<Button fx:id="returnBtn2" mnemonicParsing="false" onAction="#returnToMainMenu" prefWidth="100.0" text="Continue"> <Button fx:id="continueBtn" mnemonicParsing="false" onAction="#switchScene" prefWidth="100.0" text="Continue">
<font> <font>
<Font size="14.0" /> <Font size="14.0" />
</font> </font>
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<Button fx:id="returnBtn" alignment="CENTER" mnemonicParsing="false" onAction="#returnToMainMenu" text="Return to Main Menu"> <Button fx:id="returnBtn" alignment="CENTER" mnemonicParsing="false" onAction="#switchScene" text="Return to Main Menu">
<font> <font>
<Font size="14.0" /> <Font size="14.0" />
</font> </font>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment