From c0cc4f0ee756db31fed8b941c2411e21d24da4ce Mon Sep 17 00:00:00 2001 From: Harry Linrui XU <xulr0820@hotmail.com> Date: Thu, 20 Apr 2023 13:41:05 +0200 Subject: [PATCH] Deleted unnecessary files and classes --- .../demo/controller/ExpensesController.java | 286 ------------------ .../demo/controller/IncomeController.java | 283 ----------------- .../demo/controller/MainMenuController.java | 114 ------- src/main/resources/view/AddBudget.fxml | 57 ---- src/main/resources/view/Budget.fxml | 78 ----- src/main/resources/view/BudgetNew.fxml | 188 ------------ src/main/resources/view/Income.fxml | 257 ---------------- src/main/resources/view/MainMenu.fxml | 164 ---------- src/main/resources/view/Overview.fxml | 130 -------- src/main/resources/view/deleteBudget.fxml | 44 --- .../resources/view/initialNewBudgetPopUp.fxml | 88 ------ .../resources/view/initialOldBudgetPopUp.fxml | 14 - src/main/resources/view/underProgress.fxml | 35 --- 13 files changed, 1738 deletions(-) delete mode 100644 src/main/java/no/ntnu/idatt1002/demo/controller/ExpensesController.java delete mode 100644 src/main/java/no/ntnu/idatt1002/demo/controller/IncomeController.java delete mode 100644 src/main/java/no/ntnu/idatt1002/demo/controller/MainMenuController.java delete mode 100644 src/main/resources/view/AddBudget.fxml delete mode 100644 src/main/resources/view/Budget.fxml delete mode 100644 src/main/resources/view/BudgetNew.fxml delete mode 100644 src/main/resources/view/Income.fxml delete mode 100644 src/main/resources/view/MainMenu.fxml delete mode 100644 src/main/resources/view/Overview.fxml delete mode 100644 src/main/resources/view/deleteBudget.fxml delete mode 100644 src/main/resources/view/initialNewBudgetPopUp.fxml delete mode 100644 src/main/resources/view/initialOldBudgetPopUp.fxml delete mode 100644 src/main/resources/view/underProgress.fxml diff --git a/src/main/java/no/ntnu/idatt1002/demo/controller/ExpensesController.java b/src/main/java/no/ntnu/idatt1002/demo/controller/ExpensesController.java deleted file mode 100644 index d3ac8a5a..00000000 --- a/src/main/java/no/ntnu/idatt1002/demo/controller/ExpensesController.java +++ /dev/null @@ -1,286 +0,0 @@ -package no.ntnu.idatt1002.demo.controller; - -import java.io.IOException; - -import java.util.Optional; -import javafx.collections.FXCollections; -import javafx.collections.ObservableList; -import javafx.event.ActionEvent; -import javafx.fxml.FXML; -import javafx.fxml.FXMLLoader; -import javafx.scene.Node; -import javafx.scene.Parent; -import javafx.scene.Scene; -import javafx.scene.control.Alert; -import javafx.scene.control.Alert.AlertType; -import javafx.scene.control.Button; -import javafx.scene.control.ButtonType; -import javafx.scene.control.ComboBox; -import javafx.scene.control.Dialog; -import javafx.scene.control.TableColumn; -import javafx.scene.control.TableView; -import javafx.scene.control.cell.PropertyValueFactory; -import javafx.scene.text.Text; -import javafx.stage.Modality; -import javafx.stage.Stage; -import no.ntnu.idatt1002.demo.data.Economics.Expense; -import no.ntnu.idatt1002.demo.data.Economics.ExpenseCategory; -import no.ntnu.idatt1002.demo.data.Economics.ExpenseRegister; -import no.ntnu.idatt1002.demo.data.Economics.FileHandling; -import no.ntnu.idatt1002.demo.data.Economics.Income; -import no.ntnu.idatt1002.demo.data.Economics.IncomeRegister; -import no.ntnu.idatt1002.demo.data.Economics.Item; -import no.ntnu.idatt1002.demo.data.Economics.ItemRegister; - -/** - * Controller for expense scene in the application. This controller manages all actions that relates to the expense tableview (add, edit and delete), the switching - * of scenes from the expense scene to another scene, and the saving of the table, whenever the user switches to another scene. - * - * @author Harry Linrui Xu - * @since 13.3.2023 - */ -public class ExpensesController { - - @FXML - private Button addBtn; - @FXML - private Button editBtn; - - @FXML - private Button deleteBtn; - - @FXML - private ComboBox<String> show; - - @FXML - private Button incomeBtn; - - @FXML - private Text sum; - - @FXML - private Button budgetBtn; - - @FXML - private Button returnBtn; - - - @FXML - private TableColumn<Expense, Double> amountColumn; - - @FXML - private TableColumn<Expense, ExpenseCategory> categoryColumn; - - @FXML - private TableColumn<Expense, String> dateColumn; - - @FXML - private TableColumn<Expense, String> descriptionColumn; - - @FXML - private TableColumn<Expense, Boolean> recurringColumn; - - @FXML - private TableView<Expense> expenseTableView; - - @FXML - ExpenseRegister expenseRegister; - ObservableList<Expense> expenses; - - ObservableList<String> filter; - - /** - * Initializes the expense register, the observable expense list and the tableview, along values of the dropbox used for filtering the tableview. - * The method is called each time the FXML of this scene is loaded. - * @throws IOException If there occurs any exception when loading the budget register from a file. - */ - @FXML - public void initialize() throws IOException { - //Initialize table columns - dateColumn.setCellValueFactory(new PropertyValueFactory<Expense, String>("date")); - amountColumn.setCellValueFactory(new PropertyValueFactory<Expense, Double>("amount")); - categoryColumn.setCellValueFactory(new PropertyValueFactory<Expense, ExpenseCategory>("category")); - descriptionColumn.setCellValueFactory(new PropertyValueFactory<Expense, String>("description")); - recurringColumn.setCellValueFactory(new PropertyValueFactory<Expense, Boolean>("recurring")); - - //Initialize the filter box - filter = FXCollections.observableArrayList("All", "Food", "Clothes", "Books", "Other", - "Fixed expense"); - show.setItems(filter); - show.setValue("All"); - - //Initialize registers and tableview - expenseRegister = loadExpenseDataFromFile("Expense"); - expenses = FXCollections.observableArrayList(expenseRegister.getItems()); - expenseTableView.setItems(expenses); - - //Initialize sum field under the tableview - sum.setText(String.valueOf(expenseRegister.getTotalSum())); - } - - /** - * Method for handling the adding of new entries in the tableview. - * @param event A button click on the add button. - */ - @FXML - protected void handleAddButton(ActionEvent event) { - handleEditButton(event); - } - - /** - * Method for handling the editing of a chosen entry in the tableview. - * @param event A button click on the edit button. - */ - @FXML - protected void handleEditButton(ActionEvent event) { - //Instantiate FXML loader and loads the popup for adding expense - FXMLLoader loader = new FXMLLoader(); - loader.setLocation(getClass().getResource("/view/AddExpense.fxml")); - - Expense newExpense = null; - String dialogTitle = ""; - // Load the FXML file for your dialog box - Dialog<Expense> dialog = new Dialog<>(); - dialog.initModality(Modality.APPLICATION_MODAL); - - try { - // Set the Dialog's content to the loaded FXML file - dialog.getDialogPane().setContent(loader.load()); - } catch (IOException e) { - e.printStackTrace(); - } - - // Get the controller for the loaded FXML file - AddExpenseController dialogController = loader.getController(); - - /** - * The mode of the dialog. NEW if new contact, EDIT if edit existing contact. - */ - DialogMode dialogMode; - //Sets the title of the dialog box - if (event.getSource().equals(addBtn)) { - dialogMode = DialogMode.ADD; - dialogTitle = "Add expense"; - - - } else if (event.getSource().equals(editBtn) - && expenseTableView.getSelectionModel().getSelectedItem() != null) { - dialogMode = DialogMode.EDIT; - dialogTitle = "Edit expense"; - //Gets the selected item from the table - newExpense = expenseTableView.getSelectionModel().getSelectedItem(); - //Binds the selected item to another item which is defined in the ItemController - dialogController.setExpense(newExpense); - } else { - return; - } - dialog.setTitle(dialogTitle); - // Show the Dialog and wait for the user to close it - dialog.showAndWait(); - - //Get the newly created expense from the dialog pane - newExpense = dialogController.getNewExpense(); - - //Adds the new item to the register - if (newExpense != null && dialogMode == DialogMode.ADD) { - expenseRegister.addItem(newExpense); - } - //Updates the tableview using the register - refreshTableView(); - } - - /** - * Deletes an entry from the tableview, if an entry has been selected. The method brings up a popup window, asking for confirmation for deleting the entry. - * @param event A button click on the delete button - */ - @FXML - public void handleDeleteBtn(ActionEvent event) { - Expense chosenExpense = expenseTableView.getSelectionModel().getSelectedItem(); - if (chosenExpense == null) { - return; - } - Optional<ButtonType> isConfirmed = showConfirmationDialog(); - if (isConfirmed.isPresent() && isConfirmed.get() == ButtonType.OK) { - expenseRegister.removeItem(chosenExpense); - refreshTableView(); - } - } - - /** - * Method for synching the register with the tableview. The observable list to which the tableview is set, is being refilled with all the entries - * in the register, keeping it updated with new changes. - */ - protected void refreshTableView() { - this.expenses.setAll(expenseRegister.getItems()); - this.sum.setText(String.valueOf(expenseRegister.getTotalSum())); - - } - - /** - * Returns an optional, which is a popup alert box, asking for confirmation for deleting an entry. - * @return An alert box, asking for confirmation for deleting the selected entry of the tableview. - */ - private Optional<ButtonType> showConfirmationDialog() { - Alert alert = new Alert(AlertType.CONFIRMATION); - alert.setTitle("Confirm Delete"); - alert.setHeaderText("Delete Confirmation"); - alert.setContentText("Are you sure you would like to delete the selected entry?"); - - return alert.showAndWait(); - } - - /** - * Method that either reads data from a file with which it fills an expense register, if older changes exist, or instantiates an expense register if the file is empty. - * @param fileName The name of the file that is being read from. - * @return An object of type IncomeRegister. - * @throws IOException If an error occurs while reading from the file. - */ - public ExpenseRegister loadExpenseDataFromFile(String fileName) throws IOException { - //ItemRegister<T extends Item> - FileHandling fileHandling = new FileHandling(); - if (fileHandling.isEmpty(fileName)) { - expenseRegister = new ExpenseRegister(); - } else { - try { - expenseRegister = fileHandling.readExpenseRegisterFromFile(fileName); - } catch (IOException e) { - e.printStackTrace(); - } - } - return expenseRegister; - } - - /** - * Saves the changes made to the expense tableview by writing the information to a file. - * @param fileName The name of the file that is written to. - * @throws IOException If an error occurs while writing to the file. - */ - public void saveDataToFile(String fileName) throws IOException { - FileHandling fileHandling = new FileHandling(); - fileHandling.writeItemRegisterToFile(expenseRegister, fileName); - } - - /** - * Switches scenes from the expense scene to another, by loading a new FXML file and setting the scene to this location. - * The destination depends entirely on which button is pressed. - * @param event A button click on the buttons on the buttonbar or the next button - * @throws IOException If an error occurs with loading any of the FXML files. - */ - @FXML - public void switchScene(ActionEvent event) throws IOException { - saveDataToFile("Expense"); - FXMLLoader loader = new FXMLLoader(); - if (event.getSource() == incomeBtn) { - loader.setLocation(SceneController.class.getResource("/view/Income.fxml")); - } else if (event.getSource() == returnBtn) { - loader.setLocation(SceneController.class.getResource("/view/FirstMenu.fxml")); - } else if (event.getSource() == budgetBtn) { - loader.setLocation(SceneController.class.getResource("/view/BudgetNew.fxml")); - } - Parent root = loader.load(); - Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow(); - Scene scene = new Scene(root); - stage.setScene(scene); - stage.show(); - } - } diff --git a/src/main/java/no/ntnu/idatt1002/demo/controller/IncomeController.java b/src/main/java/no/ntnu/idatt1002/demo/controller/IncomeController.java deleted file mode 100644 index c25c5ebb..00000000 --- a/src/main/java/no/ntnu/idatt1002/demo/controller/IncomeController.java +++ /dev/null @@ -1,283 +0,0 @@ -package no.ntnu.idatt1002.demo.controller; - -import java.io.IOException; - -import java.util.Optional; -import javafx.collections.FXCollections; -import javafx.collections.ObservableList; -import javafx.event.ActionEvent; -import javafx.fxml.FXML; -import javafx.fxml.FXMLLoader; -import javafx.scene.Node; -import javafx.scene.Parent; -import javafx.scene.Scene; -import javafx.scene.control.Alert; -import javafx.scene.control.Alert.AlertType; -import javafx.scene.control.Button; -import javafx.scene.control.ButtonType; -import javafx.scene.control.ComboBox; -import javafx.scene.control.Dialog; -import javafx.scene.control.TableColumn; -import javafx.scene.control.TableView; -import javafx.scene.control.cell.PropertyValueFactory; -import javafx.scene.text.Text; -import javafx.stage.Modality; -import javafx.stage.Stage; -import no.ntnu.idatt1002.demo.data.Economics.Income; -import no.ntnu.idatt1002.demo.data.Economics.IncomeCategory; -import no.ntnu.idatt1002.demo.data.Economics.IncomeRegister; -import no.ntnu.idatt1002.demo.data.Economics.FileHandling; - -/** - * Controller for income scene in the application. This controller manages all actions that relates to the income tableview (add, edit and delete), the switching - * of scenes from the income scene to another scene, and the saving of the table, whenever the user switches to another scene. - * - * @author Harry Linrui Xu - * @since 24.3.2023 - */ -public class IncomeController { - - @FXML - private Button addBtn; - @FXML - private Button editBtn; - - @FXML - private Button deleteBtn; - - @FXML - private ComboBox<String> show; - - @FXML - private Button expenseBtn; - - @FXML - private Button overviewBtn; - - @FXML - private Button budgetBtn; - @FXML - private Button returnBtn; - - @FXML - private Text sum; - @FXML - private TableColumn<Income, Double> amountColumn; - - @FXML - private TableColumn<Income, IncomeCategory> categoryColumn; - - @FXML - private TableColumn<Income, String> dateColumn; - - @FXML - private TableColumn<Income, String> descriptionColumn; - - @FXML - private TableColumn<Income, Boolean> recurringColumn; - - @FXML - private TableView<Income> incomeTableView; - - IncomeRegister incomeRegister; - ObservableList<Income> income; - - ObservableList<String> filter; - - /** - * Initializes the income register, the observable income list and the tableview, along values of the dropbox used for filtering the tableview. - * The method is called each time the FXML of this scene is loaded. - * @throws IOException If there occurs any exception when loading the budget register from a file. - */ - @FXML - public void initialize() throws IOException { - //Initialize table columns - dateColumn.setCellValueFactory(new PropertyValueFactory<Income, String>("date")); - amountColumn.setCellValueFactory(new PropertyValueFactory<Income, Double>("amount")); - categoryColumn.setCellValueFactory(new PropertyValueFactory<Income, IncomeCategory>("category")); - descriptionColumn.setCellValueFactory(new PropertyValueFactory<Income, String>("description")); - recurringColumn.setCellValueFactory(new PropertyValueFactory<Income, Boolean>("recurring")); - - //Initialize the filter box - filter = FXCollections.observableArrayList("All", "Gift", "Salary", "Student loan", "Fixed income"); - show.setItems(filter); - show.setValue("All"); - - //Initialize registers and tableview - incomeRegister = loadIncomeDataFromFile("Income"); - income = FXCollections.observableArrayList(incomeRegister.getItems()); - incomeTableView.setItems(income); - - //Initialize sum field under the tableview - sum.setText(String.valueOf(incomeRegister.getTotalSum())); - //if budget.register isEmpty -> disable expense - } - - /** - * Method for handling the adding of new entries in the tableview. - * @param event A button click on the add button. - */ - @FXML - protected void handleAddButton(ActionEvent event) { - handleEditButton(event); - } - - /** - * Method for handling the editing of a chosen entry in the tableview. - * @param event A button click on the edit button. - */ - @FXML - protected void handleEditButton(ActionEvent event) { - //Instantiate FXML loader and loads the popup for adding income - FXMLLoader loader = new FXMLLoader(); - loader.setLocation(getClass().getResource("/view/AddIncome.fxml")); - - Income newIncome = null; - String dialogTitle = ""; - // Load the FXML file for your dialog box - Dialog<Income> dialog = new Dialog<>(); - dialog.initModality(Modality.APPLICATION_MODAL); - - try { - // Set the Dialog's content to the loaded FXML file - dialog.getDialogPane().setContent(loader.load()); - } catch (IOException e) { - e.printStackTrace(); - } - - // Get the controller for the loaded FXML file - AddIncomeController dialogController = loader.getController(); - - /** - * The mode of the dialog. NEW if new contact, EDIT if edit existing contact. - */ - DialogMode dialogMode; - //Sets the title of the dialog box - if (event.getSource().equals(addBtn)) { - dialogMode = DialogMode.ADD; - dialogTitle = "Add income"; - } - else if (event.getSource().equals(editBtn) && incomeTableView.getSelectionModel().getSelectedItem() != null) { - dialogMode = DialogMode.EDIT; - dialogTitle = "Edit income"; - //Gets the selected item from the table - newIncome = incomeTableView.getSelectionModel().getSelectedItem(); - //Binds the selected item to another item which is defined in the ItemController - dialogController.setIncome(newIncome); - } - else { - return; - } - - dialog.setTitle(dialogTitle); - // Show the Dialog and wait for the user to close it - dialog.showAndWait(); - //Get the newly created income from the dialog pane - newIncome = dialogController.getNewIncome(); - - //Adds the new item to the register - if (newIncome != null && dialogMode == DialogMode.ADD) { - incomeRegister.addItem(newIncome); - } - //Updates the tableview using the register - refreshTableView(); - } - - /** - * Deletes an entry from the tableview, if an entry has been selected. The method brings up a popup window, asking for confirmation for deleting the entry. - * @param event A button click on the delete button - */ - @FXML - public void handleDeleteBtn(ActionEvent event) { - //Gets the selected item from the tableview - Income chosenIncome = incomeTableView.getSelectionModel().getSelectedItem(); - //Exits the method if nothing is selected - if (chosenIncome == null) { - return; - } - //Brings up a confirmation popup - Optional<ButtonType> isConfirmed = showConfirmationDialog(); - if (isConfirmed.isPresent() && isConfirmed.get() == ButtonType.OK) { - incomeRegister.removeItem(chosenIncome); - refreshTableView(); - } - } - - /** - * Method for synching the register with the tableview. The observable list to which the tableview is set, is being refilled with all the entries - * in the register, keeping it updated with new changes. - */ - protected void refreshTableView() { - this.income.setAll(incomeRegister.getItems()); - this.sum.setText(String.valueOf(incomeRegister.getTotalSum())); - } - - /** - * Returns an optional, which is a popup alert box, asking for confirmation for deleting an entry. - * @return An alert box, asking for confirmation for deleting the selected entry of the tableview. - */ - private Optional<ButtonType> showConfirmationDialog() { - Alert alert = new Alert(AlertType.CONFIRMATION); - alert.setTitle("Confirm Delete"); - alert.setHeaderText("Delete Confirmation"); - alert.setContentText("Are you sure you would like to delete the selected entry?"); - - return alert.showAndWait(); - } - - /** - * Method that either reads data from a file with which it fills an income register, if older changes exist, or instantiates an income register if the file is empty. - * @param fileName The name of the file that is being read from. - * @return An object of type IncomeRegister. - * @throws IOException If an error occurs while reading from the file. - */ - public IncomeRegister loadIncomeDataFromFile(String fileName) throws IOException { - FileHandling fileHandling = new FileHandling(); - //Instantiate new incomeRegister - if (fileHandling.isEmpty(fileName)) { - incomeRegister = new IncomeRegister(); - } else { //Load previous income register - try { - incomeRegister = fileHandling.readIncomeRegisterFromFile(fileName); - } catch (IOException e) { - e.printStackTrace(); - } - } - return incomeRegister; - } - - /** - * Saves the changes made to the income tableview by writing the information to a file. - * @param fileName The name of the file that is written to. - * @throws IOException If an error occurs while writing to the file. - */ - public void saveDataToFile(String fileName) throws IOException { - FileHandling fileHandling = new FileHandling(); - fileHandling.writeItemRegisterToFile(incomeRegister, fileName); - } - - /** - * Switches scenes from the income scene to another, by loading a new FXML file and setting the scene to this location. - * The destination depends entirely on which button is pressed. - * @param event A button click on the buttons on the buttonbar or the next button - * @throws IOException If an error occurs with loading any of the FXML files. - */ - @FXML - public void switchScene(ActionEvent event) throws IOException { - //Always saving the data when switching scenes - saveDataToFile("Income"); - FXMLLoader loader = new FXMLLoader(); - if (event.getSource() == overviewBtn) { - loader.setLocation(SceneController.class.getResource("/view/Overview.fxml")); - } else if (event.getSource() == returnBtn) { - loader.setLocation(SceneController.class.getResource("/view/FirstMenu.fxml")); - } else if (event.getSource() == budgetBtn) { - loader.setLocation(SceneController.class.getResource("/view/BudgetNewest.fxml")); - } - Parent root = loader.load(); - Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow(); - Scene scene = new Scene(root); - stage.setScene(scene); - stage.show(); - } - } diff --git a/src/main/java/no/ntnu/idatt1002/demo/controller/MainMenuController.java b/src/main/java/no/ntnu/idatt1002/demo/controller/MainMenuController.java deleted file mode 100644 index 9a0fe9bc..00000000 --- a/src/main/java/no/ntnu/idatt1002/demo/controller/MainMenuController.java +++ /dev/null @@ -1,114 +0,0 @@ -package no.ntnu.idatt1002.demo.controller; -import java.io.IOException; -import java.time.LocalDate; -import javafx.event.ActionEvent; -import javafx.fxml.FXML; -import javafx.fxml.FXMLLoader; -import javafx.scene.Node; -import javafx.scene.Parent; -import javafx.scene.Scene; -import javafx.scene.control.Button; -import javafx.scene.control.DatePicker; -import javafx.scene.control.Label; -import javafx.scene.control.ProgressBar; -import javafx.scene.image.ImageView; -import javafx.scene.paint.Color; -import javafx.scene.text.Text; -import javafx.stage.Stage; -import no.ntnu.idatt1002.demo.data.Economics.ExpenseRegister; -import no.ntnu.idatt1002.demo.data.Economics.FileHandling; -import no.ntnu.idatt1002.demo.data.Economics.IncomeRegister; - -/** - * Class that acts as both a main menu and monthly budget overview that shows the monthly progress of a users account. - * The main menu act as a hub that branches to numerous other windows, such as adding expenses or looking into food recipes. - */ -public class MainMenuController { - - @FXML - private Button addExpenseBtn; - - @FXML - private Button foodButton; - - @FXML - private Button overviewBtn; - - @FXML - private ProgressBar progressbar; - - @FXML - private DatePicker date; - - @FXML - private ImageView progressMarker; - - @FXML - private Label today; - - @FXML - private Text budgetMonth; - - @FXML - private Label balanceLbl; - - - /** - * Initializes various classes that relates to income and expense, in order to present the overview that depends on the - * income (money inflow) and expense (money outflow). - * Sets the progress bar, budget month, balance label, date and how much of the monthly budget has been spent. - * @throws IOException Upon errors with file reading/writing. - */ - @FXML - public void initialize() throws IOException { - //Instantiate the income- controller and register - IncomeController incomeController = new IncomeController(); - IncomeRegister incomeRegister = incomeController.loadIncomeDataFromFile("Income"); - - //Instantiate the expense- controller and register - ExpensesController expensesController = new ExpensesController(); - ExpenseRegister expenseRegister = expensesController.loadExpenseDataFromFile("Expense"); - - double incomeSum = incomeRegister.getTotalSum(); - double expenseSum = expenseRegister.getTotalSum(); - - //Set progress - progressbar.setProgress(expenseSum/incomeSum); - //progressMarker.setTranslateX(-275 + progressbar.getProgress()); - - //Displaying month - budgetMonth.setText("BUDGET " + (LocalDate.EPOCH.getMonth())); - double balance = incomeSum - expenseSum; - //Set balance - balanceLbl.setText("Balance: " + (balance)); - - //Displaying how much of the monthly budget has been spent. - today.setText("Used " + expenseSum + " out of " + incomeSum + " this month"); - - if (balance < 0) { - balanceLbl.setTextFill(Color.RED); - } - - date.setValue(LocalDate.now()); - //date.restrict - } - - /** - * Switches scenes from the main menu scene to another, by loading a new FXML file and setting the scene to this location. - * The destination depends entirely on which button is pressed. - * @param event A button click. - * @throws IOException If an error occurs with loading any of the FXML files. - */ - @FXML - public void switchScene(ActionEvent event) throws IOException { - FXMLLoader loader = new FXMLLoader(); - loader.setLocation(SceneController.class.getResource("/view/Budget.fxml")); - - - Parent root = loader.load(); - Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow(); - Scene scene = new Scene(root); - stage.setScene(scene); - stage.show(); - } -} diff --git a/src/main/resources/view/AddBudget.fxml b/src/main/resources/view/AddBudget.fxml deleted file mode 100644 index e2f1e248..00000000 --- a/src/main/resources/view/AddBudget.fxml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<?import javafx.scene.control.Button?> -<?import javafx.scene.control.ComboBox?> -<?import javafx.scene.control.Label?> -<?import javafx.scene.control.TextField?> -<?import javafx.scene.layout.AnchorPane?> -<?import javafx.scene.layout.ColumnConstraints?> -<?import javafx.scene.layout.GridPane?> -<?import javafx.scene.layout.HBox?> -<?import javafx.scene.layout.RowConstraints?> -<?import javafx.scene.layout.VBox?> -<?import javafx.scene.text.Text?> - -<AnchorPane prefHeight="150.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="no.ntnu.idatt1002.demo.controller.AddBudgetController"> - <children> - <GridPane prefHeight="400.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> - <columnConstraints> - <ColumnConstraints hgrow="SOMETIMES" maxWidth="10.0" minWidth="0.0" prefWidth="0.0" /> - <ColumnConstraints hgrow="SOMETIMES" maxWidth="180.0" minWidth="10.0" prefWidth="150.0" /> - <ColumnConstraints hgrow="SOMETIMES" maxWidth="180.0" minWidth="10.0" prefWidth="150.0" /> - <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> - <ColumnConstraints hgrow="SOMETIMES" maxWidth="10.0" minWidth="10.0" prefWidth="0.0" /> - </columnConstraints> - <rowConstraints> - <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> - <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> - </rowConstraints> - <children> - <VBox alignment="CENTER" GridPane.columnIndex="1" GridPane.valignment="CENTER"> - <children> - <Label text="Category/Title" /> - <ComboBox fx:id="categoryVariable" maxWidth="150.0" prefWidth="150.0" /> - </children> - </VBox> - <VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2"> - <children> - <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Amount" /> - <TextField fx:id="amountVariable" maxWidth="150.0" /> - </children> - </VBox> - <VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="3"> - <children> - <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Description" /> - <TextField fx:id="descriptionVariable" /> - </children> - </VBox> - <HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0" spacing="15.0" GridPane.columnIndex="3" GridPane.rowIndex="1"> - <children> - <Button fx:id="cancelButton" mnemonicParsing="false" onAction="#closeButton" text="Cancel" /> - <Button fx:id="okBtn" mnemonicParsing="false" onAction="#pressOkBtn" prefWidth="57.0" text="OK" /> - </children> - </HBox> - </children> - </GridPane> - </children> -</AnchorPane> diff --git a/src/main/resources/view/Budget.fxml b/src/main/resources/view/Budget.fxml deleted file mode 100644 index 9b1f0cf2..00000000 --- a/src/main/resources/view/Budget.fxml +++ /dev/null @@ -1,78 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<?import javafx.scene.control.Button?> -<?import javafx.scene.control.TableColumn?> -<?import javafx.scene.control.TableView?> -<?import javafx.scene.control.TextArea?> -<?import javafx.scene.image.Image?> -<?import javafx.scene.image.ImageView?> -<?import javafx.scene.layout.AnchorPane?> -<?import javafx.scene.layout.ColumnConstraints?> -<?import javafx.scene.layout.FlowPane?> -<?import javafx.scene.layout.GridPane?> -<?import javafx.scene.layout.HBox?> -<?import javafx.scene.layout.RowConstraints?> -<?import javafx.scene.text.Font?> -<?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.BudgetController"> - <children> - <ImageView fitHeight="468.0" fitWidth="600.0" pickOnBounds="true"> - <image> - <Image url="@../Images/backgroundMini.jpg" /> - </image> - </ImageView> - <GridPane prefHeight="468.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> - <columnConstraints> - <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> - </columnConstraints> - <rowConstraints> - <RowConstraints maxHeight="397.0" minHeight="10.0" prefHeight="61.0" vgrow="SOMETIMES" /> - <RowConstraints maxHeight="397.0" minHeight="10.0" prefHeight="41.0" vgrow="SOMETIMES" /> - <RowConstraints maxHeight="397.0" minHeight="10.0" prefHeight="296.0" vgrow="SOMETIMES" /> - <RowConstraints maxHeight="152.0" minHeight="10.0" prefHeight="79.0" vgrow="SOMETIMES" /> - </rowConstraints> - <children> - <HBox alignment="TOP_CENTER" prefHeight="98.0" prefWidth="600.0" spacing="40.0" GridPane.rowIndex="3"> - <children> - <Button fx:id="addBudget" minHeight="60.0" minWidth="100.0" mnemonicParsing="false" onAction="#handleEditButton" prefWidth="100.0" text="Add" /> - <Button fx:id="editBudget" minHeight="60.0" minWidth="100.0" mnemonicParsing="false" onAction="#handleEditButton" prefWidth="100.0" text="Edit" /> - <Button fx:id="deleteBudget" minHeight="60.0" minWidth="100.0" mnemonicParsing="false" onAction="#handleDeleteBtn" prefWidth="100.0" text="Delete" /> - <Button minHeight="60.0" minWidth="100.0" mnemonicParsing="false" prefWidth="100.0" text="Save/Back" /> - </children> - </HBox> - <FlowPane alignment="CENTER" columnHalignment="CENTER" prefHeight="200.0" prefWidth="200.0" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER"> - <children> - <TableView fx:id="budgetTableView" prefHeight="260.0" prefWidth="540.0"> - <columns> - <TableColumn fx:id="categoryColumn" prefWidth="75.0" text="Category/Title" /> - <TableColumn fx:id="percentageColumn" prefWidth="75.0" text="Percentage" /> - <TableColumn fx:id="amountColumn" prefWidth="75.0" text="Amount" /> - <TableColumn fx:id="descriptionColumn" prefWidth="75.0" text="Description" /> - </columns> - <columnResizePolicy> - <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> - </columnResizePolicy> - </TableView> - </children> - </FlowPane> - <HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0"> - <children> - <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Budget"> - <font> - <Font size="48.0" /> - </font> - </Text> - </children> - </HBox> - <HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0" GridPane.rowIndex="1"> - <children> - <TextArea fx:id="monthVariable" prefHeight="20.0" prefWidth="180.0" text="Month" /> - <TextArea fx:id="daysVariable" prefHeight="20.0" prefWidth="180.0" text="Days" /> - <TextArea fx:id="totalBudgetAmount" prefHeight="20.0" prefWidth="180.0" text="Amount" /> - </children> - </HBox> - </children> - </GridPane> - </children> -</AnchorPane> diff --git a/src/main/resources/view/BudgetNew.fxml b/src/main/resources/view/BudgetNew.fxml deleted file mode 100644 index c92fd969..00000000 --- a/src/main/resources/view/BudgetNew.fxml +++ /dev/null @@ -1,188 +0,0 @@ -<?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.StackPane?> -<?import javafx.scene.layout.VBox?> -<?import javafx.scene.shape.Rectangle?> -<?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.BudgetController"> - <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="600.0"> - <top> - <HBox BorderPane.alignment="CENTER"> - <children> - <Button fx:id="returnBtn" mnemonicParsing="false" onAction="#switchScene" 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="Budget" textAlignment="CENTER" wrappingWidth="174.6796875"> - <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 maxHeight="298.66665744781494" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> - </rowConstraints> - <children> - <HBox alignment="BOTTOM_LEFT" prefWidth="410.0" spacing="5.0"> - <children> - <Button fx:id="addBudget" alignment="TOP_CENTER" mnemonicParsing="false" onAction="#handleAddButton" text="Add" textAlignment="CENTER"> - <graphic> - <ImageView fitHeight="19.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true"> - <image> - <Image url="@../Images/add_image.png" /> - </image> - </ImageView> - </graphic> - </Button> - <Button fx:id="editBudget" alignment="TOP_CENTER" mnemonicParsing="false" onAction="#handleEditButton" text="Edit" textAlignment="CENTER"> - <graphic> - <ImageView fitHeight="19.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true"> - <image> - <Image url="@../Images/edit.png" /> - </image> - </ImageView> - </graphic> - </Button> - <Button fx:id="deleteBtn" alignment="TOP_CENTER" mnemonicParsing="false" onAction="#handleDeleteBtn" text="Delete" textAlignment="CENTER"> - <graphic> - <ImageView fitHeight="19.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true"> - <image> - <Image url="@../Images/delete.png" /> - </image> - </ImageView> - </graphic> - </Button> - </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="3"> - <children> - <Button fx:id="incomeBtn" mnemonicParsing="false" onAction="#switchScene" text="Income" /> - <Button fx:id="budgetBtn" disable="true" mnemonicParsing="false" onAction="#switchScene" text="Budget" /> - <Button fx:id="expenseBtn" mnemonicParsing="false" onAction="#switchScene" text="Expenses" /> - <Button fx:id="nextBtn" mnemonicParsing="false" onAction="#switchScene" text="Next"> - <HBox.margin> - <Insets left="170.0" /> - </HBox.margin> - </Button> - </children> - <padding> - <Insets top="10.0" /> - </padding> - </HBox> - <TableView fx:id="budgetTableView" prefHeight="260.0" prefWidth="485.0" GridPane.columnSpan="2" GridPane.rowIndex="1"> - <columns> - <TableColumn fx:id="categoryColumn" prefWidth="75.0" text="Category/Title" /> - <TableColumn fx:id="amountColumn" prefWidth="75.0" text="Amount" /> - <TableColumn fx:id="percentageColumn" prefWidth="75.0" text="Percentage" /> - <TableColumn fx:id="descriptionColumn" prefWidth="75.0" text="Description" /> - </columns> - <columnResizePolicy> - <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> - </columnResizePolicy> - </TableView> - <StackPane GridPane.rowIndex="2"> - <children> - <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#f8f8f8" height="18.0" stroke="#d9cccc" strokeType="INSIDE" width="209.0" StackPane.alignment="CENTER_LEFT" /> - <HBox prefHeight="18.0" prefWidth="517.0"> - <children> - <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Sum: "> - <HBox.margin> - <Insets left="2.0" /> - </HBox.margin> - </Text> - <Region prefHeight="18.0" prefWidth="101.0" /> - <Text fx:id="sum" strokeType="OUTSIDE" strokeWidth="0.0" text="Text" /> - </children> - </HBox> - </children> - </StackPane> - </children> - </GridPane> - </center> - <opaqueInsets> - <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> - </opaqueInsets> - <left> - <Region prefHeight="330.0" prefWidth="1.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> diff --git a/src/main/resources/view/Income.fxml b/src/main/resources/view/Income.fxml deleted file mode 100644 index 448891dd..00000000 --- a/src/main/resources/view/Income.fxml +++ /dev/null @@ -1,257 +0,0 @@ -<?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.MenuButton?> -<?import javafx.scene.control.MenuItem?> -<?import javafx.scene.control.ProgressBar?> -<?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?> -<?import javafx.scene.text.Text?> - -<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.IncomeExpenseController"> - <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="INCOME AND EXPENSES" 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> - <MenuButton mnemonicParsing="false" prefHeight="25.0" prefWidth="50.0"> - <items> - <MenuItem fx:id="addIncome" mnemonicParsing="false" onAction="#handleAddBtn" text="Income" /> - <MenuItem fx:id="addExpense" mnemonicParsing="false" onAction="#handleAddBtn" text="Expense" /> - </items> - <graphic> - <ImageView fitHeight="30.0" fitWidth="50.0" pickOnBounds="true" preserveRatio="true"> - <image> - <Image url="@../Images/add.png" /> - </image> - </ImageView> - </graphic> - </MenuButton> - <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"> - <children> - <ProgressBar fx:id="budgetProgress" prefWidth="200.0" progress="0.0" /> - </children> - </Pane> - </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" percentHeight="5.0" prefHeight="30.0" vgrow="SOMETIMES" /> - <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> - <RowConstraints minHeight="10.0" percentHeight="4.0" prefHeight="30.0" vgrow="SOMETIMES" /> - <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> - </rowConstraints> - <children> - <VBox maxWidth="490.0" prefHeight="215.0" prefWidth="490.0" GridPane.rowIndex="1"> - <children> - <TableView fx:id="incomeTableView" maxHeight="175.0" prefHeight="175.0" prefWidth="264.0"> - <columns> - <TableColumn fx:id="inDateCol" prefWidth="75.0" text="Date" /> - <TableColumn fx:id="inAmountCol" prefWidth="75.0" text="Amount" /> - <TableColumn fx:id="inCategoryCol" prefWidth="75.0" text="Category" /> - <TableColumn fx:id="inDescriptionCol" prefWidth="75.0" text="Description" /> - <TableColumn fx:id="inRecurringCol" prefWidth="75.0" text="Recurring" /> - </columns> - <columnResizePolicy> - <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> - </columnResizePolicy> - <contextMenu> - <ContextMenu> - <items> - <MenuItem mnemonicParsing="false" onAction="#handleEditBtn" text="Edit" /> - <MenuItem fx:id="handleDeleteIncome" mnemonicParsing="false" onAction="#handleDeleteBtn" text="Delete " /> - </items> - </ContextMenu> - </contextMenu> - </TableView> - <Label text="Sum: "> - <font> - <Font name="Lucida Console" size="14.0" /> - </font> - </Label> - </children> - </VBox> - <Pane GridPane.columnIndex="1" GridPane.rowIndex="1"> - <children> - <PieChart fx:id="incomePieChart" layoutX="4.0" layoutY="-41.0" legendSide="RIGHT" maxHeight="244.0" maxWidth="512.0" prefHeight="244.0" prefWidth="350.0" title="Income" /> - </children> - </Pane> - <Pane GridPane.columnIndex="1" GridPane.rowIndex="3"> - <children> - <PieChart fx:id="expensePieChart" layoutX="-2.0" layoutY="-37.0" legendSide="RIGHT" maxHeight="261.0" maxWidth="519.0" prefHeight="237.0" prefWidth="350.0" title="Expenses" /> - </children> - </Pane> - <Pane prefHeight="20.0" prefWidth="1046.0"> - <children> - <Text layoutY="16.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Income" textAlignment="CENTER"> - <font> - <Font name="Lucida Console" size="14.0" /> - </font> - </Text> - </children> - </Pane> - <VBox GridPane.rowIndex="3"> - <children> - <TableView fx:id="expenseTableView" maxHeight="175.0" maxWidth="490.0" prefHeight="172.0" prefWidth="264.0"> - <columns> - <TableColumn fx:id="expDateCol" prefWidth="75.0" text="Date" /> - <TableColumn fx:id="expAmountCol" prefWidth="75.0" text="Amount" /> - <TableColumn fx:id="expCategoryCol" prefWidth="75.0" text="Category" /> - <TableColumn fx:id="expDescriptionCol" prefWidth="75.0" text="Description" /> - <TableColumn fx:id="expRecurringCol" prefWidth="75.0" text="Recurring" /> - </columns> - <columnResizePolicy> - <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> - </columnResizePolicy> - <contextMenu> - <ContextMenu> - <items> - <MenuItem mnemonicParsing="false" onAction="#handleEditBtn" text="Edit" /> - <MenuItem fx:id="handleDeleteExpense" mnemonicParsing="false" onAction="#handleDeleteBtn" text="Delete" /> - </items> - </ContextMenu> - </contextMenu> - </TableView> - <Label text="Sum: "> - <font> - <Font name="Lucida Console" size="14.0" /> - </font> - </Label> - </children> - </VBox> - <Pane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="2"> - <children> - <Text layoutY="14.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Expenses" textAlignment="CENTER"> - <font> - <Font name="Lucida Console" size="14.0" /> - </font> - </Text> - </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> diff --git a/src/main/resources/view/MainMenu.fxml b/src/main/resources/view/MainMenu.fxml deleted file mode 100644 index a2b96f23..00000000 --- a/src/main/resources/view/MainMenu.fxml +++ /dev/null @@ -1,164 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<?import javafx.geometry.Insets?> -<?import javafx.scene.Cursor?> -<?import javafx.scene.control.Button?> -<?import javafx.scene.control.DatePicker?> -<?import javafx.scene.control.Label?> -<?import javafx.scene.control.ProgressBar?> -<?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.StackPane?> -<?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.MainMenuController"> - <children> - <ImageView fitHeight="400.0" fitWidth="600.0" pickOnBounds="true"> - <cursor> - <Cursor fx:constant="DEFAULT" /> - </cursor> - <image> - <Image url="@../Images/backgroundMini.jpg" /> - </image> - </ImageView> - <BorderPane prefHeight="400.0" prefWidth="600.0" AnchorPane.topAnchor="0.0"> - <center> - <GridPane prefWidth="574.0" BorderPane.alignment="CENTER"> - <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 minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> - <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> - </rowConstraints> - <children> - <VBox alignment="BOTTOM_RIGHT" GridPane.columnSpan="2"> - <children> - <DatePicker fx:id="date" /> - <VBox alignment="BOTTOM_CENTER" prefHeight="67.0" prefWidth="574.0"> - <children> - <Label fx:id="balanceLbl" text="Balance:" textAlignment="CENTER"> - <font> - <Font name="System Bold" size="24.0" /> - </font> - </Label> - </children> - <padding> - <Insets bottom="-20.0" /> - </padding> - </VBox> - </children> - </VBox> - <StackPane GridPane.columnSpan="2" GridPane.rowIndex="1"> - <children> - <ImageView fx:id="progressMarker" fitHeight="20.0" fitWidth="25.0" pickOnBounds="true" preserveRatio="true" rotate="-90.0" translateX="-150.0" translateY="25.0"> - <image> - <Image url="@../Images/arrow.png" /> - </image> - </ImageView> - <ProgressBar fx:id="progressbar" prefHeight="40.0" prefWidth="554.0" progress="0.72" translateY="-10.0" /> - <Label fx:id="today" text="Today" textAlignment="CENTER" translateX="-150.0" translateY="-2.0"> - <StackPane.margin> - <Insets left="300.0" /> - </StackPane.margin> - </Label> - </children> - </StackPane> - <HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0" spacing="50.0" GridPane.columnSpan="2" GridPane.rowIndex="2"> - <children> - <Button fx:id="foodButton" contentDisplay="TOP" mnemonicParsing="false" prefHeight="125.0" prefWidth="119.0" text="Food"> - <graphic> - <ImageView fitHeight="63.0" fitWidth="87.0" pickOnBounds="true"> - <cursor> - <Cursor fx:constant="DEFAULT" /> - </cursor> - <image> - <Image url="@../Images/pizzaslice.png" /> - </image> - </ImageView> - </graphic> - </Button> - <Button fx:id="addExpenseBtn" contentDisplay="TOP" mnemonicParsing="false" onAction="#switchScene" prefHeight="125.0" prefWidth="125.0" text="Add expense"> - <graphic> - <ImageView fitHeight="79.0" fitWidth="87.0" pickOnBounds="true"> - <cursor> - <Cursor fx:constant="DEFAULT" /> - </cursor> - <image> - <Image url="@../Images/add_image.png" /> - </image> - </ImageView> - </graphic> - </Button> - <Button fx:id="overviewBtn" contentDisplay="TOP" mnemonicParsing="false" onAction="#switchScene" prefHeight="125.0" prefWidth="125.0" text="Overview"> - <graphic> - <ImageView fitHeight="63.0" fitWidth="87.0" pickOnBounds="true"> - <cursor> - <Cursor fx:constant="DEFAULT" /> - </cursor> - <image> - <Image url="@../Images/overview_stonks.png" /> - </image> - </ImageView> - </graphic> - </Button> - </children> - <opaqueInsets> - <Insets /> - </opaqueInsets> - <padding> - <Insets top="20.0" /> - </padding> - </HBox> - </children> - </GridPane> - </center> - <bottom> - <Region prefHeight="55.0" prefWidth="600.0" BorderPane.alignment="CENTER" /> - </bottom> - <left> - <Region prefHeight="287.0" prefWidth="14.0" BorderPane.alignment="CENTER" /> - </left> - <right> - <Region prefHeight="287.0" prefWidth="12.0" BorderPane.alignment="CENTER" /> - </right> - <top> - <HBox prefHeight="51.0" prefWidth="600.0" BorderPane.alignment="CENTER"> - <children> - <Button mnemonicParsing="false" 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="103.0" /> - <Text fx:id="budgetMonth" strokeType="OUTSIDE" strokeWidth="0.0" text="BUDGET MARCH" textAlignment="CENTER"> - <HBox.margin> - <Insets /> - </HBox.margin> - <font> - <Font size="30.0" /> - </font> - </Text> - </children> - <opaqueInsets> - <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> - </opaqueInsets> - </HBox> - </top> - </BorderPane> - </children> -</AnchorPane> diff --git a/src/main/resources/view/Overview.fxml b/src/main/resources/view/Overview.fxml deleted file mode 100644 index 4bc86e4c..00000000 --- a/src/main/resources/view/Overview.fxml +++ /dev/null @@ -1,130 +0,0 @@ -<?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.ListView?> -<?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="#switchExpenses" 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="Overview" textAlignment="CENTER" translateX="-5.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="236.5" /> - <ColumnConstraints hgrow="ALWAYS" maxWidth="253.0" minWidth="10.0" prefWidth="252.0" /> - </columnConstraints> - <rowConstraints> - <RowConstraints maxHeight="65.33334064483643" minHeight="10.0" prefHeight="26.5" vgrow="SOMETIMES" /> - <RowConstraints maxHeight="298.66665744781494" minHeight="10.0" prefHeight="239.5" 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"> - <opaqueInsets> - <Insets /> - </opaqueInsets> - <padding> - <Insets bottom="5.0" /> - </padding> - <children> - <ComboBox fx:id="show" prefHeight="26.0" prefWidth="240.0" promptText="Show"> - <opaqueInsets> - <Insets /> - </opaqueInsets> - </ComboBox> - </children> - </HBox> - <VBox alignment="BOTTOM_LEFT" prefHeight="200.0" prefWidth="100.0" spacing="5.0" GridPane.columnIndex="1" /> - <HBox prefHeight="100.0" prefWidth="200.0" GridPane.columnSpan="2" GridPane.rowIndex="2"> - <children> - <Button disable="true" mnemonicParsing="false" text="Overview"> - <HBox.margin> - <Insets right="5.0" /> - </HBox.margin></Button> - <Button mnemonicParsing="false" onAction="#switchIncome" text="Income" textFill="#4d1616" /> - <Button mnemonicParsing="false" onAction="#switchExpenses" text="Expenses" /> - <Button disable="true" mnemonicParsing="false" text="Savings" /> - <Button defaultButton="true" mnemonicParsing="false" onAction="#switchMainMenu" text="Next"> - <HBox.margin> - <Insets left="170.0" /> - </HBox.margin></Button> - </children> - <padding> - <Insets top="10.0" /> - </padding> - </HBox> - <PieChart GridPane.columnIndex="1" GridPane.rowIndex="1" /> - <ListView prefHeight="200.0" prefWidth="270.0" GridPane.rowIndex="1" /> - </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> diff --git a/src/main/resources/view/deleteBudget.fxml b/src/main/resources/view/deleteBudget.fxml deleted file mode 100644 index 21b63909..00000000 --- a/src/main/resources/view/deleteBudget.fxml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<?import javafx.scene.control.Button?> -<?import javafx.scene.control.ComboBox?> -<?import javafx.scene.layout.AnchorPane?> -<?import javafx.scene.layout.ColumnConstraints?> -<?import javafx.scene.layout.GridPane?> -<?import javafx.scene.layout.HBox?> -<?import javafx.scene.layout.RowConstraints?> -<?import javafx.scene.layout.VBox?> -<?import javafx.scene.text.Text?> - -<AnchorPane prefHeight="150.0" prefWidth="400.0" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="view.DeleteBudget"> - <children> - <GridPane layoutX="23.0" layoutY="30.0" prefHeight="150.0" prefWidth="400.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> - <columnConstraints> - <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> - <children> - <VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0"> - <children> - <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Delete Budget Item" /> - </children> - </VBox> - <HBox alignment="CENTER" GridPane.rowIndex="1"> - <children> - <ComboBox prefWidth="150.0" /> - </children> - </HBox> - <HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0" spacing="15.0" GridPane.rowIndex="2"> - <children> - <Button mnemonicParsing="false" text="Cancel" /> - <Button mnemonicParsing="false" text="Delete" /> - </children> - </HBox> - </children> - </GridPane> - </children> -</AnchorPane> diff --git a/src/main/resources/view/initialNewBudgetPopUp.fxml b/src/main/resources/view/initialNewBudgetPopUp.fxml deleted file mode 100644 index 7a8ad924..00000000 --- a/src/main/resources/view/initialNewBudgetPopUp.fxml +++ /dev/null @@ -1,88 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<?import javafx.geometry.Insets?> -<?import javafx.scene.control.Button?> -<?import javafx.scene.control.DatePicker?> -<?import javafx.scene.control.DialogPane?> -<?import javafx.scene.control.Label?> -<?import javafx.scene.control.TextField?> -<?import javafx.scene.layout.BorderPane?> -<?import javafx.scene.layout.ColumnConstraints?> -<?import javafx.scene.layout.GridPane?> -<?import javafx.scene.layout.HBox?> -<?import javafx.scene.layout.RowConstraints?> -<?import javafx.scene.text.Font?> - - -<BorderPane prefHeight="230.0" prefWidth="300.0" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1"> - <center> - <DialogPane minHeight="200.0" prefHeight="240.0" prefWidth="325.0"> - <content> - <GridPane prefHeight="162.0" prefWidth="300.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 minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> - <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> - <RowConstraints maxHeight="58.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> - <RowConstraints maxHeight="24.0" minHeight="0.0" prefHeight="0.0" vgrow="SOMETIMES" /> - <RowConstraints maxHeight="24.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> - <RowConstraints maxHeight="24.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> - </rowConstraints> - <children> - <HBox alignment="CENTER_LEFT"> - <children> - <Label text="Budget Title:" /> - </children> - </HBox> - <HBox alignment="CENTER_LEFT" GridPane.rowIndex="1"> - <children> - <Label text="Start date:" /> - </children> - </HBox> - <HBox alignment="CENTER_LEFT" GridPane.rowIndex="2"> - <children> - <Label text="Description:" /> - </children> - </HBox> - <HBox alignment="CENTER_LEFT" GridPane.rowIndex="3"> - <children> - <Label text="Savings:" /> - </children> - </HBox> - <DatePicker promptText="mm/dd" GridPane.columnIndex="1" GridPane.rowIndex="1" /> - <TextField promptText="title" GridPane.columnIndex="1" /> - <TextField promptText="(optional)" GridPane.columnIndex="1" GridPane.rowIndex="2" /> - <TextField promptText="previous month" GridPane.columnIndex="1" GridPane.rowIndex="3" /> - <HBox alignment="CENTER" spacing="5.0" GridPane.columnIndex="1" GridPane.rowIndex="6"> - <children> - <Button mnemonicParsing="false" text="Cancel" /> - <Button mnemonicParsing="false" text="Continue" /> - </children> - </HBox> - </children> - <padding> - <Insets left="5.0" right="5.0" /> - </padding> - </GridPane> - </content> - <header> - <HBox alignment="CENTER"> - <children> - <Label text="New Budget Setup"> - <padding> - <Insets bottom="10.0" top="10.0" /> - </padding> - <font> - <Font name="System Bold" size="14.0" /> - </font> - </Label> - </children> - </HBox> - </header> - </DialogPane> - </center> -</BorderPane> diff --git a/src/main/resources/view/initialOldBudgetPopUp.fxml b/src/main/resources/view/initialOldBudgetPopUp.fxml deleted file mode 100644 index c3df4a24..00000000 --- a/src/main/resources/view/initialOldBudgetPopUp.fxml +++ /dev/null @@ -1,14 +0,0 @@ -<?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.InitialOldBudgetPopUp" - prefHeight="400.0" prefWidth="600.0"> - -</AnchorPane> diff --git a/src/main/resources/view/underProgress.fxml b/src/main/resources/view/underProgress.fxml deleted file mode 100644 index ec5bf55f..00000000 --- a/src/main/resources/view/underProgress.fxml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<?import javafx.geometry.Insets?> -<?import javafx.scene.control.Button?> -<?import javafx.scene.control.TextField?> -<?import javafx.scene.image.Image?> -<?import javafx.scene.image.ImageView?> -<?import javafx.scene.layout.AnchorPane?> - - -<AnchorPane prefHeight="172.0" prefWidth="340.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="310.0" fitWidth="476.0" layoutX="-5.0" pickOnBounds="true" preserveRatio="true"> - <image> - <Image url="@../Images/underProgress.png" /> - </image> - </ImageView> - <Button layoutX="195.0" layoutY="178.0" mnemonicParsing="false" onAction="#closeButton" text="Understood" /> - <TextField layoutX="41.0" layoutY="112.0" prefHeight="26.0" prefWidth="390.0" text="Sorry, but this part of the app is still under construction."> - <opaqueInsets> - <Insets /> - </opaqueInsets> - </TextField> - <TextField alignment="CENTER" layoutX="41.0" layoutY="65.0" prefHeight="26.0" prefWidth="390.0" text="Alert!"> - <opaqueInsets> - <Insets /> - </opaqueInsets> - </TextField> - <TextField layoutX="41.0" layoutY="138.0" prefHeight="26.0" prefWidth="390.0" text="Thank you for your patience."> - <opaqueInsets> - <Insets /> - </opaqueInsets> - </TextField> - </children> -</AnchorPane> -- GitLab