diff --git a/src/main/resources/view/BudgetNewest.fxml b/src/main/resources/view/BudgetNewest.fxml new file mode 100644 index 0000000000000000000000000000000000000000..6a148dd77c2104c983501c5dd7b0ed25f359ea9d --- /dev/null +++ b/src/main/resources/view/BudgetNewest.fxml @@ -0,0 +1,192 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<?import javafx.geometry.Insets?> +<?import javafx.scene.Cursor?> +<?import javafx.scene.chart.PieChart?> +<?import javafx.scene.control.Button?> +<?import javafx.scene.control.ComboBox?> +<?import javafx.scene.control.ContextMenu?> +<?import javafx.scene.control.DatePicker?> +<?import javafx.scene.control.Label?> +<?import javafx.scene.control.MenuItem?> +<?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.Pane?> +<?import javafx.scene.layout.RowConstraints?> +<?import javafx.scene.layout.VBox?> +<?import javafx.scene.text.Font?> + + +<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="695.0" prefWidth="1130.0" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="no.ntnu.idatt1002.demo.controller.BudgetController"> + <children> + <ImageView fitHeight="695.0" fitWidth="1130.0" pickOnBounds="true"> + <image> + <Image url="@../Images/backgroundMini.jpg" /> + </image> + <cursor> + <Cursor fx:constant="DEFAULT" /> + </cursor> + </ImageView> + <VBox prefHeight="695.0" prefWidth="1100.0"> + <children> + <BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="143.0" prefWidth="1100.0"> + <right> + <Pane BorderPane.alignment="CENTER"> + <children> + <Label fx:id="daysLeftLbl" layoutX="27.0" layoutY="83.0" text="Days left: 31"> + <font> + <Font name="Lucida Console" size="14.0" /> + </font> + </Label> + <DatePicker fx:id="date" layoutX="-4.0" layoutY="55.0" prefWidth="175.0" /> + </children> + </Pane> + </right> + <left> + <Pane prefWidth="175.0" BorderPane.alignment="CENTER"> + <children> + <Button fx:id="returnBtn" alignment="CENTER" layoutX="-2.0" layoutY="58.0" mnemonicParsing="false" onAction="#returnToMainMenu" text="Return to Main Menu"> + <font> + <Font name="Lucida Console" size="14.0" /> + </font> + </Button> + </children> + </Pane> + </left> + <center> + <Label fx:id="title" text="Budget" textAlignment="CENTER" BorderPane.alignment="CENTER"> + <font> + <Font name="Lucida Console" size="48.0" /> + </font> + </Label> + </center> + <VBox.margin> + <Insets left="15.0" /> + </VBox.margin> + </BorderPane> + <BorderPane prefHeight="64.0" prefWidth="1100.0"> + <left> + <HBox prefHeight="100.0" prefWidth="200.0" spacing="10.0" BorderPane.alignment="CENTER"> + <children> + <Button fx:id="editBtn1" mnemonicParsing="false" onAction="#handleAddBtn" prefHeight="25.0" prefWidth="60.0"> + <font> + <Font name="Lucida Console" size="12.0" /> + </font> + <graphic> + <ImageView fitHeight="30.0" fitWidth="50.0" pickOnBounds="true" preserveRatio="true"> + <image> + <Image url="@../Images/add.png" /> + </image> + </ImageView> + </graphic> + </Button> + <Button fx:id="editBtn" mnemonicParsing="false" onAction="#handleEditBtn" prefHeight="25.0" prefWidth="60.0"> + <font> + <Font name="Lucida Console" size="12.0" /> + </font> + <graphic> + <ImageView fitHeight="30.0" fitWidth="50.0" pickOnBounds="true" preserveRatio="true"> + <image> + <Image url="@../Images/edit.png" /> + </image> + </ImageView> + </graphic> + </Button> + <Button fx:id="deleteBtn" mnemonicParsing="false" onAction="#handleDeleteBtn" prefHeight="25.0" prefWidth="60.0"> + <font> + <Font name="Lucida Console" size="12.0" /> + </font> + <graphic> + <ImageView fitHeight="30.0" fitWidth="50.0" pickOnBounds="true" preserveRatio="true"> + <image> + <Image url="@../Images/delete.png" /> + </image> + </ImageView> + </graphic> + </Button> + </children> + <BorderPane.margin> + <Insets left="30.0" /> + </BorderPane.margin> + </HBox> + </left> + <right> + <Pane BorderPane.alignment="CENTER" /> + </right> + <opaqueInsets> + <Insets /> + </opaqueInsets> + <VBox.margin> + <Insets left="10.0" right="15.0" /> + </VBox.margin> + <center> + <Pane BorderPane.alignment="CENTER"> + <children> + <ComboBox fx:id="filter" layoutX="134.0" layoutY="2.0" prefWidth="150.0" promptText="Show"> + <opaqueInsets> + <Insets /> + </opaqueInsets> + </ComboBox> + </children> + </Pane> + </center> + </BorderPane> + <GridPane prefHeight="473.0" prefWidth="1055.0"> + <columnConstraints> + <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> + <children> + <VBox prefHeight="475.0" prefWidth="485.0"> + <children> + <TableView fx:id="budgetTableView" maxHeight="450.0" prefHeight="450.0" prefWidth="523.0"> + <columns> + <TableColumn fx:id="categoryCol" prefWidth="75.0" text="Category" /> + <TableColumn fx:id="amountCol" prefWidth="75.0" text="Amount" /> + <TableColumn fx:id="descriptionCol" prefWidth="75.0" text="Description" /> + </columns> + <columnResizePolicy> + <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> + </columnResizePolicy> + <contextMenu> + <ContextMenu> + <items> + <MenuItem mnemonicParsing="false" text="Unspecified Action" /> + </items> + </ContextMenu> + </contextMenu> + </TableView> + <Label text="Sum: "> + <font> + <Font name="Lucida Console" size="14.0" /> + </font> + </Label> + </children> + </VBox> + <Pane GridPane.columnIndex="1"> + <children> + <PieChart fx:id="budgetPieChart" layoutX="39.0" layoutY="5.0" legendSide="RIGHT" maxHeight="444.0" maxWidth="512.0" prefHeight="444.0" prefWidth="446.0" /> + </children> + </Pane> + </children> + <padding> + <Insets left="10.0" /> + </padding> + <VBox.margin> + <Insets left="30.0" right="30.0" /> + </VBox.margin> + </GridPane> + </children> + </VBox> + </children> +</AnchorPane>