ADD::Added checkstyle comments

FIX::fixed some checkstyle warnings
This commit is contained in:
Sem van der Hoeven
2019-03-17 15:58:55 +01:00
parent e718e3859b
commit e1448055f5
8 changed files with 53 additions and 24 deletions

View File

@@ -48,10 +48,10 @@ public class DashBoardController {
public void displayDashboard(ActionEvent event) {
System.out.println("display dashboard");
// UserService service = new UserService();
// UserDTO user = service.getName(null);
// String name = user.getName();
// welcomebacktext.setText("Welcome back, " + name);
// UserService service = new UserService();
// UserDTO user = service.getName(null);
// String name = user.getName();
// welcomebacktext.setText("Welcome back, " + name);
dashboardPane.setVisible(true);
userPane.setVisible(false);

View File

@@ -33,7 +33,7 @@ public class RegisterWindowController {
*/
@FXML
public void handleSignUpButton(ActionEvent event) {
//set the window to the current window (for displaying the alerts)
//set the window to the current window (for displaying the alerts)
Window owner = signupButton.getScene().getWindow();
//check if the username field is empty
if (userNameText.getText().isEmpty()) {

View File

@@ -68,7 +68,9 @@ public class UserController {
this.getClass().getClassLoader().getResource("fxml/dashboard.fxml")
);
Scene scene = new Scene(dash);
scene.getStylesheets().add(getClass().getClassLoader().getResource("stylesheets/dashboardStyle.css").toExternalForm());
scene.getStylesheets().add(getClass()
.getClassLoader()
.getResource("stylesheets/dashboardStyle.css").toExternalForm());
Stage appStage = new Stage();
appStage.setScene(scene);
appStage.show();
@@ -95,9 +97,15 @@ public class UserController {
}
}
public void handleRegisterButtonAction(ActionEvent event) throws Exception{
/**
* handles the click of the 'sign up' button.
* opens a new stage where the user can register.
* @param event the click of the button
* @throws Exception an exception if the fxml file is not found
*/
public void handleRegisterButtonAction(ActionEvent event) throws Exception {
//load the fxml file
Parent registerWindow = FXMLLoader.load (
Parent registerWindow = FXMLLoader.load(
this.getClass().getClassLoader().getResource("fxml/RegisterWindow.fxml")
);
//make the window use the scene