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

Made recurringbox contain booleans. Binded this value to the expense recurring property

parent 362c5048
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
......@@ -48,7 +48,7 @@ public class AddExpenseController {
private ComboBox<ExpenseCategory> categoryBox;
@FXML
private ComboBox<String> recurringBox;
private ComboBox<Boolean> recurringBox;
@FXML
public void initialize() {
......@@ -57,9 +57,9 @@ public class AddExpenseController {
categoryBox.setItems(expenseCategories);
categoryBox.setValue(ExpenseCategory.FOOD);
ObservableList<String> recurring = FXCollections.observableArrayList("Yes", "No");
ObservableList<Boolean> recurring = FXCollections.observableArrayList(true, false);
recurringBox.setItems(recurring);
recurringBox.setValue("No");
recurringBox.setValue(false);
System.out.print("This is in initialize");
System.out.println(descriptionField);
......@@ -77,6 +77,8 @@ public class AddExpenseController {
dateField.textProperty().bindBidirectional(expense.dateProperty());
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());
}
public void pressOkBtn(ActionEvent event) {
String date = dateField.getText();
......
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