forked from nus-cs2103-AY1920S1/addressbook-level3
-
Notifications
You must be signed in to change notification settings - Fork 7
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 #96 from tiuweehan/gui-dg
Developer Guide for GUI Enhancements
- Loading branch information
Showing
13 changed files
with
363 additions
and
10 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
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,19 @@ | ||
@startuml | ||
|
||
start | ||
|
||
:User executes a open tab command; | ||
|
||
if () then ([command is valid]) | ||
:Instantiate a OpenTabCommand with the model type and index; | ||
:Execute OpenTabCommand; | ||
:Update list of tab data in TabManager with the index of the model; | ||
:Listener is activated and new tab is reflected in UI; | ||
else ([else]) | ||
:Throw an exception; | ||
:Update UI to notify the user; | ||
endif | ||
|
||
stop | ||
|
||
@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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@startuml | ||
|
||
start | ||
|
||
:User executes a switch tab command; | ||
|
||
if () then ([command is valid]) | ||
:Instantiate a SwitchTabCommand with the tab type and index; | ||
:Execute SwitchTabCommand; | ||
:Update TabManager with new index for given tab type; | ||
:Listener is activated and tab change is reflected in UI; | ||
else ([else]) | ||
:Throw an exception; | ||
:Update UI to notify the user; | ||
endif | ||
|
||
stop | ||
|
||
@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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
@startuml | ||
!include style.puml | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR | ||
participant ":SwitchTabCommandParser" as SwitchTabCommandParser LOGIC_COLOR | ||
participant "s:SwitchTabCommand" as SwitchTabCommand LOGIC_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("switchtab t/display i/1") | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand("switchtab t/display i/1") | ||
activate AddressBookParser | ||
|
||
create SwitchTabCommandParser | ||
AddressBookParser -> SwitchTabCommandParser | ||
activate SwitchTabCommandParser | ||
|
||
SwitchTabCommandParser --> AddressBookParser | ||
deactivate SwitchTabCommandParser | ||
|
||
AddressBookParser -> SwitchTabCommandParser : parse("t/display i/1") | ||
activate SwitchTabCommandParser | ||
|
||
create SwitchTabCommand | ||
SwitchTabCommandParser -> SwitchTabCommand : SwitchTabCommand(tabType, index) | ||
activate SwitchTabCommand | ||
|
||
SwitchTabCommand --> SwitchTabCommandParser : s | ||
deactivate SwitchTabCommand | ||
|
||
SwitchTabCommandParser --> AddressBookParser : s | ||
deactivate SwitchTabCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
SwitchTabCommandParser -[hidden]-> AddressBookParser | ||
destroy SwitchTabCommandParser | ||
|
||
AddressBookParser --> LogicManager : s | ||
deactivate AddressBookParser | ||
|
||
deactivate SwitchTabCommand | ||
|
||
@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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
@startuml | ||
!include style.puml | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant "s:SwitchTabCommand" as SwitchTabCommand LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":Model" as Model MODEL_COLOR | ||
participant "g:GuiState" as GuiState MODEL_COLOR | ||
participant "t:TabManager" as TabManager MODEL_COLOR | ||
end box | ||
|
||
activate LogicManager | ||
|
||
LogicManager -> SwitchTabCommand : execute() | ||
activate SwitchTabCommand | ||
|
||
SwitchTabCommand -> Model : getGuiState() | ||
activate Model | ||
|
||
Model --> SwitchTabCommand : g | ||
deactivate Model | ||
|
||
SwitchTabCommand -> GuiState : getTabManager() | ||
activate GuiState | ||
|
||
GuiState --> SwitchTabCommand : t | ||
deactivate GuiState | ||
|
||
SwitchTabCommand -> TabManager : setDisplayTabPaneIndex(1) | ||
activate TabManager | ||
|
||
TabManager --> SwitchTabCommand | ||
deactivate TabManager | ||
|
||
create CommandResult | ||
SwitchTabCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> SwitchTabCommand | ||
deactivate CommandResult | ||
|
||
SwitchTabCommand --> LogicManager : result | ||
deactivate SwitchTabCommand | ||
@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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
@startuml | ||
!include style.puml | ||
|
||
box UI UI_COLOR_T1 | ||
participant ":DetailsTabPane" as DetailsTabPane UI_COLOR | ||
participant "tabPane:TabPane" as TabPane UI_COLOR | ||
participant "sm:SingleSelectionModel<Tab>" as SelectionModel UI_COLOR | ||
end box | ||
|
||
[-> DetailsTabPane : selectTab(1) | ||
activate DetailsTabPane | ||
|
||
DetailsTabPane -> TabPane : getSelectionModel() | ||
activate TabPane | ||
|
||
TabPane --> DetailsTabPane: sm | ||
deactivate TabPane | ||
|
||
DetailsTabPane -> SelectionModel : select(1) | ||
activate SelectionModel | ||
|
||
SelectionModel --> DetailsTabPane | ||
deactivate SelectionModel | ||
|
||
[<-- DetailsTabPane | ||
deactivate DetailsTabPane | ||
|
||
@enduml |
Oops, something went wrong.