diff --git a/src/main/java/mi/hdm/controllers/MealPlanController.java b/src/main/java/mi/hdm/controllers/MealPlanController.java index fcfc2c47fedcb8b5ffba2e6ad58e5487edb45a7d..30f63351297abe81f809c8c5ec3f6fdce395a848 100644 --- a/src/main/java/mi/hdm/controllers/MealPlanController.java +++ b/src/main/java/mi/hdm/controllers/MealPlanController.java @@ -2,12 +2,13 @@ package mi.hdm.controllers; import javafx.fxml.FXML; import javafx.geometry.HPos; -import javafx.geometry.Insets; import javafx.geometry.Pos; +import javafx.scene.Cursor; import javafx.scene.control.*; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.layout.*; +import javafx.scene.paint.Color; import javafx.scene.text.Font; import javafx.scene.text.FontWeight; import javafx.scene.text.Text; @@ -27,7 +28,6 @@ import java.util.Map; public class MealPlanController extends BaseController { private final MealPlan mealPlan; private final RecipeManager recipeManager; - //private final IngredientManager ingredientManager; private final RecipeSearch recipeSearch; private List<Recipe> searchResults; @@ -71,7 +71,6 @@ public class MealPlanController extends BaseController { public MealPlanController(MealPlan mealPlan, RecipeManager recipeManager, IngredientManager ingredientManager) { this.mealPlan = mealPlan; this.recipeManager = recipeManager; - //this.ingredientManager = ingredientManager; recipeSearch = new RecipeSearch(recipeManager, ingredientManager); searchResults = new ArrayList<>(); } @@ -79,8 +78,7 @@ public class MealPlanController extends BaseController { @FXML public void initialize() { loadHeader(parent); - displayMealPlan(); - drawNutritionTable(); + render(); } private void displayMealPlan() { @@ -110,20 +108,23 @@ public class MealPlanController extends BaseController { Label name = new Label(r.getName()); name.setFont(font); name.setStyle("-fx-padding: 0 50 10 10;"); + name.setCursor(Cursor.HAND); + name.setTooltip(new Tooltip("Click to display this recipe")); name.setOnMouseClicked(e -> - changeScene(View.RECIPE_VIEW, r) - ); + changeScene(View.RECIPE_VIEW, r) + ); Button removeRecipeButton = new Button(); removeRecipeButton.setStyle("-fx-background-color: dedede;" + "-fx-background-radius: 5;"); - ImageView imageView = new ImageView(String.valueOf(Recipe.class.getResource("/images/Tasty_Pages_X_Icon.png"))); - imageView.setPreserveRatio(true); - imageView.setFitHeight(20); - imageView.setFitWidth(20); - removeRecipeButton.setGraphic(imageView); + ImageView xIconImage = new ImageView(String.valueOf(Recipe.class.getResource("/images/Tasty_Pages_X_Icon.png"))); + xIconImage.setPreserveRatio(true); + xIconImage.setFitHeight(20); + xIconImage.setFitWidth(20); + removeRecipeButton.setGraphic(xIconImage); removeRecipeButton.setOnAction(e -> { mealPlan.clear(LocalDate.now().plusDays(J)); + render(); }); recipeHBox.getChildren().addAll(name, removeRecipeButton); @@ -134,7 +135,7 @@ public class MealPlanController extends BaseController { recipeImage.fitHeightProperty().bind(mealPlanGrid.heightProperty().subtract(60)); }, () -> { Button addRecipeButton = new Button(); - addRecipeButton.setStyle("-fx-background-color: dedede;" + + addRecipeButton.setStyle("-fx-background-color: #dedede;" + "-fx-background-radius: 10;"); ImageView imageView = new ImageView(String.valueOf(Recipe.class.getResource("/images/Tasty_Pages_Plus_Icon.png"))); imageView.setPreserveRatio(true); @@ -147,8 +148,6 @@ public class MealPlanController extends BaseController { ); GridPane.setHalignment(addRecipeButton, HPos.CENTER); }); - - } } @@ -185,8 +184,7 @@ public class MealPlanController extends BaseController { mealPlan.addRecipeToMealPlan(result, date); stackPane.getChildren().remove(searchVBox); - displayMealPlan(); - drawNutritionTable(); + render(); }); resultContainer.getChildren().add(resultLabel); } @@ -195,7 +193,7 @@ public class MealPlanController extends BaseController { } @FXML - public void clearMealplan() { + public void clearMealPlan() { mealPlan.clear(); displayMealPlan(); } @@ -223,14 +221,22 @@ public class MealPlanController extends BaseController { log.debug("Setting percentage for {}", textObject.getId()); progressBar.setProgress(value); textObject.setText(Math.round(value * 100) + "%"); - //TODO: set color based on value (below code doesnt work somehow) + //set text color for percentages if (value > 0.9) { - System.out.println("value larger than .9"); if (value > 1) { - System.out.println("value larger than 1"); - textObject.setStyle("-fx-text-fill: #D91C1C;"); - } else - textObject.setStyle("-fx-text-fill: #ff8a0d;"); + textObject.setFill(Color.valueOf("#D91C1C")); //red + } + textObject.setFill(Color.valueOf("#ff8a0d")); //orange + } else { + textObject.setFill(Color.valueOf("#000000")); //default: black } } + + /** + * Draws the meal plan and the nutrition table + */ + private void render() { + displayMealPlan(); + drawNutritionTable(); + } } diff --git a/src/main/java/mi/hdm/controllers/RecipeEditorController.java b/src/main/java/mi/hdm/controllers/RecipeEditorController.java index 8a73464a14b1062d89eb626426d91227c2ed9840..de3d896f41d0c30d1c6687b88e4d0a0af1b4f6b8 100644 --- a/src/main/java/mi/hdm/controllers/RecipeEditorController.java +++ b/src/main/java/mi/hdm/controllers/RecipeEditorController.java @@ -10,6 +10,7 @@ import mi.hdm.components.CategoryPreviewLabel; import mi.hdm.components.IngredientSearchResultLabel; import mi.hdm.components.SelectedIngredientLabel; import mi.hdm.exceptions.InvalidRecipeException; +import mi.hdm.helpers.Validation; import mi.hdm.recipes.*; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -75,13 +76,13 @@ public class RecipeEditorController extends BaseController { searchResults = new ArrayList<>(); selectedIngredients = new ArrayList<>(); - ingredientManager.getIngredientsFromKeys(recipe.getIngredients()).forEach((i, amount) -> { - if (i instanceof Ingredient) { - selectedIngredients.add(i); - } else { - log.error("No ingredient with code {}", i.getUniqueCode()); - } - }); + recipe.getIngredients() + .forEach((code, amount) -> { + ingredientManager.getIngredient(code).ifPresentOrElse( + selectedIngredients::add, + () -> log.error("No ingredient with code '{}'", code) + ); + }); recipeSearch = new RecipeSearch(recipeManager, ingredientManager); selectedIngredientsVbox = new VBox(); selectedIngredientLabels = new ArrayList<>(); @@ -208,11 +209,10 @@ public class RecipeEditorController extends BaseController { ingredients.put(label.getComponent(), label.getAmount()); }); - try { recipe.setIngredientFromRecipeComponents(ingredients); recipe.setDescription(descriptionTextArea.getText()); - recipe.setPreparation(List.of(preparationTextArea.getText().split("\n"))); + recipe.setPreparation(Validation.listNoEmptyLines(preparationTextArea.getText())); recipe.setCategoriesFromObjects(List.copyOf(selectedCategories)); String prepTime = prepTimeTextField.getText(); recipe.setPreparationTimeMins( isInteger(prepTime) ? Integer.parseInt(prepTime) : null); @@ -239,7 +239,7 @@ public class RecipeEditorController extends BaseController { @FXML public void incrementPageCounter() { - //increment the current page and re-render + //increment the current page of search results and re-render currentPage = Math.min(++currentPage, maxPages); log.debug("User selected page {} / {}", currentPage, maxPages); drawIngredientSearchResults(); @@ -247,7 +247,7 @@ public class RecipeEditorController extends BaseController { @FXML public void decrementPageCounter() { - //decrement the current page and re-render + //decrement the current page of search results and re-render currentPage = Math.max(0, --currentPage); log.debug("User selected page {} / {}", currentPage, maxPages); drawIngredientSearchResults(); diff --git a/src/main/java/mi/hdm/helpers/Validation.java b/src/main/java/mi/hdm/helpers/Validation.java index 2165b651a1a1cfd4e3a723ab40c0449b3c2b0b11..84341aefb48d0171ef8acd4cbcd272e07873e025 100644 --- a/src/main/java/mi/hdm/helpers/Validation.java +++ b/src/main/java/mi/hdm/helpers/Validation.java @@ -1,5 +1,8 @@ package mi.hdm.helpers; +import java.util.List; +import java.util.stream.Stream; + public class Validation { /** * Validate Strings before passing them to methods like Integer.parseInt() @@ -34,4 +37,11 @@ public class Validation { } return true; } + + /** + * @return a list from the lines of the provided string with no empty lines + */ + public static List<String> listNoEmptyLines(String input) { + return Stream.of(input.split("\n")).filter(s -> !s.isBlank()).toList(); + } } diff --git a/src/main/resources/fxml/Meal_Plan.fxml b/src/main/resources/fxml/Meal_Plan.fxml index 8fb350709031e42e7eeda404379e3ac589624bfe..67dabace508c6229d3b54f62c2e5e3fb3683d30b 100644 --- a/src/main/resources/fxml/Meal_Plan.fxml +++ b/src/main/resources/fxml/Meal_Plan.fxml @@ -4,18 +4,17 @@ <?import javafx.scene.control.*?> <?import javafx.scene.layout.*?> <?import javafx.scene.text.*?> - <AnchorPane fx:id="parent" prefHeight="700.0" prefWidth="960.0" xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="mi.hdm.controllers.MealPlanController"> <StackPane fx:id="stackPane" prefHeight="150.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> - <VBox prefHeight="445.0" prefWidth="872.0"> + <VBox alignment="TOP_RIGHT" prefHeight="445.0" prefWidth="872.0"> <GridPane hgap="8.0" prefHeight="57.0" prefWidth="842.0" vgap="8.0"> <columnConstraints> - <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="78.0" /> - <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="473.0" /> - <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="78.0"/> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="473.0"/> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/> </columnConstraints> <rowConstraints> - <RowConstraints minHeight="10.0" prefHeight="49.999996185302734" vgrow="SOMETIMES" /> + <RowConstraints minHeight="10.0" prefHeight="49.999996185302734" vgrow="SOMETIMES"/> </rowConstraints> <VBox.margin> <Insets left="15.0" right="15.0" /> @@ -34,142 +33,165 @@ <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> - <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/> </columnConstraints> <rowConstraints> - <RowConstraints maxHeight="110.0" minHeight="10.0" prefHeight="32.0" vgrow="SOMETIMES" /> - <RowConstraints maxHeight="204.0" minHeight="10.0" prefHeight="182.0" vgrow="SOMETIMES" /> + <RowConstraints maxHeight="110.0" minHeight="10.0" prefHeight="32.0" vgrow="SOMETIMES"/> + <RowConstraints maxHeight="204.0" minHeight="10.0" prefHeight="182.0" vgrow="SOMETIMES"/> </rowConstraints> <VBox.margin> - <Insets bottom="30.0" left="30.0" right="30.0" top="30.0" /> + <Insets bottom="30.0" left="30.0" right="30.0" top="30.0"/> </VBox.margin> </GridPane> - <HBox prefHeight="100.0" prefWidth="200.0"> - <children> - <VBox prefHeight="346.0" prefWidth="945.0" spacing="15.0"> - <Text fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="Nutrition"> - <font> - <Font name="Arial Bold" size="25.0" /> - </font> - </Text> - <Text fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="Check out your nutrition scores for this week's meal plan!"> - <font> - <Font name="Arial" size="17.0" /> - </font> - </Text> - <!-- Nutrition table starts here --> - <VBox prefHeight="200" prefWidth="500"> - <HBox alignment="CENTER_LEFT" prefHeight="57.0" prefWidth="872.0" spacing="5.0"> - <Text fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="Calories" wrappingWidth="83.47006416320801"> - <font> - <Font name="Arial" size="17.0" /> - </font> - </Text> - <ProgressBar fx:id="caloriesProgressBar" prefHeight="24.0" prefWidth="631.0" progress="0.0" style="-fx-background-color: #d9d9d9; -fx-background-radius: 5; -fx-control-inner-background: a; -fx-accent: #d91c1c;"> - <HBox.margin> - <Insets left="70.0" /> - </HBox.margin> - </ProgressBar> - <Text fx:id="caloriesPercentage" fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="0%" wrappingWidth="83.47006416320801"> - <font> - <Font name="Arial" size="17.0" /> - </font> - </Text> - </HBox> - <HBox alignment="CENTER_LEFT" prefHeight="53.0" prefWidth="872.0" spacing="5.0"> - <Text fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="Carbs" wrappingWidth="83.47006416320801"> - <font> - <Font name="Arial" size="17.0" /> - </font> - </Text> - <ProgressBar fx:id="carbsProgressBar" prefHeight="24.0" prefWidth="631.0" progress="0.0" style="-fx-background-color: #d9d9d9; -fx-control-inner-background: a; -fx-background-radius: 5; -fx-accent: #d91c1c;"> - <HBox.margin> - <Insets left="70.0" /> - </HBox.margin> - </ProgressBar> - <Text fx:id="carbsPercentage" fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="0%" wrappingWidth="83.47006416320801"> - <font> - <Font name="Arial" size="17.0" /> - </font> - </Text> - </HBox> - <HBox alignment="CENTER_LEFT" prefHeight="57.0" prefWidth="872.0" spacing="5.0"> - <Text fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="Fat" wrappingWidth="83.47006416320801"> - <font> - <Font name="Arial" size="17.0" /> - </font> - </Text> - <ProgressBar fx:id="fatProgressbar" prefHeight="24.0" prefWidth="631.0" progress="0.0" style="-fx-background-color: #d9d9d9; -fx-background-radius: 5; -fx-control-inner-background: a; -fx-accent: #d91c1c;"> - <HBox.margin> - <Insets left="70.0" /> - </HBox.margin> - </ProgressBar> - <Text fx:id="fatPercentage" fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="0%" wrappingWidth="83.47006416320801"> - <font> - <Font name="Arial" size="17.0" /> - </font> - </Text> - </HBox> - <HBox alignment="CENTER_LEFT" prefHeight="53.0" prefWidth="872.0" spacing="5.0"> - <Text fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="Protein" wrappingWidth="83.47006416320801"> - <font> - <Font name="Arial" size="17.0" /> - </font> - </Text> - <ProgressBar fx:id="proteinProgressBar" prefHeight="24.0" prefWidth="631.0" progress="0.0" style="-fx-background-color: #d9d9d9; -fx-control-inner-background: a; -fx-background-radius: 5; -fx-accent: #d91c1c;"> - <HBox.margin> - <Insets left="70.0" /> - </HBox.margin> - </ProgressBar> - <Text fx:id="proteinPercentage" fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="0%" wrappingWidth="83.47006416320801"> - <font> - <Font name="Arial" size="17.0" /> - </font> - </Text> - </HBox> - <HBox alignment="CENTER_LEFT" prefHeight="53.0" prefWidth="872.0" spacing="5.0"> - <Text fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="Fibers" wrappingWidth="83.47006416320801"> - <font> - <Font name="Arial" size="17.0" /> - </font> - </Text> - <ProgressBar fx:id="fibersProgressBar" prefHeight="24.0" prefWidth="631.0" progress="0.0" style="-fx-background-color: #d9d9d9; -fx-control-inner-background: a; -fx-background-radius: 5; -fx-accent: #d91c1c;"> - <HBox.margin> - <Insets left="70.0" /> - </HBox.margin> - </ProgressBar> - <Text fx:id="fiberPercentage" fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="0%" wrappingWidth="83.47006416320801"> - <font> - <Font name="Arial" size="17.0" /> - </font> - </Text> - </HBox> - <HBox alignment="CENTER_LEFT" prefHeight="53.0" prefWidth="872.0" spacing="5.0"> - <Text fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="Salt" wrappingWidth="83.47006416320801"> - <font> - <Font name="Arial" size="17.0" /> - </font> - </Text> - <ProgressBar fx:id="saltProgressBar" prefHeight="24.0" prefWidth="631.0" progress="0.0" style="-fx-background-color:#d9d9d9; -fx-control-inner-background: a; -fx-background-radius: 5; -fx-accent: #d91c1c;"> - <HBox.margin> - <Insets left="70.0" /> - </HBox.margin> - </ProgressBar> - <Text fx:id="saltPercentage" fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="0%" wrappingWidth="83.47006416320801"> - <font> - <Font name="Arial" size="17.0" /> - </font> - </Text> - </HBox> - </VBox> - </VBox> - <Button fx:id="clearButton" mnemonicParsing="false" onAction="#clearMealplan" prefHeight="36.0" prefWidth="170.0" style="-fx-background-color: transparent; -fx-border-color: d91c1c; -fx-border-width: 4; -fx-border-radius: 5;" text="Clear Meal Plan" textFill="#d91c1c"> - <font> - <Font name="System Bold" size="13.0" /> - </font> - </Button> - </children> - </HBox> + <Button fx:id="clearButton" mnemonicParsing="false" onAction="#clearMealPlan" prefHeight="36.0" + prefWidth="170.0" + style="-fx-background-color: transparent; -fx-border-color: d91c1c; -fx-border-width: 4; -fx-border-radius: 5;" + text="Clear Meal Plan" textFill="#d91c1c"> + <font> + <Font name="System Bold" size="13.0"/> + </font> + </Button> + <HBox prefHeight="100.0" prefWidth="200.0"> + <VBox prefHeight="346.0" prefWidth="945.0" spacing="15.0"> + <Text fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="Nutrition"> + <font> + <Font name="Arial Bold" size="25.0"/> + </font> + </Text> + <Text fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" + text="Check out your nutrition scores for this week's meal plan!"> + <font> + <Font name="Arial" size="17.0"/> + </font> + </Text> + <!-- Nutrition table starts here --> + <VBox prefHeight="200" prefWidth="500" spacing="10.0"> + <HBox alignment="CENTER_LEFT" prefHeight="57.0" prefWidth="872.0" spacing="5.0"> + <Text fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="Calories" + wrappingWidth="83.47006416320801"> + <font> + <Font name="Arial" size="17.0"/> + </font> + </Text> + <ProgressBar fx:id="caloriesProgressBar" prefHeight="24.0" prefWidth="631.0" progress="0.0" + style="-fx-background-color: #d9d9d9; -fx-background-radius: 5; -fx-control-inner-background: a; -fx-accent: #d91c1c;"> + <HBox.margin> + <Insets left="70.0"/> + </HBox.margin> + </ProgressBar> + <Text fx:id="caloriesPercentage" fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" + text="0%" wrappingWidth="83.47006416320801"> + <font> + <Font name="Arial" size="17.0"/> + </font> + </Text> + </HBox> + <HBox alignment="CENTER_LEFT" prefHeight="53.0" prefWidth="872.0" spacing="5.0"> + <Text fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="Carbs" + wrappingWidth="83.47006416320801"> + <font> + <Font name="Arial" size="17.0"/> + </font> + </Text> + <ProgressBar fx:id="carbsProgressBar" prefHeight="24.0" prefWidth="631.0" progress="0.0" + style="-fx-background-color: #d9d9d9; -fx-control-inner-background: a; -fx-background-radius: 5; -fx-accent: #d91c1c;"> + <HBox.margin> + <Insets left="70.0"/> + </HBox.margin> + </ProgressBar> + <Text fx:id="carbsPercentage" fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" + text="0%" wrappingWidth="83.47006416320801"> + <font> + <Font name="Arial" size="17.0"/> + </font> + </Text> + </HBox> + <HBox alignment="CENTER_LEFT" prefHeight="57.0" prefWidth="872.0" spacing="5.0"> + <Text fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="Fat" + wrappingWidth="83.47006416320801"> + <font> + <Font name="Arial" size="17.0"/> + </font> + </Text> + <ProgressBar fx:id="fatProgressbar" prefHeight="24.0" prefWidth="631.0" progress="0.0" + style="-fx-background-color: #d9d9d9; -fx-background-radius: 5; -fx-control-inner-background: a; -fx-accent: #d91c1c;"> + <HBox.margin> + <Insets left="70.0"/> + </HBox.margin> + </ProgressBar> + <Text fx:id="fatPercentage" fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="0%" + wrappingWidth="83.47006416320801"> + <font> + <Font name="Arial" size="17.0"/> + </font> + </Text> + </HBox> + <HBox alignment="CENTER_LEFT" prefHeight="53.0" prefWidth="872.0" spacing="5.0"> + <Text fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="Protein" + wrappingWidth="83.47006416320801"> + <font> + <Font name="Arial" size="17.0"/> + </font> + </Text> + <ProgressBar fx:id="proteinProgressBar" prefHeight="24.0" prefWidth="631.0" progress="0.0" + style="-fx-background-color: #d9d9d9; -fx-control-inner-background: a; -fx-background-radius: 5; -fx-accent: #d91c1c;"> + <HBox.margin> + <Insets left="70.0"/> + </HBox.margin> + </ProgressBar> + <Text fx:id="proteinPercentage" fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" + text="0%" wrappingWidth="83.47006416320801"> + <font> + <Font name="Arial" size="17.0"/> + </font> + </Text> + </HBox> + <HBox alignment="CENTER_LEFT" prefHeight="53.0" prefWidth="872.0" spacing="5.0"> + <Text fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="Fibers" + wrappingWidth="83.47006416320801"> + <font> + <Font name="Arial" size="17.0"/> + </font> + </Text> + <ProgressBar fx:id="fibersProgressBar" prefHeight="24.0" prefWidth="631.0" progress="0.0" + style="-fx-background-color: #d9d9d9; -fx-control-inner-background: a; -fx-background-radius: 5; -fx-accent: #d91c1c;"> + <HBox.margin> + <Insets left="70.0"/> + </HBox.margin> + </ProgressBar> + <Text fx:id="fiberPercentage" fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" + text="0%" wrappingWidth="83.47006416320801"> + <font> + <Font name="Arial" size="17.0"/> + </font> + </Text> + </HBox> + <HBox alignment="CENTER_LEFT" prefHeight="53.0" prefWidth="872.0" spacing="5.0"> + <Text fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="Salt" + wrappingWidth="83.47006416320801"> + <font> + <Font name="Arial" size="17.0"/> + </font> + </Text> + <ProgressBar fx:id="saltProgressBar" prefHeight="24.0" prefWidth="631.0" progress="0.0" + style="-fx-background-color:#d9d9d9; -fx-control-inner-background: a; -fx-background-radius: 5; -fx-accent: #d91c1c;"> + <HBox.margin> + <Insets left="70.0"/> + </HBox.margin> + </ProgressBar> + <Text fx:id="saltPercentage" fill="#1e1e1e" strokeType="OUTSIDE" strokeWidth="0.0" text="0%" + wrappingWidth="83.47006416320801"> + <font> + <Font name="Arial" size="17.0"/> + </font> + </Text> + </HBox> + </VBox> + </VBox> + </HBox> </VBox> </StackPane> + <padding> + <Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/> + </padding> </AnchorPane>