Skip to content
Snippets Groups Projects
Commit e45bdeca authored by HSoreide's avatar HSoreide
Browse files

Create initial classes and fxml files for food recipes

parent bb30da12
No related branches found
No related tags found
2 merge requests!42Hs frontend recipes,!41Hs frontend recipes
package no.ntnu.idatt1002.demo.controller;
public class AddIngredientController {
}
package no.ntnu.idatt1002.demo.controller;
public class AllRecipesController {
}
package no.ntnu.idatt1002.demo.controller;
public class RecipeController {
}
package no.ntnu.idatt1002.demo.controller;
public class SuggestRecipesController {
}
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="no.ntnu.idatt1002.demo.controller.AddIngredientController">
<children>
<BorderPane prefHeight="400.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<center>
<VBox prefHeight="200.0" prefWidth="100.0" BorderPane.alignment="CENTER" />
</center>
<top>
<HBox prefHeight="84.0" prefWidth="600.0" BorderPane.alignment="CENTER">
<children>
<Pane prefHeight="84.0" prefWidth="0.0">
<children>
<Label text="Add ingredients to the Fridge">
<font>
<Font size="24.0" />
</font>
</Label>
</children>
</Pane>
<Pane prefHeight="84.0" prefWidth="93.0">
<children>
<Button layoutX="7.0" layoutY="28.0" mnemonicParsing="false" text="Close">
<font>
<Font size="14.0" />
</font>
</Button>
</children>
</Pane>
</children>
</HBox>
</top>
<bottom>
<Pane prefHeight="55.0" prefWidth="600.0" BorderPane.alignment="CENTER">
<children>
<HBox>
<children>
<Pane prefHeight="815.0" prefWidth="347.0">
<children>
<TextField layoutX="90.0" layoutY="8.0" prefHeight="31.0" prefWidth="198.0" />
</children>
</Pane>
<Pane prefHeight="815.0" prefWidth="269.0">
<children>
<Button layoutX="8.0" layoutY="20.0" mnemonicParsing="false" text="Add" />
</children>
</Pane>
</children>
</HBox>
</children>
</Pane>
</bottom>
</BorderPane>
</children>
</AnchorPane>
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
fx:controller="view.AllRecipes"
prefHeight="400.0" prefWidth="600.0">
</AnchorPane>
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
fx:controller="view.Recipe"
prefHeight="400.0" prefWidth="600.0">
</AnchorPane>
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.image.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="695.0" prefWidth="1130.0" xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="no.ntnu.idatt1002.demo.controller.SuggestRecipesController">
<children>
<ImageView fitHeight="695.0" fitWidth="1130.0" pickOnBounds="true">
<image>
<Image url="@../Images/backgroundMini.jpg" />
</image>
</ImageView>
<BorderPane prefHeight="400.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<right>
<VBox id="fridge" prefHeight="577.0" prefWidth="421.0" BorderPane.alignment="CENTER">
<children>
<Pane prefHeight="64.0" prefWidth="421.0">
<children>
<Label layoutX="101.0" layoutY="17.0" text="Food in the Fridge" underline="true">
<font>
<Font size="24.0" />
</font>
</Label>
</children>
</Pane>
<ListView prefHeight="472.0" prefWidth="421.0" />
<Pane prefHeight="47.0" prefWidth="421.0">
<children>
<Button fx:id="addFridgeButton" layoutX="80.0" layoutY="9.0" mnemonicParsing="false" onAction="#addToFridge" text="Add another available ingredient">
<font>
<Font size="14.0" />
</font>
</Button>
</children>
</Pane>
</children>
<padding>
<Insets right="20.0" />
</padding></VBox>
</right>
<bottom>
<Pane prefHeight="42.0" prefWidth="600.0" BorderPane.alignment="CENTER" />
</bottom>
<top>
<BorderPane prefHeight="76.0" prefWidth="600.0" BorderPane.alignment="CENTER">
<left>
<Pane prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER">
<children>
<Button alignment="CENTER" contentDisplay="CENTER" layoutX="62.0" layoutY="24.0" mnemonicParsing="false" text="Go Back" textAlignment="CENTER">
<font>
<Font size="14.0" />
</font>
</Button>
</children>
</Pane>
</left>
<center>
<Label text="Recipe Suggestions" BorderPane.alignment="CENTER">
<font>
<Font size="48.0" />
</font>
</Label>
</center>
<right>
<VBox alignment="CENTER_LEFT" prefHeight="400.0" prefWidth="405.0" BorderPane.alignment="CENTER" />
</right>
</BorderPane>
</top></BorderPane>
</children>
</AnchorPane>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment