Class IngredientTileController
java.lang.Object
no.ntnu.idatt1002.demo.controller.IngredientTileController
The IngredientTileController manages a simple pane component view called IngredientTile.fxml that
is used to dynamically load ingredients into a view to present all details of a recipe. The data
to create a component of this kind is set by 'setData' and takes RecipeIngredient objects as
parameter.
- Author:
- hannesofie
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
setData
(RecipeIngredient ingredient) The setData method takes an RecipeIngredient object as parameter and sets the text of the label contained in the simple pane to a formatted string following this pattern: "# Ingredient name XX.X YY" where XX.X is the amount of the ingredient in the recipe and YY is the unit of measure.
-
Constructor Details
-
IngredientTileController
public IngredientTileController()
-
-
Method Details
-
setData
The setData method takes an RecipeIngredient object as parameter and sets the text of the label contained in the simple pane to a formatted string following this pattern: "# Ingredient name XX.X YY" where XX.X is the amount of the ingredient in the recipe and YY is the unit of measure.- Parameters:
ingredient
- An RecipeIngredient object to format and create an Ingredient tile for.
-