From 13fbc2b39d54c1a181e8fd4f600f1fea184f564f Mon Sep 17 00:00:00 2001 From: Sten Laane Date: Fri, 22 Mar 2019 17:23:14 +0000 Subject: [PATCH] added JMetro style to alert windows + added tutorial under "help -> getting started" --- src/main/java/stocktracker/StockTracker.java | 1 - src/main/java/stocktracker/StockTrackerGUI.java | 11 +++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/stocktracker/StockTracker.java b/src/main/java/stocktracker/StockTracker.java index 915ec93..6134789 100644 --- a/src/main/java/stocktracker/StockTracker.java +++ b/src/main/java/stocktracker/StockTracker.java @@ -8,7 +8,6 @@ import java.util.ArrayList; import java.util.List; -//TODO: Add javadoc comments //TODO: migrate files to .csv format? //TODO: Add unit testing //TODO: Delete temp files when done with them (File.createTempFile()?) diff --git a/src/main/java/stocktracker/StockTrackerGUI.java b/src/main/java/stocktracker/StockTrackerGUI.java index adf3fd7..f9c371b 100644 --- a/src/main/java/stocktracker/StockTrackerGUI.java +++ b/src/main/java/stocktracker/StockTrackerGUI.java @@ -113,7 +113,8 @@ private void setupMenuBar(Pane parent) { alert.setTitle("About StockTracker"); alert.setHeaderText(null); // Alerts have an optional header. - alert.setContentText("Author: Sten Laane\nVersion: " + StockTracker.VERSION); + alert.setContentText("Author: Sten Arthur Laane\nVersion: " + StockTracker.VERSION); + new JMetro(JMetro.Style.LIGHT).applyTheme(stage.getScene()); alert.showAndWait();}); MenuItem howToUseItem = new MenuItem("Getting started"); @@ -121,9 +122,15 @@ private void setupMenuBar(Pane parent) { Alert alert = new Alert(Alert.AlertType.INFORMATION); Stage stage = (Stage) alert.getDialogPane().getScene().getWindow(); stage.getIcons().add(new Image("icon.png")); + alert.setHeaderText(null); // Alerts have an optional header. alert.setTitle("How to use StockTracker"); - alert.setContentText("***Insert tutorial here***"); + alert.setContentText("1. Press 'New Tracker'\n2. Choose the date you wish to start" + + " tracking the stocks from\n3. Write down the stock you wish to track " + + "and what currency it's traded in (e.g. AAPL_USD) in the ticker_currency field. " + + "Write how much of that stock you own in the amount field." + + "\n4. Press 'Go!'"); + new JMetro(JMetro.Style.LIGHT).applyTheme(stage.getScene()); alert.showAndWait();}); helpMenu.getItems().addAll(aboutItem, howToUseItem);