Class BudgetBarController
java.lang.Object
no.ntnu.idatt1002.demo.controller.BudgetBarController
The BudgetBarController manages the component view BudgetBar.fxml that may be dynamically loaded
to other views. The view consists of a HBox containing three elements; a label stating the name
of the budget post (BudgetItem class), a progress bar showing how much money is left at this post
according to the budget and the user's recorded expenses and a label stating how much money are
left on the particular budget.
- Author:
- hannesofie
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
setData
(BudgetItem budgetItem, double leftovers) The setData method is called to fill the BudgetBar instance with information of a particular Budget post (BudgetItem), that is the name of the budget, it's progress bar and money left.
-
Constructor Details
-
BudgetBarController
public BudgetBarController()
-
-
Method Details
-
setData
The setData method is called to fill the BudgetBar instance with information of a particular Budget post (BudgetItem), that is the name of the budget, it's progress bar and money left. The information needed for this are taken in as two parameters; the BudgetItem object to represent and a double value representing the money left of this budget.- Parameters:
budgetItem
- A BudgetItem object to represent in the BudgetBar instance.leftovers
- A double value representing the money the user has left on this particular BudgetItem.
-