Merge branch 'database_fixes' into 'master'

Merge database_fixes branch into master

See merge request cse1105/2018-2019/oopp-group-43/template!14
This commit is contained in:
Sem van der Hoeven
2019-03-16 13:50:44 +00:00
27 changed files with 790 additions and 508 deletions

View File

@@ -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());
//
// };
// }
}

View File

@@ -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();
}
@@ -103,12 +77,6 @@ public class UserController {
appStage.show();
}
// public final String getUsernameText() {
//
// return user.getName();
// }
public static class AlertHelper {
/**
* alerts for the login screen.

View File

@@ -1,16 +0,0 @@
import greenify.client.Application;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
public class ApplicationTest {
@Test
public void applicationContextLoaded() {
}
@Test
public void applicationContextTest() {
Application.main(new String[] {});
}
}