Skip to content

Commit

Permalink
Merge pull request #303 from CaptainKeqing/addDetailedViewToUiDG
Browse files Browse the repository at this point in the history
Add detailed view to UI section in DG
  • Loading branch information
theman-oj10 authored Apr 14, 2024
2 parents 47592da + 92b275a commit e2c0dc1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 4 additions & 2 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,17 @@ The **API** of this component is specified in [`Ui.java`](https://github.com/AY2
![Structure of the UI Component](images/UiClassDiagram.png)

The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `InternshipListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class which captures the commonalities between classes that represent parts of the visible GUI.
Additionally, the `MainWindow` contains an initially hidden `HelpWindow` and `DetailedInternshipWindow`. These are windows
that can be accessed by the user to view the help guide and detailed information of an internship respectively.

The `UI` component uses the JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the [`MainWindow`](https://github.com/AY2324S2-CS2103T-W11-1/tp/blob/master/src/main/java/seedu/address/ui/MainWindow.java) is specified in [`MainWindow.fxml`](https://github.com/AY2324S2-CS2103T-W11-1/tp/blob/master/src/main/resources/view/MainWindow.fxml)

The `UI` component,

* executes user commands using the `InternshipLogic` component.
* listens for changes to `Model` data so that the UI can be updated with the modified data.
* listens for changes to `InternshipModel` data so that the UI can be updated with the modified data.
* keeps a reference to the `InternshipLogic` component, because the `UI` relies on the `InternshipLogic` to execute commands.
* depends on some classes in the `Model` component, as it displays `Person` object residing in the `Model`.
* depends on some classes in the `Internship` component, as it displays `Internship` object residing in the `InternshipModel`.

#### InternshipLogic component

Expand Down
12 changes: 11 additions & 1 deletion docs/diagrams/UiClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ Class "{abstract}\nUiPart" as UiPart
Class UiManager
Class MainWindow
Class HelpWindow
' Add Detailed View Internship Window here (comment)
Class DetailedViewWindow
Class DetailedInternshipListPanel
Class DetailedInternshipCard
Class ResultDisplay
Class InternshipListPanel
Class InternshipCard
Expand All @@ -36,6 +38,9 @@ MainWindow *-down-> "1" ResultDisplay
MainWindow *-down-> "1" InternshipListPanel
MainWindow *-down-> "1" StatusBarFooter
MainWindow --> "0..1" HelpWindow
MainWindow --> "0..1" DetailedViewWindow
DetailedViewWindow *-down-> "1" DetailedInternshipListPanel
DetailedInternshipListPanel *-down-> "0..1" DetailedInternshipCard

InternshipListPanel -down-> "*" InternshipCard

Expand All @@ -47,10 +52,15 @@ InternshipListPanel --|> UiPart
InternshipCard --|> UiPart
StatusBarFooter --|> UiPart
HelpWindow --|> UiPart
DetailedViewWindow --|> UiPart
DetailedInternshipListPanel --|> UiPart
DetailedInternshipCard --|> UiPart

InternshipCard ..> InternshipModel
DetailedInternshipCard ..> InternshipModel
UiManager -right-> InternshipLogic
MainWindow -left-> InternshipLogic
DetailedViewWindow --> InternshipLogic

InternshipListPanel -[hidden]left- HelpWindow
HelpWindow -[hidden]left- CommandBox
Expand Down
Binary file modified docs/images/UiClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e2c0dc1

Please sign in to comment.