FIX:: checkstyle fixes
This commit is contained in:
committed by
Merel Steenbergen
parent
37d3e6c4a7
commit
e755107fa8
@@ -30,6 +30,9 @@ public class DashBoardController {
|
||||
@Autowired
|
||||
UserService userService;
|
||||
|
||||
private FadeTransition fadeTrans; //transition for switching between the different panels
|
||||
private int net;
|
||||
|
||||
@FXML
|
||||
private AnchorPane dashboardPane;
|
||||
@FXML
|
||||
@@ -41,7 +44,7 @@ public class DashBoardController {
|
||||
@FXML
|
||||
private Label totalVeganMealCounter;
|
||||
@FXML
|
||||
private Label welcomeBackText;
|
||||
private Label welcomebacktext;
|
||||
@FXML
|
||||
private Button dashboardButton;
|
||||
@FXML
|
||||
@@ -54,7 +57,6 @@ public class DashBoardController {
|
||||
private Line pathLine;
|
||||
@FXML
|
||||
private AnchorPane menuBar;
|
||||
|
||||
@FXML
|
||||
private Button addNewActivityButton;
|
||||
@FXML
|
||||
@@ -65,7 +67,7 @@ public class DashBoardController {
|
||||
*/
|
||||
public void initialize() {
|
||||
//sets the text of the 'welcome back' text to include the username
|
||||
welcomeBackText.setText("Welcome back, " + userService.currentUser.getName() + "!");
|
||||
welcomebacktext.setText("Welcome back, " + userService.currentUser.getName() + "!");
|
||||
//adds the slide transition to the menu bar
|
||||
addSlideTransition(menuBar, pathLine);
|
||||
//adds animations to the navigation buttons
|
||||
@@ -85,17 +87,15 @@ public class DashBoardController {
|
||||
* Adds a fade transition for switching between the different panes.
|
||||
* @param node the node on which the transition needs to act
|
||||
*/
|
||||
private void addFadeTransition(Node node) {
|
||||
public void addFadeTransition(Node node) {
|
||||
|
||||
// FadeTransition is now a local variable
|
||||
// net is now a local variable
|
||||
//transition for switching between the different panels
|
||||
FadeTransition fadeTrans = new FadeTransition(Duration.millis(400), node);
|
||||
fadeTrans = new FadeTransition(Duration.millis(400), node);
|
||||
fadeTrans.setFromValue(0);
|
||||
fadeTrans.setToValue(1.0);
|
||||
fadeTrans.play();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Displays the dashboard pane.
|
||||
* @param event the event (clicking the button)
|
||||
@@ -107,6 +107,7 @@ public class DashBoardController {
|
||||
userPane.setVisible(false);
|
||||
activitiesPane.setVisible(false);
|
||||
friendsPane.setVisible(false);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -115,7 +116,6 @@ public class DashBoardController {
|
||||
*/
|
||||
public void displayActivities(ActionEvent event) {
|
||||
addFadeTransition(activitiesPane);
|
||||
int net = 0;
|
||||
totalVeganMealCounter.setText("" + net);
|
||||
System.out.println("display activities");
|
||||
dashboardPane.setVisible(false);
|
||||
@@ -135,6 +135,7 @@ public class DashBoardController {
|
||||
userPane.setVisible(true);
|
||||
activitiesPane.setVisible(false);
|
||||
friendsPane.setVisible(false);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -148,10 +149,11 @@ public class DashBoardController {
|
||||
userPane.setVisible(false);
|
||||
activitiesPane.setVisible(false);
|
||||
friendsPane.setVisible(true);
|
||||
|
||||
}
|
||||
|
||||
//sets the slide in transition for startup
|
||||
private void addSlideTransition(Node node, Line path1) {
|
||||
public void addSlideTransition(Node node, Line path1) {
|
||||
PathTransition pathTrans = new PathTransition(Duration.millis(1100), path1, node);
|
||||
pathTrans.play();
|
||||
}
|
||||
@@ -176,7 +178,7 @@ public class DashBoardController {
|
||||
* and scales down when you stop hovering over it.
|
||||
* @param button the button to add the animation to
|
||||
*/
|
||||
MyButtonSkin(Button button) {
|
||||
public MyButtonSkin(Button button) {
|
||||
//inherit the button properties
|
||||
super(button);
|
||||
//transition to scale up on hover
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
<AnchorPane fx:id="dashboardPane" layoutX="215.0" prefHeight="703.0" prefWidth="820.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="214.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<children>
|
||||
<HBox layoutX="97.0" layoutY="124.0" prefHeight="100.0" prefWidth="200.0" />
|
||||
<Label fx:id="welcomeBacktext" layoutX="69.0" layoutY="53.0" text="Welcome back user!" AnchorPane.leftAnchor="60.0" AnchorPane.topAnchor="40.0">
|
||||
<Label fx:id="welcomebacktext" layoutX="69.0" layoutY="53.0" text="Welcome back user!" AnchorPane.leftAnchor="60.0" AnchorPane.topAnchor="40.0">
|
||||
<font>
|
||||
<Font size="30.0" />
|
||||
</font>
|
||||
|
||||
Reference in New Issue
Block a user