Package Controllers

Class LoginController

java.lang.Object
Controllers.LoginController
All Implemented Interfaces:
javafx.fxml.Initializable

public class LoginController extends Object implements javafx.fxml.Initializable
Controller class for the Login.fmxl form. Implements Initializable
  • Constructor Details

    • LoginController

      public LoginController()
  • Method Details

    • getTimezone

      public static TimeZone getTimezone()
      Returns:
      [TimeZone] timezone of the system
    • getLanguage

      public static String getLanguage()
      Returns:
      [String] language of the system
    • getUser

      public static User getUser()
      Returns:
      [User] user that has loggged in
    • getRb

      public static ResourceBundle getRb()
      Returns:
      [ResourceBundle] rb for the labels
    • logAuthentication

      public void logAuthentication(Boolean valid, String username)
      Utility function that is used to log any sign in attempts
      Parameters:
      valid - Boolean value representing a successful log in
      username - String value representing the username being attempted
    • handleLogin

      public void handleLogin(javafx.event.ActionEvent actionEvent) throws IOException
      Function that handles authentication
      Parameters:
      actionEvent - ActionEvent object that triggered this function
      Throws:
      IOException
    • mapLabels

      public void mapLabels()
      Function that correctly maps all the labels to the correct language
    • mapLanguage

      public void mapLanguage()
      Maps the language from the system
    • initialize

      public void initialize(URL url, ResourceBundle resourceBundle)
      Initializes the FXML Screen
      Specified by:
      initialize in interface javafx.fxml.Initializable
      Parameters:
      url - parameter for the FXML Screen
      resourceBundle - parameter for the FXML Screen
    • openPage

      public void openPage(javafx.event.ActionEvent actionEvent, String form) throws IOException
      Utility function that is used to switch between pages
      Parameters:
      actionEvent - JavaFX action event
      Throws:
      IOException
    • displayError

      public void displayError(String text)
      Utility function that is used to display errors
      Parameters:
      text - String value text of the main text