Class AddIngredientDialog
java.lang.Object
edu.ntnu.stud.controller.framecontroller.dialogboxes.DialogBox
edu.ntnu.stud.controller.framecontroller.dialogboxes.AddIngredientDialog
Dialog box to display two input fields for getting a name and quantity
when an ingredient should be added to a list. The class extends the DialogBox class.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAddIngredientDialog
(javafx.scene.control.Alert alert, javafx.scene.text.Text headerText, javafx.scene.text.Text contentText, int width, int height) Constructor for the AddIngredientDialog class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
showAddIngredientDialog
(List<Ingredient> listName, String fileName) Method to show the dialog box for adding an ingredient to a list.Methods inherited from class edu.ntnu.stud.controller.framecontroller.dialogboxes.DialogBox
getAlert, getContentText, getHeaderText, setNegativeButtonStyle, setPositiveButtonStyle, setStyle
-
Constructor Details
-
AddIngredientDialog
public AddIngredientDialog(javafx.scene.control.Alert alert, javafx.scene.text.Text headerText, javafx.scene.text.Text contentText, int width, int height) Constructor for the AddIngredientDialog class. Calls the constructor of the superclass.- Parameters:
alert
- The alert object to be displayed.headerText
- The header text of the dialog box.contentText
- The content text of the dialog box.width
- The width of the dialog box.height
- The height of the dialog box.
-
-
Method Details
-
showAddIngredientDialog
Method to show the dialog box for adding an ingredient to a list.- Parameters:
listName
- The list of ingredients to add the ingredient to.fileName
- The name of the file to save the list to.
-