Edit client classes

This commit is contained in:
cugurlu
2019-03-16 14:14:17 +01:00
parent 31499adc00
commit 20735380e5
2 changed files with 0 additions and 63 deletions

View File

@@ -21,11 +21,6 @@ public class Application extends javafx.application.Application {
launch(args); launch(args);
} }
// @Bean
// public RestTemplate restTemplate(RestTemplateBuilder builder) {
// return builder.build();
// }
@Override @Override
public void init() throws Exception { public void init() throws Exception {
springContext = SpringApplication.run(Application.class); springContext = SpringApplication.run(Application.class);
@@ -36,25 +31,9 @@ public class Application extends javafx.application.Application {
@Override @Override
public void start(Stage primaryStage) throws Exception { public void start(Stage primaryStage) throws Exception {
fxmlLoader.setLocation(this.getClass().getClassLoader().getResource("fxml/sample.fxml")); fxmlLoader.setLocation(this.getClass().getClassLoader().getResource("fxml/sample.fxml"));
// fxmlLoader.setLocation(
// this.getClass().getClassLoader().getResource("fxml/dashboard.fxml")
// );
rootNode = fxmlLoader.load(); rootNode = fxmlLoader.load();
// rootNode = FXMLLoader.load(
// this.getClass().getClassLoader().getResource("fxml/sample.fxml")
// );
primaryStage.setTitle("GoGreen"); primaryStage.setTitle("GoGreen");
Scene scene = new Scene(rootNode); Scene scene = new Scene(rootNode);
// scene.getStylesheets().add(
// getClass().getResource("stylesheets/dashboardStyle.css").toExternalForm()
// );
primaryStage.setScene(scene); primaryStage.setScene(scene);
primaryStage.show(); primaryStage.show();
} }
@@ -63,14 +42,4 @@ public class Application extends javafx.application.Application {
public void stop() { public void stop() {
springContext.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());
//
// };
// }
} }

View File

@@ -34,21 +34,6 @@ public class UserController {
@FXML @FXML
private Button signupButton; 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 @FXML
protected void handleLoginButtonAction(ActionEvent event) throws IOException { protected void handleLoginButtonAction(ActionEvent event) throws IOException {
Window owner = loginButton.getScene().getWindow(); Window owner = loginButton.getScene().getWindow();
@@ -70,17 +55,6 @@ public class UserController {
} }
userService.registerUser(usernameField.getText(), passwordField.getText()); 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(); openDashboard();
} }
@@ -101,12 +75,6 @@ public class UserController {
appStage.show(); appStage.show();
} }
// public final String getUsernameText() {
//
// return user.getName();
// }
public static class AlertHelper { public static class AlertHelper {
/** /**
* alerts for the login screen. * alerts for the login screen.