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

View File

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