diff --git a/src/main/java/no/ntnu/idatt1002/demo/controller/AddExpenseController.java b/src/main/java/no/ntnu/idatt1002/demo/controller/AddExpenseController.java index 21d8bc4f496191d05972419fb579b04fe8ff01f4..b1a4691aed3728537fa2aa323ff9abc57eebf01e 100644 --- a/src/main/java/no/ntnu/idatt1002/demo/controller/AddExpenseController.java +++ b/src/main/java/no/ntnu/idatt1002/demo/controller/AddExpenseController.java @@ -24,11 +24,6 @@ public class AddExpenseController { Expense chosenExpense = null; //an expense that is meant to track the old state of an expense before editing, in case cancel bugtton is clicked - Income newIncome = null; - - Income chosenIncome = null; - - private ItemMode itemMode; @FXML private Button cancelBtn; @@ -83,14 +78,6 @@ public class AddExpenseController { descriptionField.textProperty().set(expense.getDescription()); amountField.textProperty().setValue(String.valueOf(expense.getAmount())); recurringBox.setValue(expense.isRecurring()); - - //new SimpleStringProperty(datePicker.getValue().toString()).bindBidirectional(new SimpleStringProperty(expense.getDate().toString())); - //Bind this expense's fields with the argument object's fields. If cancel is pressed - do nothing. If ok is pressed, bind the textfields with this expsense - - /*amountField.textProperty().bindBidirectional(expense.amountProperty(), NumberFormat.getNumberInstance()); //TODO AMOUNT IS STORED WITH COMMA, WHICH IS NOT ALLOWED - descriptionField.textProperty().bindBidirectional(expense.descriptionProperty()); - //categoryBox.valueProperty().bindBidirectional(expense.getCategory()); - recurringBox.valueProperty().bindBidirectional(expense.recurringProperty());*/ } @FXML diff --git a/src/main/resources/view/AddIncome.fxml b/src/main/resources/view/AddIncome.fxml index be30573fe60ef444b6ff13c29316414efe8e77b9..abdfe7c23fbc862d64b6015d99064875cfd22693 100644 --- a/src/main/resources/view/AddIncome.fxml +++ b/src/main/resources/view/AddIncome.fxml @@ -12,7 +12,7 @@ <?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.RowConstraints?> -<DialogPane expanded="true" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="no.ntnu.idatt1002.demo.controller.AddExpenseController"> +<DialogPane expanded="true" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="no.ntnu.idatt1002.demo.controller.AddIncomeController"> <content> <GridPane> <columnConstraints>