diff --git a/src/main/resources/view/BudgetNew.fxml b/src/main/resources/view/BudgetNew.fxml index 3414dfcccfebfe97b66eaf32478c8ef1ced9844c..c8ce2d395c1564e2d8098a8adde107fbd17b653b 100644 --- a/src/main/resources/view/BudgetNew.fxml +++ b/src/main/resources/view/BudgetNew.fxml @@ -19,7 +19,7 @@ <?import javafx.scene.text.Font?> <?import javafx.scene.text.Text?> -<AnchorPane xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="no.ntnu.idatt1002.demo.controller.IncomeController"> +<AnchorPane xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="no.ntnu.idatt1002.demo.controller.BudgetController"> <children> <ImageView fitHeight="400.0" fitWidth="600.0" pickOnBounds="true"> <image> @@ -42,7 +42,7 @@ </HBox.margin> </Button> <Region prefHeight="70.0" prefWidth="141.0" /> - <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Income" textAlignment="CENTER" wrappingWidth="174.6796875"> + <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Budget" textAlignment="CENTER" wrappingWidth="174.6796875"> <HBox.margin> <Insets /> </HBox.margin> @@ -73,7 +73,7 @@ <children> <HBox alignment="BOTTOM_LEFT" prefWidth="410.0" spacing="5.0"> <children> - <Button fx:id="addBtn" alignment="TOP_CENTER" mnemonicParsing="false" onAction="#handleAddButton" text="Add" textAlignment="CENTER"> + <Button fx:id="addBtn" alignment="TOP_CENTER" mnemonicParsing="false" onAction="#switchAddBudget" text="Add" textAlignment="CENTER"> <graphic> <ImageView fitHeight="19.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true"> <image> @@ -82,7 +82,7 @@ </ImageView> </graphic> </Button> - <Button fx:id="editBtn" alignment="TOP_CENTER" mnemonicParsing="false" onAction="#handleEditButton" text="Edit" textAlignment="CENTER"> + <Button fx:id="editBtn" alignment="TOP_CENTER" mnemonicParsing="false" onAction="#switchAddBudget" text="Edit" textAlignment="CENTER"> <graphic> <ImageView fitHeight="19.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true"> <image> @@ -91,7 +91,7 @@ </ImageView> </graphic> </Button> - <Button fx:id="deleteBtn" alignment="TOP_CENTER" mnemonicParsing="false" onAction="#handleDeleteBtn" text="Delete" textAlignment="CENTER"> + <Button fx:id="deleteBtn" alignment="TOP_CENTER" mnemonicParsing="false" onAction="#deleteButton" text="Delete" textAlignment="CENTER"> <graphic> <ImageView fitHeight="19.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true"> <image> @@ -122,8 +122,8 @@ </VBox> <HBox prefHeight="100.0" prefWidth="200.0" GridPane.columnSpan="2" GridPane.rowIndex="2"> <children> - <Button disable="true" mnemonicParsing="false" text="Income" /> - <Button fx:id="budgetBtn" mnemonicParsing="false" onAction="#switchScene" text="Budget" /> + <Button mnemonicParsing="false" text="Income" /> + <Button fx:id="budgetBtn" disable="true" mnemonicParsing="false" onAction="#switchScene" text="Budget" /> <Button fx:id="expenseBtn" mnemonicParsing="false" onAction="#switchScene" text="Expenses" /> <Button mnemonicParsing="false" onAction="#switchScene" text="Next"> <HBox.margin> @@ -137,11 +137,10 @@ </HBox> <TableView fx:id="incomeTableView" prefHeight="260.0" prefWidth="485.0" GridPane.columnSpan="2" GridPane.rowIndex="1"> <columns> - <TableColumn fx:id="dateColumn" prefWidth="75.0" text="Date" /> + <TableColumn fx:id="categoryColumn" prefWidth="75.0" text="Category/Title" /> + <TableColumn fx:id="percentageColumn" prefWidth="75.0" text="Percentage" /> <TableColumn fx:id="amountColumn" prefWidth="75.0" text="Amount" /> - <TableColumn fx:id="categoryColumn" prefWidth="75.0" text="Category" /> <TableColumn fx:id="descriptionColumn" prefWidth="75.0" text="Description" /> - <TableColumn fx:id="recurringColumn" prefWidth="75.0" text="Recurring" /> </columns> <columnResizePolicy> <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />