Added some javadoc comments to GUI
This commit is contained in:
@@ -5,13 +5,22 @@ import javafx.fxml.FXML;
|
||||
import javafx.scene.control.Label;
|
||||
|
||||
public class GUIController {
|
||||
int pressed;
|
||||
private int pressed;
|
||||
|
||||
//put @FXML to let the fxml file know that it can use this label,
|
||||
// ind of the same as with @Test in jUnit tests
|
||||
//kind of the same as with @Test in jUnit tests
|
||||
|
||||
/**
|
||||
*the label to be edited by pressing the button
|
||||
*/
|
||||
@FXML
|
||||
private Label txtLabel;
|
||||
|
||||
/**
|
||||
* increments the counter when the button is presssed
|
||||
* @param event an event that happens (button is clicked)
|
||||
* @throws Exception
|
||||
*/
|
||||
public void incrementLabel(ActionEvent event) throws Exception {
|
||||
// System.out.println("pressed button");
|
||||
pressed++;
|
||||
|
||||
@@ -8,10 +8,19 @@ import javafx.stage.Stage;
|
||||
|
||||
public class GUIMain extends Application {
|
||||
|
||||
/**
|
||||
* launches the stage
|
||||
* @param args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
launch(args);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param primaryStage the stage to be started
|
||||
* @throws Exception when the fxml file can't be found
|
||||
*/
|
||||
@Override
|
||||
public void start(Stage primaryStage) throws Exception {
|
||||
//link fxml file
|
||||
|
||||
@@ -28,6 +28,12 @@ public class LoginController {
|
||||
@FXML
|
||||
private Button loginbutton;
|
||||
|
||||
/**
|
||||
* redirects to the main stage when the login credentials are correct
|
||||
* @param event the entered username and password, and clicking the button
|
||||
* @throws Exception
|
||||
* @author Sem van der Hoeven
|
||||
*/
|
||||
public void Login(ActionEvent event) throws Exception {
|
||||
//if the entered username and password are correct
|
||||
if (usertext.getText().equals("user") && passwordField.getText().equals("pass")) {
|
||||
|
||||
Reference in New Issue
Block a user