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

Binded date and descriptionfields in dialog box with the chosen expense values

parent 672d2783
No related branches found
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
......@@ -71,12 +71,10 @@ public class AddExpenseController {
public void setExpense(Expense expense) {
this.newExpense = expense;
StringProperty dateProperty = new SimpleStringProperty(expense.getDate());
StringProperty descriptionProperty = new SimpleStringProperty(expense.getDescription());
dateField.textProperty().bindBidirectional(dateProperty);
dateField.textProperty().bindBidirectional(expense.dateProperty());
amountField.textProperty().bindBidirectional(expense.amountProperty(), NumberFormat.getNumberInstance());
descriptionField.textProperty().bindBidirectional(descriptionProperty);
descriptionField.textProperty().bindBidirectional(expense.descriptionProperty());
}
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