diff --git a/README.adoc b/README.adoc index 35ddca6d783..c745058bb3f 100644 --- a/README.adoc +++ b/README.adoc @@ -17,13 +17,13 @@ endif::[] It has a GUI but most of the user interactions happen using a CLI (Command Line Interface). * It is a Java sample application intended for students and young adults to manage their personal daily expenses. -## Target Users +== Target Users Our target users are students and young adults. This group of people are usually too busy to remember every single expense in their daily life which makes it difficult for them to keep track of their spending. MYMorise hopes to resolve this issue by being their expense manager and helping them to keep their spendings in check. -## Why use MYMorise? +== Why use MYMorise? Have you experienced moments where your money seem to always be gone, then you remembered that you've used it on something but you just can't recall exactly where/what you have spent your money on? Or maybe you just want a platform to record your spendings so that you can better manage them the next time? diff --git a/build.gradle b/build.gradle index 0424e97d993..9b02b608550 100644 --- a/build.gradle +++ b/build.gradle @@ -135,8 +135,8 @@ asciidoctor { idprefix: '', // for compatibility with GitHub preview idseparator: '-', 'site-root': "${sourceDir}", // must be the same as sourceDir, do not modify - 'site-name': 'AddressBook-Level3', - 'site-githuburl': 'https://github.com/se-edu/addressbook-level3', + 'site-name': 'MYMorise', + 'site-githuburl': 'https://github.com/AY1920S1-CS2103-T14-4/main', 'site-seedu': true, // delete this line if your project is not a fork (not a SE-EDU project) ] diff --git a/docs/LearningOutcomes.adoc b/docs/LearningOutcomes.adoc deleted file mode 100644 index d5fa47f86c8..00000000000 --- a/docs/LearningOutcomes.adoc +++ /dev/null @@ -1,216 +0,0 @@ -= Learning Outcomes -:site-section: LearningOutcomes -:toc: macro -:toc-title: -:toclevels: 1 -:imagesDir: images -:stylesDir: stylesheets -ifdef::env-github[] -:note-caption: :information_source: -endif::[] - -After studying this code and completing the corresponding exercises, you should be able to, - -toc::[] - -== Utilize User Stories `[LO-UserStories]` - -=== References - -* https://se-edu.github.io/se-book/specifyingRequirements/userStories/[se-edu/se-book: Requirements: Specifying Requirements: User Stories] - -=== Exercise: Add more user stories - -* Assume you are planing to expand the functionality of the AddressBook (but keep it as a CLI application). -What other user stories do you think AddressBook should support? Add those user stories to the `DeveloperGuide.adoc`. - -== Utilize use cases `[LO-UseCases]` - -=== References - -* https://se-edu.github.io/se-book/specifyingRequirements/useCases/[se-edu/se-book: Requirements: Specifying Requirements: Use Cases] - -=== Exercise: Add a 'Rename tag' use case - -* Add a use case to the `DeveloperGuide.adoc` to cover the case of _renaming of an existing tag_. -e.g. rename the tag `friends` to `buddies` (i.e. all persons who had the `friends` tag will now have -a `buddies` tag instead) -Assume that AddressBook confirms the change with the user before carrying out the operation. - -== Use Non Functional Requirements `[LO-NFR]` - -=== References - -* https://se-edu.github.io/se-book/requirements/nonFunctionalRequirements/[se-edu/se-book: Requirements: Non-Functional Requirements] - -=== Exercise: Add more NFRs - -* Add some more NFRs to the `DeveloperGuide.adoc` - -== Use Polymorphism `[LO-Polymorphism]` - -Note how the `Command::execute()` method shows polymorphic behavior. - -=== References - -* https://se-edu.github.io/se-book/oop/polymorphism/[se-edu/se-book: Paradigms: OOP: Polymorphism] -* https://se-edu.github.io/se-book/cppToJava/inheritance/polymorphism/[se-edu/se-book: C++ to Java: OOP: Polymorphism] - -=== Exercise: Add a polymorphic `isMutating` method - -* Add a method `boolean isMutating()` to the `Command` class. This method will return `true` for -command types that mutate the data. e.g. `AddExpenseCommand` -* Currently, AddressBook data are saved to the file after every command. -Take advantage of the the new method you added to limit file saving to only for command types that mutate data. -i.e. `add` command should always save the data while `list` command should never save data to the file. - -[NOTE] -==== -There may be better ways to limit file saving to commands that mutate data. The above approach, while not -optimal, will give you chance to implement a polymorphic behavior. -==== - -== Use abstract classes/methods `[LO-Abstract]` - -=== References - -* https://se-edu.github.io/se-book/oop/inheritance/abstractClasses/[se-edu/se-book: Paradigms: OOP: Abstract Classes] -* https://se-edu.github.io/se-book/cppToJava/inheritance/abstractClassesAndMethods/[se-edu/se-book: C++ to Java: OOP: Abstract Classes] - -=== Exercise: Make `Command#execute()` method abstract - -* Make the `Command#execute()` method abstract (hint: refer to the comment given below the method) - -== Use interfaces `[LO-Interfaces]` - -Note how the `AddressBook` class implements the `ReadOnlyAddressBook` interface so that clients who don't need write access to the `AddressBook` can access the `AddressBook` through the `ReadOnlyAddressBook` interface instead. - -image::ReadOnlyAddressBookUsage.png[width=500] - -=== References - -* https://se-edu.github.io/se-book/oop/inheritance/interfaces/[se-edu/se-book: Paradigms: OOP: Abstract Interfaces] -* https://se-edu.github.io/se-book/cppToJava/inheritance/interfaces/[se-edu/se-book: C++ to Java: OOP: Abstract Interfaces] - -=== Exercise: Add a `Printable` interface - -* Add a `Printable` interface as follows. -+ -image::PrintableInterface.png[width=400] -* `Override` the `getPrintableString` in classes `Name`, `Phone`, `Email`, and `Address` so that each produces a printable string representation of the object. e.g. `Name: John Smith`, `Phone: 12349862` -* Add the following method in a suitable place of some other class. Note how the method depends on the Interface. -+ -[source,java] ----- -/** - * Returns a concatenated version of the printable strings of each object. - */ -String getPrintableString(Printable... printables) { ----- -+ -The above method can be used to get a printable string representing a bunch of person details. -For example, you should be able to call that method like this: -+ -[source,java] ----- -// p is a Person object -return getPrintableString(p.getPhone(), p.getEmail(), p.getAddress()); ----- - -== Follow Liskov Substitution Principle `[LO-LSP]` - -=== References - -* https://se-edu.github.io/se-book/principles/liskovSubstitutionPrinciple/[se-edu/se-book: Principles: Liskov Substitution Principle] - -=== Exercise: Add an exception to an overridden method - -* Add a `throws Exception` clause to the `AddExpenseCommand::execute` method. Notice how Java compiler will not allow it, -unless you add the same `throws` clause to the parent class method. This is because if a child class throws -an exception that is not specified by the Parent's contract, the child class is no longer substitutable in place of -the parent class. -* Also note that while in the above example the compiler enforces LSP, there are other situations where it is up to -the programmer to enforce it. For example, if the method in the parent class works for `null` input, the overridden -method in the child class should not reject `null` inputs. This will not be enforced by the compiler. - -== Use Java-FX for GUI programming `[LO-JavaFx]` - -=== References - -* https://se-edu.github.io/se-book/javaTools/javaFXBasic/[se-edu/se-book: Tools: Java: JavaFX: Basic] - -=== Exercise: Enhance GUI - -* Do some enhancements to the AddressBook GUI. e.g. add an application icon, change font size/style - -== Analyze Coupling and Cohesion of designs `[LO-CouplingCohesion]` - -* Notice how having a separate `ParserUtil` class to handle user input validation, space trimming etc. of model data (an application of the Single Responsibility Principle) improves the _cohesion_ of the model component (since it does not need to be concerned with handling user input) as well as the `ParserUtil` class. - -=== References - -* https://se-edu.github.io/se-book/designFundamentals/coupling/[se-edu/se-book: Design: Design Principles: Coupling] -* https://se-edu.github.io/se-book/designFundamentals/cohesion/[se-edu/se-book: Design: Design Principles: Cohesion] - -=== Exercise: Identify places to reduce coupling and increase cohesion - -* Where else in the design coupling can be reduced further, or cohesion can be increased further? - -[[apply-dependency-inversion-principle-lo-dip]] -== Apply Dependency Inversion Principle `[LO-DIP]` - -* Note how the `LogicManager` class doesn't depend on `StorageManager` directly, but rather the interface `Storage`. -This is an application of the Dependency Inversion Principle. -+ -image::LogicStorageDIP.png[width=300] -* Where else in the code do you notice the application of DIP? - -=== References - -* https://se-edu.github.io/se-book/principles/dependencyInversionPrinciple/[se-edu/se-book: Principles: Dependency Inversion Principle] - -== Use Dependency Injection `[LO-DI]` - -Notice how the `LogicManager` class does not depend on the `StorageManager` class, but depends on the `Storage` interface. -This allows us to use _Dependency Injection_ to test the `LogicManager` class without getting the `StorageManager` class involved. - -=== References - -* https://se-edu.github.io/se-book/testing/dependencyInjection/[se-edu/se-book: Quality Assurance: Testing: Dependency Injection] - -=== Exercise: Facilitate injecting a StorageStub - -* Notice how `LogicManagerTest` tests `LogicManager` by constructing a `StorageManager` object. -* Implement `StorageStub` such that calls to its `save*` methods do nothing (i.e. empty method body). -* Update `LogicManagerTest` to work with the `StorageStub` instead of the actual `StorageManager` object. -i.e. `LogicManagerTest` injects a `StorageStub` object when constructing a `LogicManager` before testing it. -+ -image::DependencyInjection.png[width=600] -* The example above uses <> as a means to achieve DI. -Note that there is another way to inject a `StorageStub` object, as shown below. -In this case we do not apply the DIP but we still achieve DI. -+ -image::DependencyInjectionWithoutDIP.png[width=250] - -== Apply Open-Closed Principle `[LO-OCP]` - -=== References - -* https://se-edu.github.io/se-book/principles/openClosedPrinciple/[se-edu/se-book: Principles: Open-Closed Principle] - -=== Exercise: Analyze OCP-compliance of the `LogicManager` class - -* Consider adding a new command to the Address Book. e.g. an `edit` command. Notice how little you need to change in the `LogicManager` class to extend its behavior so that it can execute the new command. -That is because `LogicManager` follows the OCP i.e. `LogicManager` is _open to be extended_ with more commands but _closed for modifications_. -* Is it possible to make the `AddressBookParser` class more OCP-compliant in terms of extending it to handle more -command types? -* In terms of how it saves data, is `LogicManager` more OCP-compliant -due to the application of DIP as given in <>? -How can you improve ``LogicManager``'s OCP-compliance further so that it can not only work with different types -of storages, but different number of storages (e.g. save to both a text file and a database). - -== Work in a 3KLoC code base `[LO-3KLoC]` - -=== Exercise: Enhance AddressBook - -* Enhance AddressBook in some way. e.g. add a new command diff --git a/docs/UserGuide.adoc b/docs/UserGuide.adoc index 4cf0e39b1af..43d786857e9 100644 --- a/docs/UserGuide.adoc +++ b/docs/UserGuide.adoc @@ -17,7 +17,7 @@ By: `Team T14-4` Since: `Sep 2019` Licence: `MIT` == Introduction -MYMorise -- Manage Your Money(MYM) is a desktop application for those who *prefer tracking personal expenses on their +*MYMorise -- Manage Your Money(MYM)* is a desktop application for those who *prefer tracking personal expenses on their computers*. With MYMorise, you can easily see your daily expenses as well as a summary, along with other useful functionalities. More importantly, MYMorise is *optimized for those who prefer to work with Command Line Interface (CLI)* while still having the benefits of a *Graphical User Interface (GUI)*. Interested? Jump to the <> to get started. Enjoy! @@ -43,8 +43,7 @@ functionalities. More importantly, MYMorise is *optimized for those who prefer t . Ensure you have Java `11` or above installed in your Computer. . Download the latest `MYMorise.jar`. . Copy the jar file to the folder you want to use as the home folder for MYMorise. -. Double-click the jar to start the app. The GUI should appear in a few seconds. -. If Step 4 doesn't work, try `java -jar MYMorise.jar` in your CLI. +. Run `java -jar path_to_folder/MYMorise.jar` in your CLI. The GUI should appear in a few seconds. + image::Ui.png[width="790"] + @@ -52,10 +51,10 @@ image::Ui.png[width="790"] e.g. typing *`help`* and pressing kbd:[Enter] will open the help window. . Some example commands you can try: -* *`listDefaultExpenses`* : lists all expenses -* **`expense`**`n/Textbook a/23.50 t/education t/school` : adds an expense named `Textbook` to the expense list with the tags -`education` and `school`. -* **`delete`**`3` : deletes the 3rd expense shown in the current list +* *`listDefaultExpenses`* : lists all expenses that do not fall into any budget. +* **`expense`**`n/Textbook a/23.50 t/education` : adds an expense named `Textbook` to the expense list with the tag +`education`. +* **`delete`**`3` : deletes the 3rd item shown in the centre list panel. * *`exit`* : exits the app . Refer to <> for details of each command. @@ -68,7 +67,6 @@ e.g. typing *`help`* and pressing kbd:[Enter] will open the help window. * Words in `UPPER_CASE` are the parameters to be supplied by the user * Items in square brackets are optional e.g `n/NAME [t/TAG]` can be used as `n/Bread t/Food` or as `n/Bread`. -* Items post-fixed with `…`​ can be used zero or more times e.g. `[t/TAG]…`​ can be excluded or include 1 or more tags `t/food t/drinks`. ==== === Viewing help : `help` @@ -88,12 +86,10 @@ Adds an expense to track.* + Format: `expense n/NAME a/AMOUNT [c/CURRENCY] [d/DATE] [t/TAG]…​` [TIP] -An expense with no currency specified will have the default currency set. +An expense with no currency specified will have the default currency set (SGD). [TIP] An expense with no date specified will default to current date and time of addition. [TIP] -An expense can have any number of tags (including no tags). -[TIP] User may input time in the format "HHMM" in the [d/DATE] portion to specify current date with specified time [TIP] If user wants to add an expense onto the last day of a month, just specify the day to be 31 and it will automatically be added onto the last day of the month. + @@ -221,7 +217,7 @@ Deletes the second budget in the budget list in MYMorise. // end::delete[] === Automatic currency conversion for foreign currencies -MyMorise is able to automatically display foreign currencies in the default currency set by the user. By default this is set +MYMorise is able to automatically display foreign currencies in the default currency set by the user. By default this is set to Singapore Dollars (SGD). The conversions are done in the following scenarios: * When an expenses specifies a currency that is not the default currency @@ -232,6 +228,13 @@ a cleaner experience when viewing budgets and expenses with multiple differing c The latest Foreign Exchange data for a limited set of supported currencies are updated whenever the application is launched. The list of supported currencies are as follows: +[width="80%",cols="10%,10%,10%,10%,10%,10%,10%,10%,10%,10%,10%",options="header",] +|======================================================================= +| CAD | HKD | ISK | PHP | DKK | HUF | CZK | GBP | RON | SEK | IDR +| INR | BRL | RUB | HRK | JPY | THB | CHF | EUR | MYR | BGN | TRY +| CNY | NOK | NZD | ZAR | USD | MXN | SGD | AUD | ILS | KRW | PLN +|======================================================================= + === Clearing a list : `clear` Deletes all items in the current list.* + Format: `clear` @@ -251,6 +254,16 @@ When the user types, if there are suggestions for a certain input, user can pres suggestion or press kbd:[DOWN] and kbd:[UP] to navigate between suggestions and then press kbd:[tab] or kbd:[enter] to autofill the selected item. User may also just kbd:[click] on an item to autofill. +=== Retrieve the history of the commands executed: `history` +Returns the list of history commands executed. +[TIP] +Press kbd:[F3] to navigate to previous input; Press kbd:[F4] to navigate to next input; +[NOTE] +Use keyboard to navigate through the history will only take effect when the focus is in `TextField`. +[NOTE] +kbd:[UP] and kbd:[DOWN] cannot be used here to navigate through the history since they are used to navigate through +the autocomplete suggestions. + === Exiting the program : `exit` Exits the program. + Format: `exit` @@ -261,26 +274,7 @@ Expense and Budget data are saved in the hard disk automatically after any comma There is no need to save manually. // end::saving[] -=== Automatic currency conversion for foreign currencies `[coming in v1.4]` -MYMorise is able to automatically display foreign currencies in the default currency set by the user. By default this is set -to Singapore Dollars (SGD). The conversions are done in the following scenarios: - -* When an expenses specifies a currency that is not the default currency -* When an expense specifies a currency that is different from that budget it is associated to. - -This automatic conversion allows for the computation of budgets and expenses regardless of their underlying currencies to provide -a cleaner experience when viewing budgets and expenses with multiple differing currencies. - -The latest Foreign Exchange data for a limited set of supported currencies are updated whenever the application is launched. The list of supported currencies are as follows: - -[width="80%",cols="10%,10%,10%,10%,10%,10%,10%,10%,10%,10%,10%",options="header",] -|======================================================================= -| CAD | HKD | ISK | PHP | DKK | HUF | CZK | GBP | RON | SEK | IDR -| INR | BRL | RUB | HRK | JPY | THB | CHF | EUR | MYR | BGN | TRY -| CNY | NOK | NZD | ZAR | USD | MXN | SGD | AUD | ILS | KRW | PLN -|======================================================================= - -=== Locating expenses by name: `find` `[coming in v1.4]` +=== Locating expenses by name: `find` `[coming in v2.0]` Finds all expenses by name, date, tag. + Format: `find [n/NAME] [d/DATE] [t/TAG]` @@ -299,18 +293,12 @@ Returns `coffee` and `Starbucks Coffee`. * `find n/Cheesecake` + Returns any expense having names `Cheesecake`, eg: `Strawberry Cheesecake`, `Blueberry Cheesecake`. -=== Display expense by tag in chart `[coming in v2.0]` -_{Displays the expense in a pie chart to show breakdown of expenses.}_ - === Set a Recurring Expense `[coming in v2.0]` _{Sets a recurring expense for a specific duration and frequency.}_ === Undo/Redo commands `[coming in v2.0]` _{Allows user to undo and redo commands.}_ -=== Show command history `[coming in v2.0]` -_{User is able to navigate using up and down keys to cycle through past commands typed during the session.}_ - === FAQ *Q*: How do I transfer my data to another Computer? + @@ -336,5 +324,6 @@ e.g. `find t/nourishment` * *Delete* : `delete INDEX` + e.g. `delete 3` * *Clear* : `clear` +* *History*: `history` * *Exit* : `exit` diff --git a/docs/images/Ui.png b/docs/images/Ui.png index adfd03d723c..dc7287a6df8 100644 Binary files a/docs/images/Ui.png and b/docs/images/Ui.png differ diff --git a/src/main/java/seedu/address/MainApp.java b/src/main/java/seedu/address/MainApp.java index 543649fd941..b7c7594bfd4 100644 --- a/src/main/java/seedu/address/MainApp.java +++ b/src/main/java/seedu/address/MainApp.java @@ -19,14 +19,14 @@ import seedu.address.commons.util.StringUtil; import seedu.address.logic.Logic; import seedu.address.logic.LogicManager; +import seedu.address.model.BudgetList; import seedu.address.model.ExpenseList; import seedu.address.model.Model; import seedu.address.model.ModelManager; +import seedu.address.model.ReadOnlyBudgetList; import seedu.address.model.ReadOnlyExpenseList; import seedu.address.model.ReadOnlyUserPrefs; import seedu.address.model.UserPrefs; -import seedu.address.model.budget.BudgetList; -import seedu.address.model.budget.ReadOnlyBudgetList; import seedu.address.model.exchangedata.ExchangeData; import seedu.address.model.exchangedata.ExchangeDataSingleton; import seedu.address.model.util.SampleDataUtil; diff --git a/src/main/java/seedu/address/logic/Logic.java b/src/main/java/seedu/address/logic/Logic.java index 9b18e98bc6b..ccb437d4502 100644 --- a/src/main/java/seedu/address/logic/Logic.java +++ b/src/main/java/seedu/address/logic/Logic.java @@ -8,9 +8,9 @@ import seedu.address.logic.commands.exceptions.CommandException; import seedu.address.logic.parser.exceptions.ParseException; import seedu.address.model.Model; +import seedu.address.model.ReadOnlyBudgetList; import seedu.address.model.ReadOnlyExpenseList; import seedu.address.model.budget.Budget; -import seedu.address.model.budget.ReadOnlyBudgetList; import seedu.address.model.expense.Expense; /** diff --git a/src/main/java/seedu/address/logic/LogicManager.java b/src/main/java/seedu/address/logic/LogicManager.java index 517827a4948..d559e440d7b 100644 --- a/src/main/java/seedu/address/logic/LogicManager.java +++ b/src/main/java/seedu/address/logic/LogicManager.java @@ -13,9 +13,9 @@ import seedu.address.logic.parser.MymParser; import seedu.address.logic.parser.exceptions.ParseException; import seedu.address.model.Model; +import seedu.address.model.ReadOnlyBudgetList; import seedu.address.model.ReadOnlyExpenseList; import seedu.address.model.budget.Budget; -import seedu.address.model.budget.ReadOnlyBudgetList; import seedu.address.model.expense.Expense; import seedu.address.storage.Storage; diff --git a/src/main/java/seedu/address/logic/commands/ClearCommand.java b/src/main/java/seedu/address/logic/commands/ClearCommand.java index be600851408..511f99830e8 100644 --- a/src/main/java/seedu/address/logic/commands/ClearCommand.java +++ b/src/main/java/seedu/address/logic/commands/ClearCommand.java @@ -4,11 +4,11 @@ import seedu.address.logic.CommandHistory; import seedu.address.logic.commands.exceptions.CommandException; +import seedu.address.model.BudgetList; import seedu.address.model.ExpenseList; import seedu.address.model.Model; import seedu.address.model.ViewState; import seedu.address.model.budget.Budget; -import seedu.address.model.budget.BudgetList; /** * Clears all Expenses/Budgets. diff --git a/src/main/java/seedu/address/model/budget/BudgetList.java b/src/main/java/seedu/address/model/BudgetList.java similarity index 97% rename from src/main/java/seedu/address/model/budget/BudgetList.java rename to src/main/java/seedu/address/model/BudgetList.java index 928cfa9ce50..1d9214849d4 100644 --- a/src/main/java/seedu/address/model/budget/BudgetList.java +++ b/src/main/java/seedu/address/model/BudgetList.java @@ -1,4 +1,4 @@ -package seedu.address.model.budget; +package seedu.address.model; import static java.util.Objects.requireNonNull; @@ -6,6 +6,8 @@ import java.util.Optional; import javafx.collections.ObservableList; +import seedu.address.model.budget.Budget; +import seedu.address.model.budget.UniqueBudgetList; import seedu.address.model.expense.Expense; /** diff --git a/src/main/java/seedu/address/model/Model.java b/src/main/java/seedu/address/model/Model.java index adc3a82f9b0..eaeb098597f 100644 --- a/src/main/java/seedu/address/model/Model.java +++ b/src/main/java/seedu/address/model/Model.java @@ -7,7 +7,6 @@ import javafx.collections.ObservableList; import seedu.address.commons.core.GuiSettings; import seedu.address.model.budget.Budget; -import seedu.address.model.budget.ReadOnlyBudgetList; import seedu.address.model.exchangedata.ExchangeData; import seedu.address.model.expense.Expense; diff --git a/src/main/java/seedu/address/model/ModelManager.java b/src/main/java/seedu/address/model/ModelManager.java index 4b0e0ac352d..eecc9322e2c 100644 --- a/src/main/java/seedu/address/model/ModelManager.java +++ b/src/main/java/seedu/address/model/ModelManager.java @@ -15,8 +15,6 @@ import seedu.address.commons.core.GuiSettings; import seedu.address.commons.core.LogsCenter; import seedu.address.model.budget.Budget; -import seedu.address.model.budget.BudgetList; -import seedu.address.model.budget.ReadOnlyBudgetList; import seedu.address.model.exchangedata.ExchangeData; import seedu.address.model.expense.Expense; diff --git a/src/main/java/seedu/address/model/budget/ReadOnlyBudgetList.java b/src/main/java/seedu/address/model/ReadOnlyBudgetList.java similarity index 81% rename from src/main/java/seedu/address/model/budget/ReadOnlyBudgetList.java rename to src/main/java/seedu/address/model/ReadOnlyBudgetList.java index cb520f48fc8..ee76e9be6b1 100644 --- a/src/main/java/seedu/address/model/budget/ReadOnlyBudgetList.java +++ b/src/main/java/seedu/address/model/ReadOnlyBudgetList.java @@ -1,6 +1,7 @@ -package seedu.address.model.budget; +package seedu.address.model; import javafx.collections.ObservableList; +import seedu.address.model.budget.Budget; /** * Unmodifiable view of an expense list diff --git a/src/main/java/seedu/address/model/util/SampleDataUtil.java b/src/main/java/seedu/address/model/util/SampleDataUtil.java index de47bf5be0b..8cab49361ab 100644 --- a/src/main/java/seedu/address/model/util/SampleDataUtil.java +++ b/src/main/java/seedu/address/model/util/SampleDataUtil.java @@ -3,11 +3,11 @@ import java.time.LocalDate; import java.time.format.DateTimeFormatter; +import seedu.address.model.BudgetList; import seedu.address.model.ExpenseList; +import seedu.address.model.ReadOnlyBudgetList; import seedu.address.model.ReadOnlyExpenseList; import seedu.address.model.budget.Budget; -import seedu.address.model.budget.BudgetList; -import seedu.address.model.budget.ReadOnlyBudgetList; import seedu.address.model.exchangedata.ExchangeData; import seedu.address.model.expense.Amount; import seedu.address.model.expense.Currency; @@ -21,29 +21,52 @@ * Contains utility methods for populating {@code ExpenseList} with sample data. */ public class SampleDataUtil { + private static ExchangeData exchangeRates = getSampleExchangeData(); public static Expense[] getSampleExpenses() { return new Expense[] { - new Expense(new Name("Coffee"), new Amount("1.8"), new Currency("SGD"), - new Date("1245"), - new Tag("food")), - new Expense(new Name("Textbook"), new Amount("23.50"), new Currency("SGD"), - new Date("930"), - new Tag("education")), - new Expense(new Name("Earphone"), new Amount("45"), new Currency("SGD"), + new Expense(new Name("Coffee"), new Amount("1.8"), + new Currency("SGD", getRate("SGD")), + new Date("1245"), new Tag("food")), + new Expense(new Name("Textbook"), new Amount("23.50"), + new Currency("CHF", getRate("CHF")), + new Date("930"), new Tag("education")), + new Expense(new Name("Earphone"), new Amount("45"), + new Currency("USD", getRate("USD")), new Date("10/12/2019 1800"), new Tag("utility")), - new Expense(new Name("Hang out"), new Amount("50"), new Currency("SGD"), - new Date("15/12/2019 2100"), - new Tag("entertainment")), - new Expense(new Name("Travel to Paris"), new Amount("850"), new Currency("SGD"), - new Date("25/12/2019 800"), - new Tag("travel")), - new Expense(new Name("Gift for duke"), new Amount("30"), new Currency("SGD"), - new Date("1/11/2019"), - new Tag("relationship")) + new Expense(new Name("Hang out"), new Amount("50"), + new Currency("SGD", getRate("SGD")), + new Date("15/12/2019 2100"), new Tag("")), + new Expense(new Name("Travel to Paris"), new Amount("50000"), + new Currency("KRW", getRate("EUR")), + new Date("25/12/2019 800"), new Tag("travel")), + new Expense(new Name("Gift for duke"), new Amount("30"), + new Currency("SGD", getRate("SGD")), + new Date("1/11/2019"), new Tag("gifts")), + new Expense(new Name("Gift for duchess"), new Amount("100"), + new Currency("EUR", getRate("EUR")), + new Date("8/12/2019"), new Tag("gifts")), + new Expense(new Name("Phone charger"), new Amount("30"), + new Currency("MYR", getRate("MYR")), + new Date("8/8/2019"), new Tag("utility")), + new Expense(new Name("Television"), new Amount("433"), + new Currency("MXN", getRate("MXN")), + new Date("13/5/2019"), new Tag("")), + new Expense(new Name("Japanese mocha"), new Amount("990"), + new Currency("JPY", getRate("JPY")), + new Date("19/4/2019"), new Tag("food")), + new Expense(new Name("Philippine Coffee"), new Amount("6435"), + new Currency("PHP", getRate("PHP")), + new Date("22/3/2019"), new Tag("food")), + new Expense(new Name("Another Gift for duke"), new Amount("30"), + new Currency("SGD", getRate("SGD")), + new Date("1/11/2019"), new Tag("gifts")) }; } + private static double getRate(String country) { + return exchangeRates.getRates().getRate(country); + } public static ExchangeData getSampleExchangeData() { Rates rates = new Rates(); rates.addRate("CAD", 0.9631651648); @@ -94,11 +117,122 @@ public static ReadOnlyExpenseList getSampleExpenseList() { return sampleEl; } + public static Budget[] getSampleBudgets() { + return new Budget[] { + new Budget(new Name("Japan Travel"), new Amount("100000.00"), new Amount("100000.00"), + new Currency("JPY", getRate("JPY")), new Date("12/12/2019"), + new Date("18/12/2019"), getJapanTravelExpenseList()), + new Budget(new Name("Business Budget"), new Amount("2000.00"), new Amount("2000.00"), + new Currency("USD", getRate("USD")), new Date("10/5/2019"), + new Date("18/5/2019"), getBusinessBudgetExpenseList()), + new Budget(new Name("January 19 Budget"), new Amount("500.00"), new Amount("1000.00"), + new Currency("SGD", getRate("SGD")), new Date("1/1/2019"), + new Date("31/1/2019"), getJanuaryBudgetExpenseList()), + new Budget(new Name("Wedding Budget"), new Amount("40000.00"), new Amount("40000.00"), + new Currency("SGD", getRate("SGD")), new Date("5/7/2019"), + new Date("12/7/2019"), getWeddingBudgetExpenseList()), + new Budget(new Name("Family Travel in SG"), new Amount("600.00"), new Amount("600.00"), + new Currency("SGD", getRate("SGD")), new Date("24/6/2019"), + new Date("24/6/2019"), getFamilyTravelExpenseList()), + }; + } + + public static ExpenseList getJapanTravelExpenseList() { + ExpenseList japanTravel = new ExpenseList(); + japanTravel.addExpense(new Expense(new Name("Japanese Coffee"), new Amount("1000"), + new Currency("JPY", getRate("JPY")), new Date("12/12/2019"), new Tag("food"))); + japanTravel.addExpense(new Expense(new Name("Japanese Ramen"), new Amount("7900"), + new Currency("JPY", getRate("JPY")), new Date("13/12/2019"), new Tag("food"))); + japanTravel.addExpense(new Expense(new Name("Bus fare"), new Amount("800"), + new Currency("JPY", getRate("JPY")), + new Date("13/12/2019"), new Tag("transport"))); + japanTravel.addExpense(new Expense(new Name("Hotel"), new Amount("5000"), + new Currency("JPY", getRate("JPY")), + new Date("12/12/2019"), new Tag("accommodation"))); + japanTravel.addExpense(new Expense(new Name("Temple and Shrine"), new Amount("12000"), + new Currency("JPY", getRate("JPY")), + new Date("14/12/2019"), new Tag("adventure"))); + japanTravel.addExpense(new Expense(new Name("Mountain climbinb"), new Amount("17000"), + new Currency("JPY", getRate("JPY")), + new Date("12/12/2019"), new Tag("adventure"))); + return japanTravel; + } + + public static final ExpenseList getWeddingBudgetExpenseList() { + ExpenseList weddingBudget = new ExpenseList(); + weddingBudget.addExpense(new Expense(new Name("Balloons"), new Amount("500"), + new Currency("SGD", getRate("SGD")), + new Date("6/7/2019"), new Tag("decoration"))); + weddingBudget.addExpense(new Expense(new Name("Flowers"), new Amount("700"), + new Currency("SGD", getRate("SGD")), + new Date("7/7/2019"), new Tag("decoration"))); + weddingBudget.addExpense(new Expense(new Name("Hotel"), new Amount("985"), + new Currency("SGD", getRate("SGD")), + new Date("7/7/2019"), new Tag("accomodation"))); + weddingBudget.addExpense(new Expense(new Name("Photoshoot"), new Amount("1200"), + new Currency("SGD", getRate("SGD")), new Date("9/7/2019"), new Tag(""))); + weddingBudget.addExpense(new Expense(new Name("Attire"), new Amount("700"), + new Currency("SGD", getRate("SGD")), new Date("10/7/2019"), new Tag("rent"))); + return weddingBudget; + } + + public static final ExpenseList getJanuaryBudgetExpenseList() { + ExpenseList januaryBudget = new ExpenseList(); + januaryBudget.addExpense(new Expense(new Name("Toys for child"), new Amount("50"), + new Currency("SGD", getRate("SGD")), new Date("3/1/2019"), new Tag("toy"))); + januaryBudget.addExpense(new Expense(new Name("Expensive chicken rice"), new Amount("40"), + new Currency("SGD", getRate("SGD")), new Date("7/1/2019"), new Tag("food"))); + januaryBudget.addExpense(new Expense(new Name("Table"), new Amount("120"), + new Currency("SGD", getRate("SGD")), new Date("4/1/2019"), new Tag("furniture"))); + januaryBudget.addExpense(new Expense(new Name("Laptop"), new Amount("1500"), + new Currency("SGD", getRate("SGD")), new Date("13/1/2019"), new Tag(""))); + januaryBudget.addExpense(new Expense(new Name("Phone bill"), new Amount("40"), + new Currency("SGD", getRate("SGD")), new Date("23/1/2019"), new Tag("bill"))); + januaryBudget.addExpense(new Expense(new Name("Phone card"), new Amount("20"), + new Currency("SGD", getRate("SGD")), new Date("16/1/2019"), new Tag(""))); + januaryBudget.addExpense(new Expense(new Name("Chair"), new Amount("100"), + new Currency("SGD", getRate("SGD")), + new Date("18/1/2019"), new Tag("furniture"))); + return januaryBudget; + } + + public static final ExpenseList getBusinessBudgetExpenseList() { + ExpenseList businessBudget = new ExpenseList(); + businessBudget.addExpense(new Expense(new Name("Business lunch"), new Amount("150"), + new Currency("USD", getRate("USD")), new Date("12/5/2019"), new Tag("food"))); + businessBudget.addExpense(new Expense(new Name("Travel"), new Amount("30"), + new Currency("USD", getRate("USD")), new Date("13/5/2019"), new Tag("travel"))); + businessBudget.addExpense(new Expense(new Name("Supplier expenditure"), new Amount("200"), + new Currency("USD", getRate("USD")), new Date("15/5/2019"), new Tag(""))); + businessBudget.addExpense(new Expense(new Name("Bribery"), new Amount("50"), + new Currency("USD", getRate("USD")), new Date("11/5/2019"), new Tag(""))); + businessBudget.addExpense(new Expense(new Name("Business Taxes"), new Amount("1150"), + new Currency("USD", getRate("USD")), new Date("11/5/2019"), new Tag("tax"))); + return businessBudget; + } + + public static final ExpenseList getFamilyTravelExpenseList() { + ExpenseList familyTravelBudget = new ExpenseList(); + familyTravelBudget.addExpense(new Expense(new Name("Family lunch"), new Amount("70"), + new Currency("SGD", getRate("SGD")), new Date("24/6/2019"), new Tag("food"))); + familyTravelBudget.addExpense(new Expense(new Name("Taxi"), new Amount("40"), + new Currency("SGD", getRate("SGD")), + new Date("24/6/2019"), new Tag("transport"))); + familyTravelBudget.addExpense(new Expense(new Name("Tickets to Gardens by the Bay"), new Amount("150"), + new Currency("SGD", getRate("SGD")), new Date("24/6/2019"), new Tag("tickets"))); + familyTravelBudget.addExpense(new Expense(new Name("Jurong East Swimming Pool"), new Amount("10"), + new Currency("SGD", getRate("SGD")), new Date("24/6/2019"), new Tag("tickets"))); + familyTravelBudget.addExpense(new Expense(new Name("Singapore Zoo tickets"), new Amount("40"), + new Currency("SGD", getRate("SGD")), new Date("24/6/2019"), new Tag("tickets"))); + return familyTravelBudget; + } + public static ReadOnlyBudgetList getSampleBudgetList() { - BudgetList sampleB1 = new BudgetList(); - sampleB1.addBudget(new Budget(new Name("Japan Travel"), new Amount("2000.00"), new Amount("2000.00"), - new Currency("USD"), new Date("12/12/2019"), new Date("18/12/2019"), new ExpenseList())); - return sampleB1; + BudgetList sampleBl = new BudgetList(); + for (Budget sampleBudget : getSampleBudgets()) { + sampleBl.addBudget(sampleBudget); + } + return sampleBl; } } diff --git a/src/main/java/seedu/address/storage/BudgetListStorage.java b/src/main/java/seedu/address/storage/BudgetListStorage.java index 9e1be542e0c..291ac59ecb2 100644 --- a/src/main/java/seedu/address/storage/BudgetListStorage.java +++ b/src/main/java/seedu/address/storage/BudgetListStorage.java @@ -5,8 +5,8 @@ import java.util.Optional; import seedu.address.commons.exceptions.DataConversionException; -import seedu.address.model.budget.BudgetList; -import seedu.address.model.budget.ReadOnlyBudgetList; +import seedu.address.model.BudgetList; +import seedu.address.model.ReadOnlyBudgetList; /** * Represents a storage for {@link BudgetList}. diff --git a/src/main/java/seedu/address/storage/JsonBudgetListStorage.java b/src/main/java/seedu/address/storage/JsonBudgetListStorage.java index 8e319b2154c..28a84a0674f 100644 --- a/src/main/java/seedu/address/storage/JsonBudgetListStorage.java +++ b/src/main/java/seedu/address/storage/JsonBudgetListStorage.java @@ -12,7 +12,7 @@ import seedu.address.commons.exceptions.IllegalValueException; import seedu.address.commons.util.FileUtil; import seedu.address.commons.util.JsonUtil; -import seedu.address.model.budget.ReadOnlyBudgetList; +import seedu.address.model.ReadOnlyBudgetList; /** * A class to access BudgetList data stored as a json file on the hard disk. diff --git a/src/main/java/seedu/address/storage/JsonSerializableBudgetList.java b/src/main/java/seedu/address/storage/JsonSerializableBudgetList.java index d2c879dfc90..1a5eddda03a 100644 --- a/src/main/java/seedu/address/storage/JsonSerializableBudgetList.java +++ b/src/main/java/seedu/address/storage/JsonSerializableBudgetList.java @@ -9,9 +9,10 @@ import com.fasterxml.jackson.annotation.JsonRootName; import seedu.address.commons.exceptions.IllegalValueException; +import seedu.address.model.BudgetList; +import seedu.address.model.ReadOnlyBudgetList; import seedu.address.model.budget.Budget; -import seedu.address.model.budget.BudgetList; -import seedu.address.model.budget.ReadOnlyBudgetList; + /** * An Immutable BudgetList that is serializable to JSON format. diff --git a/src/main/java/seedu/address/storage/Storage.java b/src/main/java/seedu/address/storage/Storage.java index 8caab8c0f19..0efaebd59d2 100644 --- a/src/main/java/seedu/address/storage/Storage.java +++ b/src/main/java/seedu/address/storage/Storage.java @@ -5,10 +5,10 @@ import java.util.Optional; import seedu.address.commons.exceptions.DataConversionException; +import seedu.address.model.ReadOnlyBudgetList; import seedu.address.model.ReadOnlyExpenseList; import seedu.address.model.ReadOnlyUserPrefs; import seedu.address.model.UserPrefs; -import seedu.address.model.budget.ReadOnlyBudgetList; import seedu.address.model.exchangedata.ExchangeData; /** diff --git a/src/main/java/seedu/address/storage/StorageManager.java b/src/main/java/seedu/address/storage/StorageManager.java index 49c3ea56799..caa717652a4 100644 --- a/src/main/java/seedu/address/storage/StorageManager.java +++ b/src/main/java/seedu/address/storage/StorageManager.java @@ -7,10 +7,10 @@ import seedu.address.commons.core.LogsCenter; import seedu.address.commons.exceptions.DataConversionException; +import seedu.address.model.ReadOnlyBudgetList; import seedu.address.model.ReadOnlyExpenseList; import seedu.address.model.ReadOnlyUserPrefs; import seedu.address.model.UserPrefs; -import seedu.address.model.budget.ReadOnlyBudgetList; import seedu.address.model.exchangedata.ExchangeData; /** diff --git a/src/main/java/seedu/address/ui/UiManager.java b/src/main/java/seedu/address/ui/UiManager.java index a6db0167fcb..9f37bb1c6c5 100644 --- a/src/main/java/seedu/address/ui/UiManager.java +++ b/src/main/java/seedu/address/ui/UiManager.java @@ -37,7 +37,7 @@ public UiManager(Logic logic) { private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText, String contentText) { final Alert alert = new Alert(type); - alert.getDialogPane().getStylesheets().add("view/DarkTheme.css"); + alert.getDialogPane().getStylesheets().add("view/YellowTheme.css"); alert.initOwner(owner); alert.setTitle(title); alert.setHeaderText(headerText); diff --git a/src/main/resources/view/Extensions.css b/src/main/resources/view/Extensions.css index bfe82a85964..eb551b655a7 100644 --- a/src/main/resources/view/Extensions.css +++ b/src/main/resources/view/Extensions.css @@ -5,7 +5,7 @@ .list-cell:empty { /* Empty cells will not have alternating colours */ - -fx-background: #383838; + -fx-background: #E3D598; } .tag-selector { @@ -16,5 +16,5 @@ } .tooltip-text { - -fx-text-fill: white; + -fx-text-fill: black; } diff --git a/src/main/resources/view/MainWindow.fxml b/src/main/resources/view/MainWindow.fxml index 7c760e053e8..a268ce490fb 100644 --- a/src/main/resources/view/MainWindow.fxml +++ b/src/main/resources/view/MainWindow.fxml @@ -21,7 +21,7 @@ - + @@ -56,15 +56,14 @@ - + - + @@ -75,15 +74,14 @@ - + - + diff --git a/src/main/resources/view/Piechart.css b/src/main/resources/view/Piechart.css index 0082765434b..bf744e72f2d 100644 --- a/src/main/resources/view/Piechart.css +++ b/src/main/resources/view/Piechart.css @@ -10,13 +10,13 @@ } .chart-title { - -fx-text-fill: #ffffff; + -fx-text-fill: #000000; -fx-font-size: 18px; -fx-padding: -50px; } .chart-pie-label { - -fx-fill: #ffffff; + -fx-fill: #000000; -fx-font-size: 1em; } diff --git a/src/main/resources/view/DarkTheme.css b/src/main/resources/view/YellowTheme.css similarity index 74% rename from src/main/resources/view/DarkTheme.css rename to src/main/resources/view/YellowTheme.css index d3d0e3af077..d91a4d033d7 100644 --- a/src/main/resources/view/DarkTheme.css +++ b/src/main/resources/view/YellowTheme.css @@ -1,6 +1,6 @@ .background { - -fx-background-color: derive(#1d1d1d, 20%); - background-color: #383838; /* Used in the default.html file */ + -fx-background-color: derive(#DDCB82, 20%); + background-color: #000000; /* Used in the default.html file */ } .label { @@ -13,14 +13,14 @@ .label-bright { -fx-font-size: 11pt; -fx-font-family: "Segoe UI Semibold"; - -fx-text-fill: white; + -fx-text-fill: black; -fx-opacity: 1; } .label-header { -fx-font-size: 32pt; -fx-font-family: "Segoe UI Light"; - -fx-text-fill: white; + -fx-text-fill: black; -fx-opacity: 1; } @@ -40,9 +40,9 @@ } .table-view { - -fx-base: #1d1d1d; - -fx-control-inner-background: #1d1d1d; - -fx-background-color: #1d1d1d; + -fx-base: #DDCB82; + -fx-control-inner-background: #DDCB82; + -fx-background-color: #DDCB82; -fx-table-cell-border-color: transparent; -fx-table-header-border-color: transparent; -fx-padding: 5; @@ -63,7 +63,7 @@ .table-view .column-header .label { -fx-font-size: 20pt; -fx-font-family: "Segoe UI Light"; - -fx-text-fill: white; + -fx-text-fill: black; -fx-alignment: center-left; -fx-opacity: 1; } @@ -73,20 +73,20 @@ } .split-pane:horizontal .split-pane-divider { - -fx-background-color: derive(#1d1d1d, 20%); + -fx-background-color: derive(#DDCB82, 20%); -fx-border-color: transparent transparent transparent #4d4d4d; } .split-pane { -fx-border-radius: 1; -fx-border-width: 1; - -fx-background-color: derive(#1d1d1d, 20%); + -fx-background-color: derive(#DDCB82, 20%); } .list-view { -fx-background-insets: 0; -fx-padding: 0; - -fx-background-color: derive(#1d1d1d, 20%); + -fx-background-color: derive(#DDCB82, 20%); } .list-cell { @@ -96,15 +96,15 @@ } .list-cell:filled:even { - -fx-background-color: #3c3e3f; + -fx-background-color: #C5B39A; } .list-cell:filled:odd { - -fx-background-color: #515658; + -fx-background-color: #EBC685; } .list-cell:filled:selected { - -fx-background-color: #000000; + -fx-background-color: #FFFFFF; } .list-cell:filled:selected #cardPane { @@ -113,7 +113,7 @@ } .list-cell .label { - -fx-text-fill: white; + -fx-text-fill: black; } .cell_big_label { @@ -129,24 +129,24 @@ } .stack-pane { - -fx-background-color: derive(#1d1d1d, 20%); + -fx-background-color: derive(#DDCB82, 20%); } .pane-with-border { - -fx-background-color: derive(#1d1d1d, 20%); - -fx-border-color: derive(#1d1d1d, 10%); + -fx-background-color: derive(#DDCB82, 20%); + -fx-border-color: derive(#DDCB82, 10%); -fx-border-top-width: 1px; } .status-bar { - -fx-background-color: derive(#1d1d1d, 30%); + -fx-background-color: derive(#DDCB82, 30%); } .result-display { -fx-background-color: transparent; -fx-font-family: "Segoe UI Light"; -fx-font-size: 13pt; - -fx-text-fill: white; + -fx-text-fill: black; } .result-display .label { @@ -155,47 +155,47 @@ .status-bar .label { -fx-font-family: "Segoe UI Light"; - -fx-text-fill: white; + -fx-text-fill: black; -fx-padding: 4px; -fx-pref-height: 30px; } .status-bar-with-border { - -fx-background-color: derive(#1d1d1d, 30%); - -fx-border-color: derive(#1d1d1d, 25%); + -fx-background-color: derive(#DDCB82, 30%); + -fx-border-color: derive(#DDCB82, 25%); -fx-border-width: 1px; } .status-bar-with-border .label { - -fx-text-fill: white; + -fx-text-fill: black; } .grid-pane { - -fx-background-color: derive(#1d1d1d, 30%); - -fx-border-color: derive(#1d1d1d, 30%); + -fx-background-color: derive(#DDCB82, 30%); + -fx-border-color: derive(#DDCB82, 30%); -fx-border-width: 1px; } .grid-pane .stack-pane { - -fx-background-color: derive(#1d1d1d, 30%); + -fx-background-color: derive(#DDCB82, 30%); } .context-menu { - -fx-background-color: derive(#1d1d1d, 50%); + -fx-background-color: derive(#DDCB82, 50%); } .context-menu .label { - -fx-text-fill: white; + -fx-text-fill: black; } .menu-bar { - -fx-background-color: derive(#1d1d1d, 20%); + -fx-background-color: derive(#DDCB82, 20%); } .menu-bar .label { -fx-font-size: 14pt; -fx-font-family: "Segoe UI Light"; - -fx-text-fill: white; + -fx-text-fill: black; -fx-opacity: 0.9; } @@ -213,7 +213,7 @@ -fx-border-color: #e2e2e2; -fx-border-width: 2; -fx-background-radius: 0; - -fx-background-color: #1d1d1d; + -fx-background-color: #DDCB82; -fx-font-family: "Segoe UI", Helvetica, Arial, sans-serif; -fx-font-size: 11pt; -fx-text-fill: #d8d8d8; @@ -225,12 +225,12 @@ } .button:pressed, .button:default:hover:pressed { - -fx-background-color: white; - -fx-text-fill: #1d1d1d; + -fx-background-color: black; + -fx-text-fill: #DDCB82; } .button:focused { - -fx-border-color: white, white; + -fx-border-color: black, black; -fx-border-width: 1, 1; -fx-border-style: solid, segments(1, 1); -fx-border-radius: 0, 0; @@ -239,8 +239,8 @@ .button:disabled, .button:default:disabled { -fx-opacity: 0.4; - -fx-background-color: #1d1d1d; - -fx-text-fill: white; + -fx-background-color: #DDCB82; + -fx-text-fill: black; } .button:default { @@ -253,36 +253,36 @@ } .dialog-pane { - -fx-background-color: #1d1d1d; + -fx-background-color: #DDCB82; } .dialog-pane > *.button-bar > *.container { - -fx-background-color: #1d1d1d; + -fx-background-color: #DDCB82; } .dialog-pane > *.label.content { -fx-font-size: 14px; -fx-font-weight: bold; - -fx-text-fill: white; + -fx-text-fill: black; } .dialog-pane:header *.header-panel { - -fx-background-color: derive(#1d1d1d, 25%); + -fx-background-color: derive(#DDCB82, 25%); } .dialog-pane:header *.header-panel *.label { -fx-font-size: 18px; -fx-font-style: italic; - -fx-fill: white; - -fx-text-fill: white; + -fx-fill: black; + -fx-text-fill: black; } .scroll-bar { - -fx-background-color: derive(#1d1d1d, 20%); + -fx-background-color: derive(#DDCB82, 20%); } .scroll-bar .thumb { - -fx-background-color: derive(#1d1d1d, 50%); + -fx-background-color: derive(#DDCB82, 50%); -fx-background-insets: 3; } @@ -316,12 +316,12 @@ #commandTextField { -fx-background-color: transparent #383838 transparent #383838; -fx-background-insets: 0; - -fx-border-color: #383838 #383838 #ffffff #383838; + -fx-border-color: #E3D598 #E3D598 #000000 #E3D598; -fx-border-insets: 0; -fx-border-width: 1; -fx-font-family: "Segoe UI Light"; -fx-font-size: 13pt; - -fx-text-fill: white; + -fx-text-fill: black; } #filterField, #personListPanel, #personWebpage { @@ -329,7 +329,7 @@ } #resultDisplay .content { - -fx-background-color: transparent, #383838, transparent, #383838; + -fx-background-color: #EBC685; -fx-background-radius: 0; } @@ -346,3 +346,7 @@ -fx-background-radius: 2; -fx-font-size: 11; } + +#expenseListTitle, #resultListTitle { + -fx-padding: 10px 10px 10px 10px ; +} diff --git a/src/test/java/seedu/address/logic/LogicManagerTest.java b/src/test/java/seedu/address/logic/LogicManagerTest.java index 189ac708c4c..deb1af5fa2c 100644 --- a/src/test/java/seedu/address/logic/LogicManagerTest.java +++ b/src/test/java/seedu/address/logic/LogicManagerTest.java @@ -22,12 +22,12 @@ import seedu.address.logic.commands.ListDefaultExpensesCommand; import seedu.address.logic.commands.exceptions.CommandException; import seedu.address.logic.parser.exceptions.ParseException; +import seedu.address.model.BudgetList; import seedu.address.model.Model; import seedu.address.model.ModelManager; +import seedu.address.model.ReadOnlyBudgetList; import seedu.address.model.ReadOnlyExpenseList; import seedu.address.model.UserPrefs; -import seedu.address.model.budget.BudgetList; -import seedu.address.model.budget.ReadOnlyBudgetList; import seedu.address.model.expense.Expense; import seedu.address.storage.JsonBudgetListStorage; import seedu.address.storage.JsonExchangeDataStorage; diff --git a/src/test/java/seedu/address/logic/commands/ClearCommandTest.java b/src/test/java/seedu/address/logic/commands/ClearCommandTest.java index 6a930ff33c4..b10de4dadbd 100644 --- a/src/test/java/seedu/address/logic/commands/ClearCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/ClearCommandTest.java @@ -8,12 +8,12 @@ import org.junit.jupiter.api.Test; import seedu.address.logic.CommandHistory; +import seedu.address.model.BudgetList; import seedu.address.model.ExpenseList; import seedu.address.model.Model; import seedu.address.model.ModelManager; import seedu.address.model.UserPrefs; import seedu.address.model.ViewState; -import seedu.address.model.budget.BudgetList; public class ClearCommandTest { diff --git a/src/test/java/seedu/address/logic/commands/EditExpenseCommandTest.java b/src/test/java/seedu/address/logic/commands/EditExpenseCommandTest.java index 8f8f12500b4..c719907a09c 100644 --- a/src/test/java/seedu/address/logic/commands/EditExpenseCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/EditExpenseCommandTest.java @@ -21,11 +21,11 @@ import seedu.address.commons.core.index.Index; import seedu.address.logic.CommandHistory; import seedu.address.logic.commands.EditExpenseCommand.EditExpenseDescriptor; +import seedu.address.model.BudgetList; import seedu.address.model.ExpenseList; import seedu.address.model.Model; import seedu.address.model.ModelManager; import seedu.address.model.UserPrefs; -import seedu.address.model.budget.BudgetList; import seedu.address.model.exchangedata.ExchangeData; import seedu.address.model.expense.Expense; import seedu.address.testutil.EditExpenseDescriptorBuilder; diff --git a/src/test/java/seedu/address/logic/commands/FindCommandTest.java b/src/test/java/seedu/address/logic/commands/FindCommandTest.java index 30f694be4f2..bd6b8c112a0 100644 --- a/src/test/java/seedu/address/logic/commands/FindCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/FindCommandTest.java @@ -16,10 +16,10 @@ import org.junit.jupiter.api.Test; import seedu.address.logic.CommandHistory; +import seedu.address.model.BudgetList; import seedu.address.model.Model; import seedu.address.model.ModelManager; import seedu.address.model.UserPrefs; -import seedu.address.model.budget.BudgetList; import seedu.address.model.expense.NameContainsKeywordsPredicate; /** diff --git a/src/test/java/seedu/address/logic/commands/ListDefaultExpensesCommandTest.java b/src/test/java/seedu/address/logic/commands/ListDefaultExpensesCommandTest.java index 364c02d5373..72c8dbf0a81 100644 --- a/src/test/java/seedu/address/logic/commands/ListDefaultExpensesCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/ListDefaultExpensesCommandTest.java @@ -10,10 +10,10 @@ import org.junit.jupiter.api.Test; import seedu.address.logic.CommandHistory; +import seedu.address.model.BudgetList; import seedu.address.model.Model; import seedu.address.model.ModelManager; import seedu.address.model.UserPrefs; -import seedu.address.model.budget.BudgetList; /** * Contains integration tests (interaction with the Model) and unit tests for ListDefaultExpensesCommand. diff --git a/src/test/java/seedu/address/logic/commands/ModelStub.java b/src/test/java/seedu/address/logic/commands/ModelStub.java index 4da85b0642f..afe44f99d1c 100644 --- a/src/test/java/seedu/address/logic/commands/ModelStub.java +++ b/src/test/java/seedu/address/logic/commands/ModelStub.java @@ -7,11 +7,11 @@ import javafx.collections.ObservableList; import seedu.address.commons.core.GuiSettings; import seedu.address.model.Model; +import seedu.address.model.ReadOnlyBudgetList; import seedu.address.model.ReadOnlyExpenseList; import seedu.address.model.ReadOnlyUserPrefs; import seedu.address.model.ViewState; import seedu.address.model.budget.Budget; -import seedu.address.model.budget.ReadOnlyBudgetList; import seedu.address.model.exchangedata.ExchangeData; import seedu.address.model.expense.Expense; diff --git a/src/test/java/seedu/address/model/BudgetListTest.java b/src/test/java/seedu/address/model/BudgetListTest.java index ccbafae7b5b..9b506574e43 100644 --- a/src/test/java/seedu/address/model/BudgetListTest.java +++ b/src/test/java/seedu/address/model/BudgetListTest.java @@ -17,8 +17,6 @@ import javafx.collections.FXCollections; import javafx.collections.ObservableList; import seedu.address.model.budget.Budget; -import seedu.address.model.budget.BudgetList; -import seedu.address.model.budget.ReadOnlyBudgetList; import seedu.address.model.budget.exceptions.DuplicateBudgetException; import seedu.address.testutil.BudgetBuilder; diff --git a/src/test/java/seedu/address/model/ModelManagerTest.java b/src/test/java/seedu/address/model/ModelManagerTest.java index a7af6fc8ede..7071c3dc2cb 100644 --- a/src/test/java/seedu/address/model/ModelManagerTest.java +++ b/src/test/java/seedu/address/model/ModelManagerTest.java @@ -17,7 +17,6 @@ import org.junit.jupiter.api.Test; import seedu.address.commons.core.GuiSettings; -import seedu.address.model.budget.BudgetList; import seedu.address.model.exchangedata.ExchangeData; import seedu.address.model.expense.NameContainsKeywordsPredicate; import seedu.address.testutil.BudgetListBuilder; diff --git a/src/test/java/seedu/address/storage/StorageManagerTest.java b/src/test/java/seedu/address/storage/StorageManagerTest.java index fe96ae66325..4a8922056f0 100644 --- a/src/test/java/seedu/address/storage/StorageManagerTest.java +++ b/src/test/java/seedu/address/storage/StorageManagerTest.java @@ -12,11 +12,11 @@ import org.junit.jupiter.api.io.TempDir; import seedu.address.commons.core.GuiSettings; +import seedu.address.model.BudgetList; import seedu.address.model.ExpenseList; +import seedu.address.model.ReadOnlyBudgetList; import seedu.address.model.ReadOnlyExpenseList; import seedu.address.model.UserPrefs; -import seedu.address.model.budget.BudgetList; -import seedu.address.model.budget.ReadOnlyBudgetList; public class StorageManagerTest { diff --git a/src/test/java/seedu/address/testutil/BudgetListBuilder.java b/src/test/java/seedu/address/testutil/BudgetListBuilder.java index d9cc2ad4fc1..7bf4689ab17 100644 --- a/src/test/java/seedu/address/testutil/BudgetListBuilder.java +++ b/src/test/java/seedu/address/testutil/BudgetListBuilder.java @@ -1,7 +1,7 @@ package seedu.address.testutil; +import seedu.address.model.BudgetList; import seedu.address.model.budget.Budget; -import seedu.address.model.budget.BudgetList; /** * A utility class to help with building BudgetList objects. diff --git a/src/test/java/seedu/address/testutil/TypicalBudgets.java b/src/test/java/seedu/address/testutil/TypicalBudgets.java index 0ed349ad04e..aadb3ff99a9 100644 --- a/src/test/java/seedu/address/testutil/TypicalBudgets.java +++ b/src/test/java/seedu/address/testutil/TypicalBudgets.java @@ -4,8 +4,8 @@ import java.util.Arrays; import java.util.List; +import seedu.address.model.BudgetList; import seedu.address.model.budget.Budget; -import seedu.address.model.budget.BudgetList; /** * A utility class containing a list of {@code Budget} objects to be used in tests.