Merge branch 'fix/checkstyle' of gitlab.ewi.tudelft.nl:cse1105/2018-2019/oopp-group-43/template into fix/checkstyle

This commit is contained in:
Mika Wauben
2019-04-01 11:38:23 +00:00
parent fcaf3ddb49
commit 644f466696
4 changed files with 19 additions and 22 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

View File

@@ -472,16 +472,16 @@ public class CalculatorController {
servicesLabel.getText().replace("€ / month", "")); servicesLabel.getText().replace("€ / month", ""));
} }
Float footprint = userService.saveFootprint(userService.currentUser.getName()); Float footprint = userService.saveFootprint(userService.currentUser.getName());
if(localProduceCheckbox.isSelected()) { if (localProduceCheckbox.isSelected()) {
controller.localProduce.setSelected(true); controller.localProduce.setSelected(true);
} }
if(bikeCheckbox.isSelected()) { if (bikeCheckbox.isSelected()) {
controller.bike.setSelected(true); controller.bike.setSelected(true);
} }
if(temperatureCheckbox.isSelected()) { if (temperatureCheckbox.isSelected()) {
controller.loweringTemp.setSelected(true); controller.loweringTemp.setSelected(true);
} }
if(solarPanelsCheckbox.isSelected()) { if (solarPanelsCheckbox.isSelected()) {
controller.solarPanels.setSelected(true); controller.solarPanels.setSelected(true);
} }
Window owner = saveButton.getScene().getWindow(); Window owner = saveButton.getScene().getWindow();

View File

@@ -41,6 +41,21 @@ public class DashBoardController {
public ObservableList<Friend> friendLeaderData = FXCollections.observableArrayList(); public ObservableList<Friend> friendLeaderData = FXCollections.observableArrayList();
public ObservableList<Friend> globalLeaderData = FXCollections.observableArrayList(); public ObservableList<Friend> globalLeaderData = FXCollections.observableArrayList();
//these need to be public because they are used by the calculatorController
//suppressing the checkstyle warnings because the fields have to be public
@SuppressWarnings("CheckStyle")
@FXML
public CheckBox localProduce;
@SuppressWarnings("CheckStyle")
@FXML
public CheckBox loweringTemp;
@SuppressWarnings("CheckStyle")
@FXML
public CheckBox bike;
@SuppressWarnings("CheckStyle")
@FXML
public CheckBox solarPanels;
@Autowired @Autowired
UserService userService; UserService userService;
@@ -145,21 +160,6 @@ public class DashBoardController {
@FXML @FXML
private Label snacks; private Label snacks;
//these need to be public because they are used by the calculatorController
//suppressing the checkstyle warnings because the fields have to be public
@SuppressWarnings("CheckStyle")
@FXML
public CheckBox localProduce;
@SuppressWarnings("CheckStyle")
@FXML
public CheckBox loweringTemp;
@SuppressWarnings("CheckStyle")
@FXML
public CheckBox bike;
@SuppressWarnings("CheckStyle")
@FXML
public CheckBox solarPanels;
/** /**
* Loads the the necessary things before anything else. * Loads the the necessary things before anything else.
*/ */

View File

@@ -1,6 +1,5 @@
package greenify.client.rest; package greenify.client.rest;
import com.sun.javafx.collections.MappingChange;
import greenify.common.UserDto; import greenify.common.UserDto;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.client.RestTemplateBuilder; import org.springframework.boot.web.client.RestTemplateBuilder;
@@ -13,8 +12,6 @@ import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponentsBuilder; import org.springframework.web.util.UriComponentsBuilder;
import java.awt.*;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;