FIX::fixed complieJava build failing

This commit is contained in:
Sem van der Hoeven
2019-04-08 14:17:06 +02:00
parent 18a0973af4
commit 79fd69503c
2 changed files with 17 additions and 5 deletions

View File

@@ -408,7 +408,8 @@ public class CalculatorController {
/** /**
* Checks the food labels. * Checks the food labels.
*/ */
public void checkFoodLabels() { @SuppressWarnings("Duplicates")
private void checkFoodLabels() {
if (!meatFishEggsLabel.getText().replace(" daily servings per person", "").equals("2.6")) { if (!meatFishEggsLabel.getText().replace(" daily servings per person", "").equals("2.6")) {
userService.updateInput(userService.currentUser.getName(), userService.updateInput(userService.currentUser.getName(),
"input_footprint_shopping_food_meatfisheggs", "input_footprint_shopping_food_meatfisheggs",
@@ -441,7 +442,8 @@ public class CalculatorController {
/** /**
* Checks the house labels. * Checks the house labels.
*/ */
public void checkHousingLabels() { @SuppressWarnings("Duplicates")
private void checkHousingLabels() {
if (!electricityField.getText().equals("0")) { if (!electricityField.getText().equals("0")) {
userService.updateInput(userService.currentUser.getName(), userService.updateInput(userService.currentUser.getName(),
"input_footprint_housing_electricity_dollars", "input_footprint_housing_electricity_dollars",
@@ -477,7 +479,8 @@ public class CalculatorController {
/** /**
* Checks the transport labels. * Checks the transport labels.
*/ */
public void checkTransportLabels() { @SuppressWarnings("Duplicates")
private void checkTransportLabels() {
if (!publicTransitField.getText().equals("0")) { if (!publicTransitField.getText().equals("0")) {
userService.updateInput(userService.currentUser.getName(), userService.updateInput(userService.currentUser.getName(),
"input_footprint_transportation_publictrans", "input_footprint_transportation_publictrans",

View File

@@ -25,6 +25,7 @@ import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView; import javafx.scene.control.TableView;
import javafx.scene.control.Tooltip; import javafx.scene.control.Tooltip;
import javafx.scene.control.cell.PropertyValueFactory; import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.effect.ColorAdjust;
import javafx.scene.image.ImageView; import javafx.scene.image.ImageView;
import javafx.scene.layout.AnchorPane; import javafx.scene.layout.AnchorPane;
import javafx.scene.shape.Line; import javafx.scene.shape.Line;
@@ -636,47 +637,55 @@ public class DashBoardController {
*/ */
public void updateAchievements() { public void updateAchievements() {
Map achievements = userService.getAchievements(userService.currentUser.getName()); Map achievements = userService.getAchievements(userService.currentUser.getName());
ColorAdjust desaturate = new ColorAdjust();
desaturate.setSaturation(-0.75);
if ((Boolean)achievements.get("Starting off")) { if ((Boolean)achievements.get("Starting off")) {
achieve1.setOpacity(1); achieve1.setOpacity(1);
} else { } else {
achieve1.setEffect(desaturate);
achieve1.setOpacity(0.3); achieve1.setOpacity(0.3);
} }
if ((Boolean)achievements.get("Social butterfly")) { if ((Boolean)achievements.get("Social butterfly")) {
achieve2.setOpacity(1); achieve2.setOpacity(1);
} else { } else {
achieve2.setEffect(desaturate);
achieve2.setOpacity(0.3); achieve2.setOpacity(0.3);
} }
if ((Boolean)achievements.get("Green saver")) { if ((Boolean)achievements.get("Green saver")) {
achieve3.setOpacity(1); achieve3.setOpacity(1);
} else { } else {
achieve3.setEffect(desaturate);
achieve3.setOpacity(0.3); achieve3.setOpacity(0.3);
} }
if ((Boolean)achievements.get("Animal friend")) { if ((Boolean)achievements.get("Animal friend")) {
achieve4.setOpacity(1); achieve4.setOpacity(1);
} else { } else {
achieve4.setEffect(desaturate);
achieve4.setOpacity(0.3); achieve4.setOpacity(0.3);
} }
if ((Boolean)achievements.get("Tom Dumoulin")) { if ((Boolean)achievements.get("Tom Dumoulin")) {
achieve5.setOpacity(1); achieve5.setOpacity(1);
} else { } else {
achieve5.setEffect(desaturate);
achieve5.setOpacity(0.3); achieve5.setOpacity(0.3);
} }
if ((Boolean)achievements.get("Let it shine")) { if ((Boolean)achievements.get("Let it shine")) {
achieve6.setOpacity(1); achieve6.setOpacity(1);
} else { } else {
achieve6.setEffect(desaturate);
achieve6.setOpacity(0.3); achieve6.setOpacity(0.3);
} }
} }
//class for the animations on the navigation buttons //class for the animations on the navigation buttons
public class MyButtonSkin extends ButtonSkin { private class MyButtonSkin extends ButtonSkin {
/** /**
* adds a skin and scale animation to a button. * adds a skin and scale animation to a button.
* the scale transition is for hovering over it so it then scales up * the scale transition is for hovering over it so it then scales up
* and scales down when you stop hovering over it. * and scales down when you stop hovering over it.
* @param button the button to add the animation to * @param button the button to add the animation to
*/ */
public MyButtonSkin(Button button) { private MyButtonSkin(Button button) {
//inherit the button properties //inherit the button properties
super(button); super(button);
//transition to scale up on hover //transition to scale up on hover