Package NTNU.IDATT1002.controllers
Class Login
java.lang.Object
NTNU.IDATT1002.controllers.Login
public class Login
extends java.lang.Object
Controls the buttons and changeable elements on login.fxml,
the page where you log into the application
- Version:
- 1.0 22.03.2020
- Author:
- madslun
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Login()
-
Method Summary
Modifier and Type Method Description void
buttonLogin(javafx.event.ActionEvent event)
Method trying to login if login button is pressedvoid
enterLogin(javafx.scene.input.KeyEvent keyEvent)
Method that registers a keyevent and tries to login if keyevent is enteredvoid
login()
Method that tries to log in to the page with the entered credentials.void
switchToSignup(javafx.event.ActionEvent actionEvent)
Method that changes scene to Sign Up page
-
Field Details
-
Constructor Details
-
Login
public Login()
-
-
Method Details
-
switchToSignup
public void switchToSignup(javafx.event.ActionEvent actionEvent) throws java.io.IOExceptionMethod that changes scene to Sign Up page- Parameters:
actionEvent
-- Throws:
java.io.IOException
-
login
public void login() throws java.io.IOExceptionMethod that tries to log in to the page with the entered credentials. If successful, scene changes to Main page. If not it displays an error.- Throws:
java.io.IOException
-
enterLogin
public void enterLogin(javafx.scene.input.KeyEvent keyEvent) throws java.io.IOExceptionMethod that registers a keyevent and tries to login if keyevent is entered- Parameters:
keyEvent
-- Throws:
java.io.IOException
-
buttonLogin
public void buttonLogin(javafx.event.ActionEvent event) throws java.io.IOExceptionMethod trying to login if login button is pressed- Parameters:
event
-- Throws:
java.io.IOException
-