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

Set the comboboxes to default values. Added comment to setExpenses, because...

Set the comboboxes to default values. Added comment to setExpenses, because amount textfield is stored with comma, which is not a double
parent 6345a998
Branches fix/navbar-type
No related tags found
10 merge requests!43Merging frontend-testing into master,!38"Made progressbar dynamic in accordance to spending. Added balance field....,!37Made the sub progress bars respond to changes in expense,!32Added input validation to add dialog boxes.,!30Redesigned scenes,!29Redesigned scenes,!28Redesigned scenes,!26Redesigned Main menu and expense/income windows,!24Merging frontend-testing with master,!23Merging frontend-testing and master
......@@ -55,9 +55,11 @@ public class AddExpenseController {
ObservableList<ExpenseCategory> expenseCategories = FXCollections.observableArrayList(
ExpenseCategory.values());
categoryBox.setItems(expenseCategories);
categoryBox.setValue(ExpenseCategory.FOOD);
ObservableList<String> recurring = FXCollections.observableArrayList("Yes", "No");
recurringBox.setItems(recurring);
recurringBox.setValue("No");
System.out.print("This is in initialize");
System.out.println(descriptionField);
......@@ -72,11 +74,8 @@ public class AddExpenseController {
}
public void setExpense(Expense expense) { //TODO NEED CANCEL BUTTON TO REMOVE THE CHANGES IF CANCEL IS PRESSED
this.newExpense = expense;
this.oldExpense = expense;
dateField.textProperty().bindBidirectional(expense.dateProperty());
amountField.textProperty().bindBidirectional(expense.amountProperty(), NumberFormat.getNumberInstance());
amountField.textProperty().bindBidirectional(expense.amountProperty(), NumberFormat.getNumberInstance()); //TODO AMOUNT IS STORED WITH COMMA, WHICH IS NOT ALLOWED
descriptionField.textProperty().bindBidirectional(expense.descriptionProperty());
}
public void pressOkBtn(ActionEvent event) {
......
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