Class EditExpenseController
java.lang.Object
no.ntnu.idatt1002.spendwise.expenses.EditExpenseController
- All Implemented Interfaces:
javafx.fxml.Initializable
Controller for the AddExpense.fxml window.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Triggers when the add expense button is pressed.void
Triggers when the delete expense button is pressed.void
editCategoryButtonPushed
(javafx.event.ActionEvent event) Method for handling the button that is used to go to the add category page.void
Method for filling the table view with the transactions.void
goHome
(javafx.event.ActionEvent event) Method for handling button that is used to go to the home page.void
initialize
(URL url, ResourceBundle resourceBundle) Initalizes the controller class.void
openHelpEdit
(javafx.event.ActionEvent event) A button that opens the help option menu.void
switchToEditIncome
(javafx.event.ActionEvent event) Button that takes user to edit income.void
switchToFutureBudgeting
(javafx.event.ActionEvent event) Button that takes user to future budgeting.void
switchToIncome
(javafx.event.ActionEvent event) Button that takes user to income.void
switchToRecurringTransactions
(javafx.event.ActionEvent event) Button that takes user to recurring transactions.
-
Constructor Details
-
EditExpenseController
public EditExpenseController() throws DuplicateNameException, IOException, URISyntaxException, ConformityExceptionInitializes the controller class.
-
-
Method Details
-
deleteExpensePressed
Triggers when the delete expense button is pressed.- Throws:
ConformityException
- If the transaction is not an expense.
-
addExpensePressed
Triggers when the add expense button is pressed.- Throws:
ConformityException
- If the transaction is not an expense.IOException
- If the database file is not found.
-
initialize
Initalizes the controller class.- Specified by:
initialize
in interfacejavafx.fxml.Initializable
- Parameters:
url
- The url of the fxml file.resourceBundle
- The resource bundle.
-
fillTableView
public void fillTableView()Method for filling the table view with the transactions. -
editCategoryButtonPushed
Method for handling the button that is used to go to the add category page.- Parameters:
event
- Mouse click.- Throws:
IOException
- If the fxml file is not found.
-
goHome
Method for handling button that is used to go to the home page.- Parameters:
event
- The ActionEvent that triggered the method- Throws:
IOException
- If SpendWiseHomePage.fxml is not found in resources
-
switchToIncome
Button that takes user to income.- Parameters:
event
- mouse click.- Throws:
IOException
- if wrong input detected.
-
switchToRecurringTransactions
Button that takes user to recurring transactions.- Parameters:
event
- mouse click.- Throws:
IOException
- if wrong input detected.
-
switchToEditIncome
Button that takes user to edit income.- Parameters:
event
- mouse click.- Throws:
IOException
- if wrong input detected.
-
switchToFutureBudgeting
Button that takes user to future budgeting.- Parameters:
event
- mouse click.- Throws:
IOException
- if wrong input detected.
-
openHelpEdit
A button that opens the help option menu.- Parameters:
event
- - mouse click- Throws:
IOException
- - if wrong input detected
-