Package Controllers
Class LoginController
java.lang.Object
Controllers.LoginController
- All Implemented Interfaces:
javafx.fxml.Initializable
Controller class for the Login.fmxl form.
Implements Initializable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
displayError
(String text) Utility function that is used to display errorsstatic String
static ResourceBundle
getRb()
static TimeZone
static User
getUser()
void
handleLogin
(javafx.event.ActionEvent actionEvent) Function that handles authenticationvoid
initialize
(URL url, ResourceBundle resourceBundle) Initializes the FXML Screenvoid
logAuthentication
(Boolean valid, String username) Utility function that is used to log any sign in attemptsvoid
Function that correctly maps all the labels to the correct languagevoid
Maps the language from the systemvoid
Utility function that is used to switch between pages
-
Constructor Details
-
LoginController
public LoginController()
-
-
Method Details
-
getTimezone
- Returns:
- [TimeZone] timezone of the system
-
getLanguage
- Returns:
- [String] language of the system
-
getUser
- Returns:
- [User] user that has loggged in
-
getRb
- Returns:
- [ResourceBundle] rb for the labels
-
logAuthentication
Utility function that is used to log any sign in attempts- Parameters:
valid
- Boolean value representing a successful log inusername
- String value representing the username being attempted
-
handleLogin
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
Initializes the FXML Screen- Specified by:
initialize
in interfacejavafx.fxml.Initializable
- Parameters:
url
- parameter for the FXML ScreenresourceBundle
- parameter for the FXML Screen
-
openPage
Utility function that is used to switch between pages- Parameters:
actionEvent
- JavaFX action event- Throws:
IOException
-
displayError
Utility function that is used to display errors- Parameters:
text
- String value text of the main text
-