ADD::added javadoc comments to calculatorController class
This commit is contained in:
@@ -19,7 +19,7 @@ public class CalculatorController {
|
|||||||
UserService userService;
|
UserService userService;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public Button calculatorGetStartedButton;
|
private Button calculatorGetStartedButton;
|
||||||
@FXML
|
@FXML
|
||||||
private Button calculatorTravelButton;
|
private Button calculatorTravelButton;
|
||||||
@FXML
|
@FXML
|
||||||
@@ -51,6 +51,11 @@ public class CalculatorController {
|
|||||||
@FXML
|
@FXML
|
||||||
private Button getStartedNextButton;
|
private Button getStartedNextButton;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* initializes the window, performs some actions before loading all other things.
|
||||||
|
* it sets the sliders to snap to the ticks
|
||||||
|
* it adds listeners to all the sliders for updating the label next to them
|
||||||
|
*/
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
peopleInHouseholdSLider.setSnapToTicks(true);
|
peopleInHouseholdSLider.setSnapToTicks(true);
|
||||||
annualIncomeSlider.setSnapToTicks(true);
|
annualIncomeSlider.setSnapToTicks(true);
|
||||||
@@ -73,6 +78,11 @@ public class CalculatorController {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* displays the 'get started' section of the calculator.
|
||||||
|
* Activated when the designated button (navigation button) is clicked
|
||||||
|
* @param event the click of the button
|
||||||
|
*/
|
||||||
public void displayGetStarted(ActionEvent event) {
|
public void displayGetStarted(ActionEvent event) {
|
||||||
getStartedPane.setVisible(true);
|
getStartedPane.setVisible(true);
|
||||||
travelPane.setVisible(false);
|
travelPane.setVisible(false);
|
||||||
@@ -82,6 +92,11 @@ public class CalculatorController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* displays the 'travel' section of the calculator.
|
||||||
|
* Activated when the designated button (navigation button) is clicked
|
||||||
|
* @param event the click of the button
|
||||||
|
*/
|
||||||
public void displayTravel(ActionEvent event) {
|
public void displayTravel(ActionEvent event) {
|
||||||
getStartedPane.setVisible(false);
|
getStartedPane.setVisible(false);
|
||||||
travelPane.setVisible(true);
|
travelPane.setVisible(true);
|
||||||
@@ -90,6 +105,11 @@ public class CalculatorController {
|
|||||||
shoppingPane.setVisible(false);
|
shoppingPane.setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* displays the 'home' section of the calculator.
|
||||||
|
* Activated when the designated button (navigation button) is clicked
|
||||||
|
* @param event the click of the button
|
||||||
|
*/
|
||||||
public void displayHome(ActionEvent event) {
|
public void displayHome(ActionEvent event) {
|
||||||
getStartedPane.setVisible(false);
|
getStartedPane.setVisible(false);
|
||||||
travelPane.setVisible(false);
|
travelPane.setVisible(false);
|
||||||
@@ -98,6 +118,11 @@ public class CalculatorController {
|
|||||||
shoppingPane.setVisible(false);
|
shoppingPane.setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* displays the 'food' section of the calculator.
|
||||||
|
* Activated when the designated button (navigation button) is clicked
|
||||||
|
* @param event the click of the button
|
||||||
|
*/
|
||||||
public void displayFood(ActionEvent event) {
|
public void displayFood(ActionEvent event) {
|
||||||
getStartedPane.setVisible(false);
|
getStartedPane.setVisible(false);
|
||||||
travelPane.setVisible(false);
|
travelPane.setVisible(false);
|
||||||
@@ -106,6 +131,11 @@ public class CalculatorController {
|
|||||||
shoppingPane.setVisible(false);
|
shoppingPane.setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* displays the 'shopping' section of the calculator.
|
||||||
|
* Activated when the designated button (navigation button) is clicked
|
||||||
|
* @param event the click of the button
|
||||||
|
*/
|
||||||
public void displayShopping(ActionEvent event) {
|
public void displayShopping(ActionEvent event) {
|
||||||
getStartedPane.setVisible(false);
|
getStartedPane.setVisible(false);
|
||||||
travelPane.setVisible(false);
|
travelPane.setVisible(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user