diff --git a/src/Client/src/main/java/greenify/client/Application.java b/src/Client/src/main/java/greenify/client/Application.java index dca6ad1..e7da5f4 100644 --- a/src/Client/src/main/java/greenify/client/Application.java +++ b/src/Client/src/main/java/greenify/client/Application.java @@ -21,11 +21,6 @@ public class Application extends javafx.application.Application { launch(args); } - // @Bean - // public RestTemplate restTemplate(RestTemplateBuilder builder) { - // return builder.build(); - // } - @Override public void init() throws Exception { springContext = SpringApplication.run(Application.class); @@ -36,25 +31,9 @@ public class Application extends javafx.application.Application { @Override public void start(Stage primaryStage) throws Exception { fxmlLoader.setLocation(this.getClass().getClassLoader().getResource("fxml/sample.fxml")); - - // fxmlLoader.setLocation( - // this.getClass().getClassLoader().getResource("fxml/dashboard.fxml") - // ); - - rootNode = fxmlLoader.load(); - - // rootNode = FXMLLoader.load( - // this.getClass().getClassLoader().getResource("fxml/sample.fxml") - // ); - primaryStage.setTitle("GoGreen"); Scene scene = new Scene(rootNode); - - // scene.getStylesheets().add( - // getClass().getResource("stylesheets/dashboardStyle.css").toExternalForm() - // ); - primaryStage.setScene(scene); primaryStage.show(); } @@ -63,14 +42,4 @@ public class Application extends javafx.application.Application { public void stop() { springContext.stop(); } - - // @Bean - // public CommandLineRunner run(RestTemplate restTemplate) throws Exception { - // return args -> { - // User user = restTemplate.getForObject( - // "http://localhost:8080/user", User.class); - // log.info(user.toString()); - // - // }; - // } } \ No newline at end of file diff --git a/src/Client/src/main/java/greenify/client/controller/UserController.java b/src/Client/src/main/java/greenify/client/controller/UserController.java index 72e9be2..05c883b 100644 --- a/src/Client/src/main/java/greenify/client/controller/UserController.java +++ b/src/Client/src/main/java/greenify/client/controller/UserController.java @@ -34,21 +34,6 @@ public class UserController { @FXML private Button signupButton; - - - - // @Value("${my.url}") - // private String myUrl; - - // @FXML - // private void initialize(ActionEvent event) throws IOException { - // Parent parent = FXMLLoader.load(getClass().getResource("sample.fxml")); - // Scene scene = new Scene(parent); - // Stage app_stage = (Stage)((Node) event.getSource()).getScene().getWindow(); - // app_stage.setScene(scene); - // app_stage.show(); - // } - @FXML protected void handleLoginButtonAction(ActionEvent event) throws IOException { Window owner = loginButton.getScene().getWindow(); @@ -70,17 +55,6 @@ public class UserController { } userService.registerUser(usernameField.getText(), passwordField.getText()); - - // load the dashboard stage - // Parent parent = FXMLLoader.load( - // this.getClass().getClassLoader().getResource("/fxml/dashboard.fxml") - // ); - // - // Scene scene = new Scene(parent); - // Stage app_stage = (Stage) ((Node) event.getSource()).getScene().getWindow(); - // app_stage.setScene(scene); - // app_stage.setFullScreen(true); - // app_stage.show(); openDashboard(); } @@ -101,12 +75,6 @@ public class UserController { appStage.show(); } -// public final String getUsernameText() { -// -// return user.getName(); -// } - - public static class AlertHelper { /** * alerts for the login screen.