forked from nus-cs2103-AY2324S2/tp
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #258 from Jayne1010/master
Update DG implementation for UI and show command
- Loading branch information
Showing
4 changed files
with
207 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam arrowThickness 1.1 | ||
skinparam arrowColor UI_COLOR_T4 | ||
skinparam classBackgroundColor UI_COLOR | ||
|
||
package UI <<Rectangle>>{ | ||
Class MainWindow | ||
Class NoteDisplay { | ||
setNoteToUser(note: String) : void | ||
} | ||
Class "{abstract}\nUiPart" as UiPart | ||
} | ||
package Model <<Rectangle>> { | ||
Class HiddenModel #FFFFFF | ||
} | ||
|
||
MainWindow *-right-> "1" NoteDisplay | ||
NoteDisplay -right..> Model | ||
MainWindow -down-|> UiPart | ||
NoteDisplay -down-|> UiPart | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR | ||
participant ":ShowCommandParser" as ShowCommandParser LOGIC_COLOR | ||
participant "s:ShowCommand" as ShowCommand LOGIC_COLOR | ||
participant "r:CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant "m:Model" as Model MODEL_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("show T0123456A") | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand("show T0123456A") | ||
activate AddressBookParser | ||
|
||
create ShowCommandParser | ||
AddressBookParser -> ShowCommandParser | ||
activate ShowCommandParser | ||
|
||
ShowCommandParser --> AddressBookParser | ||
deactivate ShowCommandParser | ||
|
||
AddressBookParser -> ShowCommandParser : parse("T0123456A") | ||
activate ShowCommandParser | ||
|
||
create ShowCommand | ||
ShowCommandParser -> ShowCommand : new ShowCommand.createShowCommand(i) | ||
activate ShowCommand | ||
|
||
ShowCommand --> ShowCommandParser : | ||
deactivate ShowCommand | ||
|
||
ShowCommandParser --> AddressBookParser : s | ||
deactivate ShowCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
ShowCommandParser -[hidden]-> AddressBookParser | ||
destroy ShowCommandParser | ||
|
||
AddressBookParser --> LogicManager : s | ||
deactivate AddressBookParser | ||
|
||
LogicManager -> ShowCommand : execute(m) | ||
activate ShowCommand | ||
|
||
ShowCommand -> Model : setDisplayNote(T0123456A) | ||
activate Model | ||
|
||
Model --> ShowCommand | ||
deactivate Model | ||
|
||
create CommandResult | ||
ShowCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> ShowCommand | ||
deactivate CommandResult | ||
|
||
ShowCommand --> LogicManager : r | ||
deactivate ShowCommand | ||
destroy ShowCommand | ||
|
||
[<--LogicManager | ||
deactivate LogicManager | ||
@enduml |