added screenshots to tutorial

This commit is contained in:
David Guler 2022-12-10 13:22:40 +01:00
parent 56020a7529
commit fb21797040
3 changed files with 65 additions and 23 deletions

View File

@ -22,6 +22,8 @@ public class TutorialController {
public ImageView imgAddNewPlant; public ImageView imgAddNewPlant;
public ImageView imgTaskList; public ImageView imgTaskList;
public ImageView imgSelectDate; public ImageView imgSelectDate;
public ImageView imgAddTaskButton;
public ImageView imgDetailDeleteButtons;
private int page = 0; private int page = 0;
@ -30,10 +32,17 @@ public class TutorialController {
switchViews(); switchViews();
setButtonAbilities(); setButtonAbilities();
Image placeholder = new Image(String.valueOf(PlantsController.class.getResource("placeholder.png"))); Image addNewPlantImage = new Image(String.valueOf(PlantsController.class.getResource("add-new-plant.png")));
imgAddNewPlant.setImage(placeholder); Image selectSowHarvestImage = new Image(String.valueOf(PlantsController.class.getResource("select-sow-harvest.png")));
imgSelectDate.setImage(placeholder); Image scheduleImage = new Image(String.valueOf(PlantsController.class.getResource("schedule.png")));
imgTaskList.setImage(placeholder); Image detailDeleteButtonsImage = new Image(String.valueOf(PlantsController.class.getResource("details-delete.png")));
Image addTaskImage = new Image(String.valueOf(PlantsController.class.getResource("add-task.png")));
imgAddNewPlant.setImage(addNewPlantImage);
imgSelectDate.setImage(selectSowHarvestImage);
imgDetailDeleteButtons.setImage(detailDeleteButtonsImage);
imgAddTaskButton.setImage(addTaskImage);
imgTaskList.setImage(scheduleImage);
} }
public void viewNextPage() { public void viewNextPage() {

View File

@ -89,7 +89,7 @@
<Insets bottom="10.0" /> <Insets bottom="10.0" />
</VBox.margin> </VBox.margin>
</ListView> </ListView>
<Button styleClass="button-class" fx:id="addTask_button" mnemonicParsing="false" onAction="#addTask" prefHeight="25.0" prefWidth="45.0" VBox.vgrow="NEVER"> <Button styleClass="button-class" fx:id="addTask_button" mnemonicParsing="false" onAction="#addTask" prefHeight="25.0" prefWidth="120.0" VBox.vgrow="NEVER" text="Add Task">
<VBox.margin> <VBox.margin>
<Insets /> <Insets />
</VBox.margin> </VBox.margin>

View File

@ -14,7 +14,7 @@
<?import javafx.scene.text.Text?> <?import javafx.scene.text.Text?>
<?import javafx.scene.text.TextFlow?> <?import javafx.scene.text.TextFlow?>
<BorderPane maxHeight="470.0" maxWidth="724.0" minHeight="470.0" minWidth="724.0" prefHeight="470.0" prefWidth="724.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ch.zhaw.gartenverwaltung.TutorialController"> <BorderPane maxHeight="470.0" maxWidth="724.0" minHeight="470.0" minWidth="724.0" prefHeight="470.0" prefWidth="724.0" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ch.zhaw.gartenverwaltung.TutorialController">
<bottom> <bottom>
<HBox alignment="CENTER" prefHeight="0.0" prefWidth="724.0" BorderPane.alignment="CENTER"> <HBox alignment="CENTER" prefHeight="0.0" prefWidth="724.0" BorderPane.alignment="CENTER">
<children> <children>
@ -22,9 +22,9 @@
<Separator prefWidth="50.0" visible="false" HBox.hgrow="ALWAYS" /> <Separator prefWidth="50.0" visible="false" HBox.hgrow="ALWAYS" />
<ButtonBar prefHeight="40.0" prefWidth="200.0"> <ButtonBar prefHeight="40.0" prefWidth="200.0">
<buttons> <buttons>
<Button styleClass="button-class" cancelButton="true" contentDisplay="CENTER" graphicTextGap="5.0" mnemonicParsing="false" text="Close" onAction="#closeTutorial"/> <Button cancelButton="true" contentDisplay="CENTER" graphicTextGap="5.0" mnemonicParsing="false" onAction="#closeTutorial" styleClass="button-class" text="Close" />
<Button styleClass="button-class" fx:id="previousPageButton" mnemonicParsing="false" text="Previous" onAction="#viewPreviousPage"/> <Button fx:id="previousPageButton" mnemonicParsing="false" onAction="#viewPreviousPage" styleClass="button-class" text="Previous" />
<Button styleClass="button-class" fx:id="nextPageButton" defaultButton="true" mnemonicParsing="false" text="Next" onAction="#viewNextPage" /> <Button fx:id="nextPageButton" defaultButton="true" mnemonicParsing="false" onAction="#viewNextPage" styleClass="button-class" text="Next" />
</buttons> </buttons>
</ButtonBar> </ButtonBar>
</children> </children>
@ -38,7 +38,7 @@
<children> <children>
<VBox layoutX="30.0" layoutY="26.0" opacity="0.0" prefHeight="200.0" prefWidth="100.0"> <VBox layoutX="30.0" layoutY="26.0" opacity="0.0" prefHeight="200.0" prefWidth="100.0">
<children> <children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Managing Your Crops"> <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Adding Crops">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
@ -75,7 +75,7 @@
</children> </children>
</TextFlow> </TextFlow>
<Separator prefWidth="200.0" visible="false" HBox.hgrow="ALWAYS" /> <Separator prefWidth="200.0" visible="false" HBox.hgrow="ALWAYS" />
<ImageView fx:id="imgSelectDate" fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" /> <ImageView fx:id="imgSelectDate" fitHeight="150.0" fitWidth="400.0" pickOnBounds="true" preserveRatio="true" />
</children> </children>
</HBox> </HBox>
</children> </children>
@ -83,7 +83,50 @@
<Insets /> <Insets />
</opaqueInsets> </opaqueInsets>
</VBox> </VBox>
<VBox prefHeight="200.0" prefWidth="100.0"> <VBox layoutX="30.0" layoutY="30.0" prefHeight="200.0" prefWidth="100.0">
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Managing Your Crops">
<font>
<Font size="24.0" />
</font>
</Text>
<Separator prefWidth="200.0">
<VBox.margin>
<Insets bottom="15.0" top="10.0" />
</VBox.margin>
</Separator>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Once you've added a crop to your garden, it will be displayed in the &quot;My Garden&quot; tab.">
<VBox.margin>
<Insets bottom="20.0" />
</VBox.margin>
</Text>
<HBox prefHeight="100.0" prefWidth="200.0">
<children>
<TextFlow lineSpacing="4.0" prefHeight="200.0" prefWidth="500.0">
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="On the right hand side of the listing, you'll see two buttons.&#10;&#10;Button with the &quot;trash can&quot; icon lets you remove a crop from your garden plan. This will also delete all associated tasks.&#10;&#10;The button on the left will display the details of the crop in a new window." />
</children>
</TextFlow>
<Separator prefWidth="200.0" visible="false" HBox.hgrow="ALWAYS" />
<ImageView fitHeight="70.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" fx:id="imgDetailDeleteButtons"/>
</children></HBox>
<HBox layoutX="10.0" layoutY="105.0" prefHeight="100.0" prefWidth="200.0">
<children>
<TextFlow lineSpacing="4.0" prefHeight="200.0" prefWidth="500.0">
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Here, you can also add your own custom tasks, by clicking the &quot;Add Task&quot; button.&#10;In the subsequently shown dialog, you can enter the corresponding details.&#10;&#10;Note: If you want to make a task recurring, you need to set both an interval (in days) AND an end date, so the task won't repeat for all eternity." />
</children>
</TextFlow>
<Separator prefWidth="200.0" visible="false" HBox.hgrow="ALWAYS" />
<ImageView fitHeight="150.0" fitWidth="400.0" pickOnBounds="true" preserveRatio="true" fx:id="imgAddTaskButton"/>
</children>
</HBox>
</children>
<opaqueInsets>
<Insets />
</opaqueInsets>
</VBox>
<VBox opacity="0.0" prefHeight="200.0" prefWidth="100.0">
<children> <children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Managing Your Tasks"> <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Managing Your Tasks">
<font> <font>
@ -111,19 +154,9 @@
</HBox.margin> </HBox.margin>
</TextFlow> </TextFlow>
<Separator prefWidth="200.0" visible="false" HBox.hgrow="ALWAYS" /> <Separator prefWidth="200.0" visible="false" HBox.hgrow="ALWAYS" />
<ImageView fx:id="imgTaskList" fitHeight="98.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" /> <ImageView fx:id="imgTaskList" fitHeight="200.0" fitWidth="400.0" pickOnBounds="true" preserveRatio="true" />
</children> </children>
</HBox> </HBox>
<HBox prefHeight="100.0" prefWidth="200.0">
<children>
<TextFlow lineSpacing="4.0" prefHeight="200.0" prefWidth="500.0">
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="You can also add your own custom tasks, by clicking the &quot;Add Task&quot; button.&#10;In the subsequently shown dialog, you can enter the corresponding details.&#10;&#10;Note: If you want to make a task recurring, you need to set both an interval (in days) AND an end date, so the task won't repeat for all eternity." />
</children>
</TextFlow>
<Separator prefWidth="200.0" visible="false" HBox.hgrow="ALWAYS" />
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" />
</children></HBox>
</children> </children>
<opaqueInsets> <opaqueInsets>
<Insets /> <Insets />