FIX:: checkstyle fixes
This commit is contained in:
@@ -24,6 +24,9 @@ public class DashBoardController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
UserService userService;
|
UserService userService;
|
||||||
|
|
||||||
|
private FadeTransition fadeTrans; //transition for switching between the different panels
|
||||||
|
private int net;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private AnchorPane dashboardPane;
|
private AnchorPane dashboardPane;
|
||||||
@FXML
|
@FXML
|
||||||
@@ -32,12 +35,12 @@ public class DashBoardController {
|
|||||||
private AnchorPane activitiesPane;
|
private AnchorPane activitiesPane;
|
||||||
@FXML
|
@FXML
|
||||||
private AnchorPane friendsPane;
|
private AnchorPane friendsPane;
|
||||||
//@FXML
|
@FXML
|
||||||
//private Label veganMealCounter;
|
private Label veganMealCounter;
|
||||||
@FXML
|
@FXML
|
||||||
private Label totalVeganMealCounter;
|
private Label totalVeganMealCounter;
|
||||||
@FXML
|
@FXML
|
||||||
private Label welcomeBackText;
|
private Label welcomebacktext;
|
||||||
@FXML
|
@FXML
|
||||||
private Button dashboardButton;
|
private Button dashboardButton;
|
||||||
@FXML
|
@FXML
|
||||||
@@ -50,8 +53,8 @@ public class DashBoardController {
|
|||||||
private Line pathLine;
|
private Line pathLine;
|
||||||
@FXML
|
@FXML
|
||||||
private AnchorPane menuBar;
|
private AnchorPane menuBar;
|
||||||
//@FXML
|
@FXML
|
||||||
//private Button addNewActivityButton;
|
private Button addNewActivityButton;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -60,7 +63,7 @@ public class DashBoardController {
|
|||||||
*/
|
*/
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
//sets the text of the 'welcome back' text to include the username
|
//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
|
//adds the slide transition to the menu bar
|
||||||
addSlideTransition(menuBar, pathLine);
|
addSlideTransition(menuBar, pathLine);
|
||||||
//adds animations to the navigation buttons
|
//adds animations to the navigation buttons
|
||||||
@@ -74,17 +77,15 @@ public class DashBoardController {
|
|||||||
* Adds a fade transition for switching between the different panes.
|
* Adds a fade transition for switching between the different panes.
|
||||||
* @param node the node on which the transition needs to act
|
* @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
|
fadeTrans = new FadeTransition(Duration.millis(400), node);
|
||||||
// net is now a local variable
|
|
||||||
//transition for switching between the different panels
|
|
||||||
FadeTransition fadeTrans = new FadeTransition(Duration.millis(400), node);
|
|
||||||
fadeTrans.setFromValue(0);
|
fadeTrans.setFromValue(0);
|
||||||
fadeTrans.setToValue(1.0);
|
fadeTrans.setToValue(1.0);
|
||||||
fadeTrans.play();
|
fadeTrans.play();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays the dashboard pane.
|
* Displays the dashboard pane.
|
||||||
* @param event the event (clicking the button)
|
* @param event the event (clicking the button)
|
||||||
@@ -96,6 +97,7 @@ public class DashBoardController {
|
|||||||
userPane.setVisible(false);
|
userPane.setVisible(false);
|
||||||
activitiesPane.setVisible(false);
|
activitiesPane.setVisible(false);
|
||||||
friendsPane.setVisible(false);
|
friendsPane.setVisible(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -104,7 +106,6 @@ public class DashBoardController {
|
|||||||
*/
|
*/
|
||||||
public void displayActivities(ActionEvent event) {
|
public void displayActivities(ActionEvent event) {
|
||||||
addFadeTransition(activitiesPane);
|
addFadeTransition(activitiesPane);
|
||||||
int net = 0;
|
|
||||||
totalVeganMealCounter.setText("" + net);
|
totalVeganMealCounter.setText("" + net);
|
||||||
System.out.println("display activities");
|
System.out.println("display activities");
|
||||||
dashboardPane.setVisible(false);
|
dashboardPane.setVisible(false);
|
||||||
@@ -124,6 +125,7 @@ public class DashBoardController {
|
|||||||
userPane.setVisible(true);
|
userPane.setVisible(true);
|
||||||
activitiesPane.setVisible(false);
|
activitiesPane.setVisible(false);
|
||||||
friendsPane.setVisible(false);
|
friendsPane.setVisible(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -137,10 +139,11 @@ public class DashBoardController {
|
|||||||
userPane.setVisible(false);
|
userPane.setVisible(false);
|
||||||
activitiesPane.setVisible(false);
|
activitiesPane.setVisible(false);
|
||||||
friendsPane.setVisible(true);
|
friendsPane.setVisible(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//sets the slide in transition for startup
|
//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);
|
PathTransition pathTrans = new PathTransition(Duration.millis(1100), path1, node);
|
||||||
pathTrans.play();
|
pathTrans.play();
|
||||||
}
|
}
|
||||||
@@ -153,7 +156,7 @@ public class DashBoardController {
|
|||||||
* 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
|
||||||
*/
|
*/
|
||||||
MyButtonSkin(Button button) {
|
public 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
|
||||||
|
|||||||
@@ -185,7 +185,7 @@
|
|||||||
<AnchorPane fx:id="dashboardPane" layoutX="215.0" prefHeight="603.0" prefWidth="711.0" visible="false">
|
<AnchorPane fx:id="dashboardPane" layoutX="215.0" prefHeight="603.0" prefWidth="711.0" visible="false">
|
||||||
<children>
|
<children>
|
||||||
<HBox layoutX="97.0" layoutY="124.0" prefHeight="100.0" prefWidth="200.0" />
|
<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>
|
||||||
<Font size="30.0" />
|
<Font size="30.0" />
|
||||||
</font>
|
</font>
|
||||||
|
|||||||
Reference in New Issue
Block a user