Class EditExpenseController

java.lang.Object
no.ntnu.idatt1002.spendwise.expenses.EditExpenseController
All Implemented Interfaces:
javafx.fxml.Initializable

public class EditExpenseController extends Object implements javafx.fxml.Initializable
Controller for the AddExpense.fxml window.
  • Constructor Details

  • Method Details

    • deleteExpensePressed

      public void deleteExpensePressed() throws ConformityException
      Triggers when the delete expense button is pressed.
      Throws:
      ConformityException - If the transaction is not an expense.
    • addExpensePressed

      public void addExpensePressed() throws ConformityException, IOException
      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

      public void initialize(URL url, ResourceBundle resourceBundle)
      Initalizes the controller class.
      Specified by:
      initialize in interface javafx.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

      public void editCategoryButtonPushed(javafx.event.ActionEvent event) throws IOException
      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

      public void goHome(javafx.event.ActionEvent event) throws IOException
      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

      public void switchToIncome(javafx.event.ActionEvent event) throws IOException
      Button that takes user to income.
      Parameters:
      event - mouse click.
      Throws:
      IOException - if wrong input detected.
    • switchToRecurringTransactions

      public void switchToRecurringTransactions(javafx.event.ActionEvent event) throws IOException
      Button that takes user to recurring transactions.
      Parameters:
      event - mouse click.
      Throws:
      IOException - if wrong input detected.
    • switchToEditIncome

      public void switchToEditIncome(javafx.event.ActionEvent event) throws IOException
      Button that takes user to edit income.
      Parameters:
      event - mouse click.
      Throws:
      IOException - if wrong input detected.
    • switchToFutureBudgeting

      public void switchToFutureBudgeting(javafx.event.ActionEvent event) throws IOException
      Button that takes user to future budgeting.
      Parameters:
      event - mouse click.
      Throws:
      IOException - if wrong input detected.
    • openHelpEdit

      public void openHelpEdit(javafx.event.ActionEvent event) throws IOException
      A button that opens the help option menu.
      Parameters:
      event - - mouse click
      Throws:
      IOException - - if wrong input detected