FIX::fixed checkstyle errors
This commit is contained in:
@@ -56,8 +56,8 @@ public class Hints {
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a random hint from the list of hints.
|
||||
* @return the random hint.
|
||||
* returns a random Hint.
|
||||
* @return a random hint as a string
|
||||
*/
|
||||
public String randomHint() {
|
||||
Random rand = new Random();
|
||||
|
||||
@@ -2,7 +2,13 @@ package greenify.client.controller;
|
||||
|
||||
import greenify.client.Application;
|
||||
import greenify.client.rest.UserService;
|
||||
import javafx.animation.*;
|
||||
import javafx.animation.FadeTransition;
|
||||
import javafx.animation.Interpolator;
|
||||
import javafx.animation.KeyFrame;
|
||||
import javafx.animation.KeyValue;
|
||||
import javafx.animation.ParallelTransition;
|
||||
import javafx.animation.Timeline;
|
||||
import javafx.animation.TranslateTransition;
|
||||
import javafx.beans.value.ChangeListener;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
import javafx.event.ActionEvent;
|
||||
@@ -241,7 +247,11 @@ public class CalculatorController {
|
||||
});
|
||||
}
|
||||
|
||||
public void addFadeTransAnimation(Node node){
|
||||
/**
|
||||
* adds a fade transition to the given node.
|
||||
* @param node the node to add the transition to
|
||||
*/
|
||||
public void addFadeTransAnimation(Node node) {
|
||||
FadeTransition fade = new FadeTransition(Duration.millis(350), node);
|
||||
fade.setFromValue(0);
|
||||
fade.setToValue(1.0);
|
||||
|
||||
@@ -400,9 +400,14 @@ public class DashBoardController {
|
||||
calcStage.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* opens the Extra activities scene.
|
||||
* @param event the click of the button
|
||||
* @throws IOException exception if it can't find the fxml file
|
||||
*/
|
||||
public void openExtraActivities(ActionEvent event) throws IOException {
|
||||
Parent extra = Application.load(this.getClass().getClassLoader()
|
||||
.getResource("fxml/extraActivities.fxml"));
|
||||
.getResource("fxml/extraActivities.fxml"));
|
||||
Scene scene = new Scene(extra);
|
||||
Stage extraStage = new Stage();
|
||||
extraStage.setScene(scene);
|
||||
|
||||
@@ -151,6 +151,10 @@ public class ExtraActivityController {
|
||||
}
|
||||
|
||||
public class TranslateButtonSkin extends ButtonSkin {
|
||||
/**
|
||||
* button skin that sets a translate animation on entering and exiting the button.
|
||||
* @param button the button to set the animation for
|
||||
*/
|
||||
public TranslateButtonSkin(Button button) {
|
||||
super(button);
|
||||
|
||||
@@ -169,6 +173,11 @@ public class ExtraActivityController {
|
||||
|
||||
@SuppressWarnings("Duplicates")
|
||||
public class ActivityButtonSkin extends ButtonSkin {
|
||||
/**
|
||||
* button skin for the 'add activity' buttons.
|
||||
* adds scale animations on entering, clicking and extiting the button
|
||||
* @param button the button to set the skin of
|
||||
*/
|
||||
public ActivityButtonSkin(Button button) {
|
||||
super(button);
|
||||
|
||||
|
||||
@@ -77,6 +77,10 @@ public class CalculatorService {
|
||||
return footprint;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds extras to the user.
|
||||
* @param user the user to add the extras to
|
||||
*/
|
||||
public void addExtras(User user) {
|
||||
if (user.getExtraInputs().get("local_produce")) {
|
||||
user.setFootPrint(user.getFootPrint() - 2);
|
||||
|
||||
Reference in New Issue
Block a user