Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DG] UI Component #264

Merged
merged 2 commits into from
Apr 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/DeveloperGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ image::UiClassDiagram.png[]

The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `ClientListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class.

`GraphWindow` is a separate `Stage` from `MainWindow`. `MainWindow` creates a `GraphWindow` through a `graph` command.

The `UI` component uses 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 link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]

The `UI` component,
Expand Down
40 changes: 31 additions & 9 deletions docs/diagrams/UiClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@ Interface Ui <<Interface>>
Class "{abstract}\nUiPart" as UiPart
Class UiManager
Class MainWindow
Class HelpWindow
Class ResultDisplay
class ClientViewDisplay
class ClientView
class ExerciseListTable
class PersonalBestTable
Class ClientListPanel
Class ClientCard
Class SchedulePanel
Class StatusBarFooter
Class CommandBox
class GraphWindow
}

package Model <<Rectangle>> {
Expand All @@ -30,31 +35,48 @@ HiddenOutside ..> Ui

UiManager .left.|> Ui
UiManager -down-> MainWindow
MainWindow --> HelpWindow
MainWindow *-down-> CommandBox
MainWindow *-down-> ResultDisplay
MainWindow *-down-> ClientListPanel
MainWindow *-down-> ClientViewDisplay
MainWindow *-down-> StatusBarFooter
MainWindow *-down-> ClientListPanel
MainWindow *-down-> SchedulePanel
MainWindow .down.> GraphWindow

ClientListPanel *-down-> ClientCard

ClientListPanel -down-> ClientCard
ClientViewDisplay *-down-> ClientView
ClientViewDisplay *-down-> ExerciseListTable
ClientViewDisplay *-down-> PersonalBestTable

MainWindow -left-|> UiPart

ResultDisplay --|> UiPart
CommandBox --|> UiPart
ClientListPanel --|> UiPart
ClientCard --|> UiPart
ClientCard ---|> UiPart
StatusBarFooter --|> UiPart
HelpWindow -down-|> UiPart
ClientView ---|> UiPart
ExerciseListTable ---|> UiPart
PersonalBestTable ---|> UiPart
SchedulePanel ---|> UiPart
GraphWindow ----|> UiPart

ClientCard ..> Model
ClientCard ....> Model
ExerciseListTable ....> Model
ClientViewDisplay ....> Model
ClientView ....> Model
PersonalBestTable ....> Model
SchedulePanel ......> Model
GraphWindow ....> Model
UiManager -right-> Logic
MainWindow -left-> Logic

ClientListPanel -[hidden]left- HelpWindow
HelpWindow -[hidden]left- CommandBox
CommandBox -[hidden]left- ResultDisplay
CommandBox -[hidden]right- SchedulePanel
ResultDisplay -[hidden]left- StatusBarFooter
ClientListPanel -[hidden]right- GraphWindow
ClientViewDisplay -[hidden]right- GraphWindow

MainWindow -[hidden]-|> UiPart
@enduml
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.