private void saveBudget() { if (!(currentBudget.getName().equals("No budget loaded"))) { Savior.writeBudgetToDisk(currentBudget.getName(), currentBudget); } else { errorMessage = Printer.getPrintout("noBudgetLoaded"); getOption(this); } }
private void reportToConsole() { if (!(currentBudget.getName().equals("No budget loaded"))) { System.out.println(currentBudget.toString()); } else { errorMessage = Printer.getPrintout("noBudgetLoaded"); getOption(this); } }
private void startEditor() { if (!(currentBudget.getName().equals("No budget loaded"))) { EditorMenu editor = new EditorMenu(currentBudget); while (editor.stillEditingBudget()) editor.getOption(editor); } else { errorMessage = Printer.getPrintout("noBudgetLoaded"); getOption(this); } }
public void displayMenu() { AnsiConsole.out.println(ansi().eraseScreen()); Printer.print("mainMenuHeader"); System.out.println("Budget in use: " + currentBudget.getName() + "\n"); Printer.printMenuOptions(menuOptions); }