Class GuiManager

java.lang.Object
GuiManager

public class GuiManager extends Object
Class responsible for managing the graphical user interface (GUI) of the application.
  • Constructor Details

    • GuiManager

      public GuiManager()
      Constructs a new GUI.
  • Method Details

    • getTimetableData

      public TimetableData getTimetableData(int timeframe, String login, String password, String arg) throws IOException, InterruptedException, ExecutionException
      Scrapes the timetable. Displays a loading message and scraper in the background.
      Parameters:
      timeframe - The number of days to look ahead for the timetable.
      login - The login username.
      password - The login password.
      arg - Additional argument for the web driver, such as "--headless".
      Returns:
      The TimetableData obtained from the scraper.
      Throws:
      IOException - If an I/O error occurs while reading the configuration file.
      InterruptedException - If the thread is interrupted while waiting.
      ExecutionException - If an error occurs during the execution of the timetable scraper.
    • displaytimetable

      public void displaytimetable(String[][] timetable)
      Displays the timetable on the GUI.
      Parameters:
      timetable - The timetable data to be displayed.
    • close

      public void close()
      Closes the GUI.