diff --git a/src/main/resources/view/AddIncome.fxml b/src/main/resources/view/AddIncome.fxml new file mode 100644 index 0000000000000000000000000000000000000000..6a20d21368ccd384df9972188c5d239a0ecdca03 --- /dev/null +++ b/src/main/resources/view/AddIncome.fxml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<?import javafx.geometry.Insets?> +<?import javafx.scene.control.ButtonType?> +<?import javafx.scene.control.ComboBox?> +<?import javafx.scene.control.DialogPane?> +<?import javafx.scene.control.Label?> +<?import javafx.scene.control.TextField?> +<?import javafx.scene.layout.ColumnConstraints?> +<?import javafx.scene.layout.GridPane?> +<?import javafx.scene.layout.RowConstraints?> + +<DialogPane prefWidth="480.0" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="no.ntnu.idatt1002.demo.controller.SceneController"> + <content> + <GridPane hgap="10.0" vgap="10.0"> + <columnConstraints> + <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 minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> + <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> + <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> + <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> + </rowConstraints> + <padding> + <Insets bottom="10.0" left="10.0" right="150.0" top="20.0" /> + </padding> + <children> + <Label text="Date:" /> + <Label text="Amount:" GridPane.rowIndex="1" /> + <Label text="Description:" GridPane.rowIndex="2" /> + <Label text="Category" GridPane.rowIndex="3"> + <GridPane.margin> + <Insets /> + </GridPane.margin></Label> + <TextField promptText="Date" GridPane.columnIndex="1" GridPane.columnSpan="2" /> + <TextField promptText="Amount" GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="1" /> + <TextField promptText="Description (optional)" GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="2" /> + <ComboBox prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="3"> + <GridPane.margin> + <Insets /> + </GridPane.margin> + </ComboBox> + </children> + </GridPane> + </content> + <buttonTypes> + <ButtonType fx:constant="OK" /> + <ButtonType fx:constant="CANCEL" /> + </buttonTypes> +</DialogPane> diff --git a/src/main/resources/view/NewBudget.fxml b/src/main/resources/view/NewBudget.fxml deleted file mode 100644 index d2cd389813f746c8b9cde247f98f100e4554b880..0000000000000000000000000000000000000000 --- a/src/main/resources/view/NewBudget.fxml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<?import javafx.scene.control.Button?> -<?import javafx.scene.control.ListView?> -<?import javafx.scene.control.TextArea?> -<?import javafx.scene.image.Image?> -<?import javafx.scene.image.ImageView?> -<?import javafx.scene.layout.AnchorPane?> -<?import javafx.scene.text.Text?> - -<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="no.ntnu.idatt1002.demo.controller.SceneController"> - <children> - <ImageView fitHeight="400.0" fitWidth="600.0" pickOnBounds="true"> - <image> - <Image url="@../Images/backgroundMini.jpg" /> - </image> - </ImageView> - <ListView layoutX="133.0" layoutY="145.0" prefHeight="233.0" prefWidth="313.0" /> - <TextArea layoutX="133.0" layoutY="97.0" prefHeight="39.0" prefWidth="276.0" /> - <Button layoutX="409.0" layoutY="97.0" mnemonicParsing="false" prefHeight="39.0" prefWidth="38.0" text="+" /> - <Text layoutX="133.0" layoutY="84.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Write your income here:" /> - <Button layoutX="14.0" layoutY="14.0" mnemonicParsing="false" onAction="#switchStartMenu" text="Back" /> - </children> -</AnchorPane> diff --git a/src/main/resources/view/Overview.fxml b/src/main/resources/view/Overview.fxml new file mode 100644 index 0000000000000000000000000000000000000000..0e755e1429fbb261380a5ae3fc1919754a001314 --- /dev/null +++ b/src/main/resources/view/Overview.fxml @@ -0,0 +1,148 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<?import javafx.geometry.Insets?> +<?import javafx.scene.Cursor?> +<?import javafx.scene.control.Button?> +<?import javafx.scene.control.ComboBox?> +<?import javafx.scene.control.TableColumn?> +<?import javafx.scene.control.TableView?> +<?import javafx.scene.image.Image?> +<?import javafx.scene.image.ImageView?> +<?import javafx.scene.layout.AnchorPane?> +<?import javafx.scene.layout.BorderPane?> +<?import javafx.scene.layout.ColumnConstraints?> +<?import javafx.scene.layout.GridPane?> +<?import javafx.scene.layout.HBox?> +<?import javafx.scene.layout.Region?> +<?import javafx.scene.layout.RowConstraints?> +<?import javafx.scene.layout.VBox?> +<?import javafx.scene.text.Font?> +<?import javafx.scene.text.Text?> + +<AnchorPane xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="no.ntnu.idatt1002.demo.controller.SceneController"> + <children> + <ImageView fitHeight="400.0" fitWidth="600.0" pickOnBounds="true"> + <image> + <Image url="@../Images/backgroundMini.jpg" /> + </image> + <cursor> + <Cursor fx:constant="DEFAULT" /> + </cursor> + </ImageView> + <BorderPane prefHeight="400.0" prefWidth="593.0"> + <top> + <HBox BorderPane.alignment="CENTER"> + <children> + <Button cancelButton="true" mnemonicParsing="false" onAction="#switchStartMenu" text="Return "> + <opaqueInsets> + <Insets left="100.0" /> + </opaqueInsets> + <HBox.margin> + <Insets left="10.0" top="10.0" /> + </HBox.margin> + </Button> + <Region prefHeight="70.0" prefWidth="141.0" /> + <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Income" textAlignment="CENTER" translateX="30.0"> + <HBox.margin> + <Insets /> + </HBox.margin> + <font> + <Font size="48.0" /> + </font> + </Text> + </children> + <opaqueInsets> + <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> + </opaqueInsets> + </HBox> + </top> + <center> + <GridPane BorderPane.alignment="CENTER"> + <BorderPane.margin> + <Insets bottom="40.0" left="40.0" right="40.0" /> + </BorderPane.margin> + <columnConstraints> + <ColumnConstraints hgrow="ALWAYS" maxWidth="485.3333231608073" minWidth="10.0" prefWidth="427.33335367838544" /> + <ColumnConstraints hgrow="ALWAYS" maxWidth="111.33333333333331" minWidth="10.0" prefWidth="92.66664632161456" /> + </columnConstraints> + <rowConstraints> + <RowConstraints maxHeight="65.33334064483643" minHeight="10.0" prefHeight="65.33334064483643" vgrow="SOMETIMES" /> + <RowConstraints maxHeight="298.66665744781494" minHeight="10.0" prefHeight="214.00004069010413" vgrow="SOMETIMES" /> + <RowConstraints maxHeight="298.66665744781494" minHeight="10.0" prefHeight="29.999959309895814" vgrow="SOMETIMES" /> + </rowConstraints> + <children> + <HBox alignment="BOTTOM_LEFT" prefWidth="410.0" spacing="5.0"> + <children> + <Button fx:id="add" alignment="TOP_CENTER" mnemonicParsing="false" text="Add" textAlignment="CENTER" /> + <Button fx:id="add1" alignment="TOP_CENTER" mnemonicParsing="false" text="Edit" textAlignment="CENTER" /> + <Button fx:id="add11" alignment="TOP_CENTER" mnemonicParsing="false" text="Delete" textAlignment="CENTER" /> + </children> + <opaqueInsets> + <Insets /> + </opaqueInsets> + <padding> + <Insets bottom="5.0" /> + </padding> + </HBox> + <VBox alignment="BOTTOM_LEFT" prefHeight="200.0" prefWidth="100.0" spacing="5.0" GridPane.columnIndex="1"> + <children> + <ComboBox fx:id="show" prefWidth="150.0" promptText="Show"> + <opaqueInsets> + <Insets /> + </opaqueInsets> + <VBox.margin> + <Insets bottom="5.0" /> + </VBox.margin> + </ComboBox> + </children> + </VBox> + <HBox prefHeight="100.0" prefWidth="200.0" GridPane.columnSpan="2" GridPane.rowIndex="2"> + <children> + <Button mnemonicParsing="false" text="Overview"> + <HBox.margin> + <Insets right="5.0" /> + </HBox.margin></Button> + <Button disable="true" mnemonicParsing="false" onAction="#switchIncome" text="Income" textFill="#4d1616" /> + <Button mnemonicParsing="false" onAction="#switchExpenses" text="Expenses" /> + <Button mnemonicParsing="false" text="Savings" /> + <Button mnemonicParsing="false" onAction="#switchExpenses" text="Next"> + <HBox.margin> + <Insets left="170.0" /> + </HBox.margin></Button> + </children> + <padding> + <Insets top="10.0" /> + </padding> + </HBox> + <TableView fx:id="expenseTableView" prefHeight="260.0" prefWidth="485.0" GridPane.columnSpan="2" GridPane.rowIndex="1"> + <columns> + <TableColumn fx:id="date" prefWidth="75.0" text="Date" /> + <TableColumn fx:id="amount" prefWidth="75.0" text="Amount" /> + <TableColumn fx:id="category" prefWidth="75.0" text="Category" /> + <TableColumn fx:id="description" prefWidth="75.0" text="Description" /> + </columns> + <columnResizePolicy> + <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> + </columnResizePolicy> + </TableView> + </children> + </GridPane> + </center> + <opaqueInsets> + <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> + </opaqueInsets> + <left> + <Region prefHeight="357.0" prefWidth="25.0" BorderPane.alignment="CENTER" /> + </left> + <right> + <Region prefHeight="357.0" prefWidth="0.0" BorderPane.alignment="CENTER" /> + </right> + <bottom> + <Region prefHeight="0.0" prefWidth="600.0" BorderPane.alignment="CENTER" /> + </bottom> + </BorderPane> + </children> + <opaqueInsets> + <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> + </opaqueInsets> +</AnchorPane>