forked from nus-cs2103-AY2223S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update developer guide for tabbing between books
- Loading branch information
Showing
18 changed files
with
227 additions
and
11 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,54 @@ | ||
@startuml | ||
'https://plantuml.com/sequence-diagram | ||
!include style.puml | ||
box UiPart UI_COLOR_T1 | ||
participant ":MainWindow" as MainWindow UI_COLOR | ||
end box | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":ModelManager" as ModelManager MODEL_COLOR | ||
end box | ||
|
||
box ReadOnlyUserPrefs PREF_COLOR | ||
participant ":UserPrefs" as UserPrefs PREF_COLOR_T1 | ||
end box | ||
[-> MainWindow : handleNewBook() | ||
activate MainWindow | ||
|
||
MainWindow -> LogicManager : addAddressBook() | ||
activate LogicManager | ||
|
||
LogicManager -> ModelManager : addAddressBook() | ||
activate ModelManager | ||
|
||
ModelManager -> UserPrefs : addAddressBook() | ||
activate UserPrefs | ||
|
||
UserPrefs --> ModelManager | ||
deactivate UserPrefs | ||
|
||
ModelManager --> LogicManager | ||
deactivate ModelManager | ||
|
||
LogicManager -> ModelManager : getAllAddressBookFilePath() | ||
activate ModelManager | ||
|
||
ModelManager -> UserPrefs : getAllAddressBookFilePath() | ||
activate UserPrefs | ||
|
||
UserPrefs --> ModelManager | ||
deactivate UserPrefs | ||
|
||
ModelManager --> LogicManager | ||
deactivate ModelManager | ||
|
||
LogicManager --> MainWindow : result | ||
deactivate LogicManager | ||
|
||
[<--MainWindow | ||
deactivate LogicManager | ||
@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,21 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ClassFontColor #000000 | ||
skinparam ClassBorderColor #000000 | ||
|
||
title Initial state | ||
|
||
package States <<rectangle>> { | ||
class State1 as "addressBook.json" | ||
class State2 as "addressBook1.json" | ||
class State3 as "addressBook2.json" | ||
} | ||
|
||
State1 -[hidden]right-> State2 | ||
State2 -[hidden]right-> State3 | ||
hide State2 | ||
hide State3 | ||
|
||
class Pointer as "Currently Loaded Book" #FFFFFF | ||
Pointer -up-> State1 | ||
@end |
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,22 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ClassFontColor #000000 | ||
skinparam ClassBorderColor #000000 | ||
|
||
title After command "new" or clicking "New Book" button | ||
|
||
package States <<rectangle>> { | ||
class State1 as "addressBook.json" | ||
class State2 as "addressBook1.json" | ||
class State3 as "addressBook2.json" | ||
} | ||
|
||
State1 -[hidden]right-> State2 | ||
State2 -[hidden]right-> State3 | ||
|
||
hide State3 | ||
|
||
class Pointer as "Currently Loaded Book" #FFFFFF | ||
|
||
Pointer -up-> State1 | ||
@end |
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,84 @@ | ||
@startuml | ||
'https://plantuml.com/sequence-diagram | ||
!include style.puml | ||
box UiPart UI_COLOR_T1 | ||
participant ":MainWindow" as MainWindow UI_COLOR | ||
end box | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
end box | ||
|
||
|
||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":ModelManager" as ModelManager MODEL_COLOR | ||
end box | ||
|
||
box Storage STORAGE_COLOR_T1 | ||
participant ":Storage" as Storage STORAGE_COLOR | ||
end box | ||
|
||
box ReadOnlyUserPrefs PREF_COLOR | ||
participant ":UserPrefs" as UserPrefs PREF_COLOR_T1 | ||
end box | ||
|
||
[-> MainWindow : handleSwap() | ||
activate MainWindow | ||
|
||
MainWindow -> LogicManager : swapAddressBook() | ||
activate LogicManager | ||
|
||
|
||
|
||
LogicManager -> ModelManager : getNextAddressBookPath() | ||
activate ModelManager | ||
|
||
ModelManager -> UserPrefs : getNextAddressBookPath() | ||
activate UserPrefs | ||
|
||
UserPrefs -> UserPrefs : incrementIndex() | ||
activate UserPrefs | ||
|
||
UserPrefs --> UserPrefs | ||
deactivate UserPrefs | ||
|
||
UserPrefs -> UserPrefs : setAddressBookFilePath(Path) | ||
activate UserPrefs | ||
|
||
UserPrefs --> UserPrefs | ||
deactivate UserPrefs | ||
|
||
UserPrefs --> ModelManager : result | ||
deactivate UserPrefs | ||
|
||
ModelManager --> LogicManager | ||
deactivate ModelManager | ||
|
||
|
||
|
||
LogicManager -> Storage : readAddressBook(Path) | ||
activate Storage | ||
|
||
Storage --> LogicManager | ||
deactivate Storage | ||
|
||
LogicManager -> Storage : setAddressBook(AddressBookStorage) | ||
activate Storage | ||
|
||
Storage --> LogicManager | ||
deactivate Storage | ||
|
||
|
||
LogicManager -> ModelManager : setAddressBook(ReadOnlyAddressBook) | ||
activate ModelManager | ||
|
||
ModelManager --> LogicManager | ||
deactivate ModelManager | ||
|
||
LogicManager --> MainWindow | ||
deactivate LogicManager | ||
|
||
[<--MainWindow | ||
deactivate LogicManager | ||
@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,22 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ClassFontColor #000000 | ||
skinparam ClassBorderColor #000000 | ||
|
||
title After command "swap" or clicking "Swap Book" button | ||
|
||
package States <<rectangle>> { | ||
class State1 as "addressBook.json" | ||
class State2 as "addressBook1.json" | ||
class State3 as "addressBook2.json" | ||
} | ||
|
||
State1 -[hidden]right-> State2 | ||
State2 -[hidden]right-> State3 | ||
|
||
hide State3 | ||
|
||
class Pointer as "Currently Loaded Book" #FFFFFF | ||
|
||
Pointer -up-> State2 | ||
@end |
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.