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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidTriggers when the add expense button is pressed.voidTriggers when the delete expense button is pressed.voideditCategoryButtonPushed(javafx.event.ActionEvent event) Method for handling the button that is used to go to the add category page.voidMethod for filling the table view with the transactions.voidgoHome(javafx.event.ActionEvent event) Method for handling button that is used to go to the home page.voidinitialize(URL url, ResourceBundle resourceBundle) Initalizes the controller class.voidopenHelpEdit(javafx.event.ActionEvent event) A button that opens the help option menu.voidswitchToEditIncome(javafx.event.ActionEvent event) Button that takes user to edit income.voidswitchToFutureBudgeting(javafx.event.ActionEvent event) Button that takes user to future budgeting.voidswitchToIncome(javafx.event.ActionEvent event) Button that takes user to income.voidswitchToRecurringTransactions(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:
initializein 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
-