Class IngredientTileController

java.lang.Object
no.ntnu.idatt1002.demo.controller.IngredientTileController

public class IngredientTileController extends Object
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IngredientTileController

      public IngredientTileController()
  • Method Details

    • setData

      public void 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.
      Parameters:
      ingredient - An RecipeIngredient object to format and create an Ingredient tile for.