|
|
|
@ -414,7 +414,398 @@ deactivate user
|
|
|
|
|
|
|
|
|
|
@enduml
|
|
|
|
|
|
|
|
|
|
6.插入图片顺序图
|
|
|
|
|
@startuml
|
|
|
|
|
title Minote Insert Image Sequence
|
|
|
|
|
skinparam sequenceParticipant underline
|
|
|
|
|
hide footbox
|
|
|
|
|
|
|
|
|
|
actor User
|
|
|
|
|
participant NoteEditActivity<<boundary>>
|
|
|
|
|
participant ImagePicker<<control>>
|
|
|
|
|
participant ContentResolver<<Entity>>
|
|
|
|
|
participant NoteEditor<<Entity>>
|
|
|
|
|
|
|
|
|
|
User -> NoteEditActivity: clickImageButton
|
|
|
|
|
activate NoteEditActivity
|
|
|
|
|
activate User
|
|
|
|
|
|
|
|
|
|
NoteEditActivity -> ImagePicker: startActivityForResult(loadImage, PHOTO_REQUEST)
|
|
|
|
|
activate ImagePicker
|
|
|
|
|
ImagePicker --> User: displayImageSelector
|
|
|
|
|
|
|
|
|
|
User -> ImagePicker: selectImage
|
|
|
|
|
ImagePicker --> NoteEditActivity: returnImageUri
|
|
|
|
|
deactivate ImagePicker
|
|
|
|
|
|
|
|
|
|
NoteEditActivity -> ContentResolver: requestStoragePermission()
|
|
|
|
|
activate ContentResolver
|
|
|
|
|
ContentResolver --> NoteEditActivity: grantPermission
|
|
|
|
|
deactivate ContentResolver
|
|
|
|
|
|
|
|
|
|
NoteEditActivity -> ContentResolver: getImagePath()
|
|
|
|
|
activate ContentResolver
|
|
|
|
|
ContentResolver --> NoteEditActivity: returnImagePath
|
|
|
|
|
deactivate ContentResolver
|
|
|
|
|
|
|
|
|
|
NoteEditActivity -> NoteEditor: insertImageToEditor
|
|
|
|
|
activate NoteEditor
|
|
|
|
|
NoteEditor -> NoteEditor: convertToImage()
|
|
|
|
|
NoteEditor --> NoteEditActivity: completeInsertion
|
|
|
|
|
deactivate NoteEditor
|
|
|
|
|
|
|
|
|
|
NoteEditActivity --> User: displayInsertedImage
|
|
|
|
|
deactivate NoteEditActivity
|
|
|
|
|
|
|
|
|
|
@enduml
|
|
|
|
|
|
|
|
|
|
6.字符数统计
|
|
|
|
|
@startuml
|
|
|
|
|
title Minote Character Count Sequence
|
|
|
|
|
skinparam sequenceParticipant underline
|
|
|
|
|
hide footbox
|
|
|
|
|
|
|
|
|
|
actor User
|
|
|
|
|
participant NoteEditActivity<<Boundary>>
|
|
|
|
|
participant NoteEditor<<Control>>
|
|
|
|
|
participant WorkingNote<<Entity>>
|
|
|
|
|
|
|
|
|
|
User -> NoteEditActivity: editText()
|
|
|
|
|
activate User
|
|
|
|
|
activate NoteEditActivity
|
|
|
|
|
|
|
|
|
|
NoteEditActivity -> NoteEditor: addTextChangedListener(textWatcher)
|
|
|
|
|
activate NoteEditor
|
|
|
|
|
|
|
|
|
|
NoteEditor -> NoteEditor: beforeTextChanged(text:CharSequence, start:int, count:int, after:int)
|
|
|
|
|
NoteEditor -> NoteEditor: onTextChanged(text:CharSequence, start:int, before:int, count:int)
|
|
|
|
|
NoteEditor -> NoteEditor: afterTextChanged(editable:Editable)
|
|
|
|
|
|
|
|
|
|
NoteEditor -> WorkingNote: getWorkingText()
|
|
|
|
|
activate WorkingNote
|
|
|
|
|
WorkingNote -> WorkingNote: getText():String
|
|
|
|
|
WorkingNote --> NoteEditor: returnText
|
|
|
|
|
deactivate WorkingNote
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NoteEditor --> NoteEditActivity: textChangeComplete
|
|
|
|
|
deactivate NoteEditor
|
|
|
|
|
|
|
|
|
|
NoteEditActivity --> User: showCharacterCount
|
|
|
|
|
deactivate NoteEditActivity
|
|
|
|
|
|
|
|
|
|
@enduml
|
|
|
|
|
|
|
|
|
|
7.富文本
|
|
|
|
|
@startuml
|
|
|
|
|
title Minote Rich Text Formatting Sequence
|
|
|
|
|
skinparam sequenceParticipant underline
|
|
|
|
|
hide footbox
|
|
|
|
|
|
|
|
|
|
actor User
|
|
|
|
|
participant NoteEditText<<Control>>
|
|
|
|
|
participant PopupWindow<<Entity>>
|
|
|
|
|
participant SpannableString<<Entity>>
|
|
|
|
|
participant StyleSpan<<Entity>>
|
|
|
|
|
|
|
|
|
|
User -> NoteEditText: selectText(start:int, end:int)
|
|
|
|
|
activate NoteEditText
|
|
|
|
|
activate User
|
|
|
|
|
|
|
|
|
|
NoteEditText -> NoteEditText: showFormatToolbar()
|
|
|
|
|
activate PopupWindow
|
|
|
|
|
NoteEditText -> PopupWindow: initFormatToolbar(context:Context, layout:int)
|
|
|
|
|
PopupWindow --> NoteEditText: toolbarCreated
|
|
|
|
|
deactivate PopupWindow
|
|
|
|
|
|
|
|
|
|
User -> NoteEditText: clickStyleButton(styleType:int)
|
|
|
|
|
NoteEditText -> NoteEditText: applyStyle(style:int)
|
|
|
|
|
|
|
|
|
|
NoteEditText -> NoteEditText: getSelectionStart
|
|
|
|
|
NoteEditText -> NoteEditText: getSelectionEnd
|
|
|
|
|
NoteEditText -> NoteEditText: getText(Spannable)
|
|
|
|
|
|
|
|
|
|
alt style == STYLE_BOLD
|
|
|
|
|
NoteEditText -> StyleSpan: new StyleSpan(Typeface.BOLD)
|
|
|
|
|
activate StyleSpan
|
|
|
|
|
NoteEditText -> SpannableString: setSpan(span:StyleSpan, start:int, end:int, flags:int)
|
|
|
|
|
activate SpannableString
|
|
|
|
|
SpannableString --> NoteEditText: spanApplied
|
|
|
|
|
deactivate SpannableString
|
|
|
|
|
deactivate StyleSpan
|
|
|
|
|
else style == STYLE_HIGHLIGHT
|
|
|
|
|
NoteEditText -> SpannableString: new BackgroundColorSpan(Color.YELLOW)
|
|
|
|
|
activate SpannableString
|
|
|
|
|
NoteEditText -> SpannableString: setSpan(span:BackgroundColorSpan, start:int, end:int, flags:int)
|
|
|
|
|
SpannableString --> NoteEditText: spanApplied
|
|
|
|
|
deactivate SpannableString
|
|
|
|
|
else style == STYLE_ITALIC
|
|
|
|
|
NoteEditText -> StyleSpan: new StyleSpan(Typeface.ITALIC)
|
|
|
|
|
activate StyleSpan
|
|
|
|
|
NoteEditText -> SpannableString: setSpan(span:StyleSpan, start:int, end:int, flags:int)
|
|
|
|
|
activate SpannableString
|
|
|
|
|
SpannableString --> NoteEditText: spanApplied
|
|
|
|
|
deactivate SpannableString
|
|
|
|
|
deactivate StyleSpan
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
NoteEditText -> NoteEditText: invalidate()
|
|
|
|
|
NoteEditText --> User: displayFormattedText
|
|
|
|
|
deactivate NoteEditText
|
|
|
|
|
|
|
|
|
|
@enduml
|
|
|
|
|
|
|
|
|
|
8.朗读
|
|
|
|
|
@startuml
|
|
|
|
|
title Minote TTS (Text-to-Speech) Sequence
|
|
|
|
|
skinparam sequenceParticipant underline
|
|
|
|
|
hide footbox
|
|
|
|
|
|
|
|
|
|
actor User
|
|
|
|
|
participant NoteEditActivity<<Boundary>>
|
|
|
|
|
participant SpeechSynthesizer<<Entity>>
|
|
|
|
|
participant TtsListener<<Entity>>
|
|
|
|
|
participant NoteEditor<<Entity>>
|
|
|
|
|
|
|
|
|
|
User -> NoteEditActivity: startTtsButton
|
|
|
|
|
activate User
|
|
|
|
|
|
|
|
|
|
activate NoteEditActivity
|
|
|
|
|
|
|
|
|
|
NoteEditActivity -> SpeechSynthesizer: createSynthesizer(context:Context, initListener:InitListener)
|
|
|
|
|
activate SpeechSynthesizer
|
|
|
|
|
SpeechSynthesizer --> NoteEditActivity: returnTtsInstance
|
|
|
|
|
deactivate SpeechSynthesizer
|
|
|
|
|
|
|
|
|
|
User -> NoteEditActivity: clickTtsButton()
|
|
|
|
|
NoteEditActivity -> NoteEditor: getText():String
|
|
|
|
|
activate NoteEditor
|
|
|
|
|
NoteEditor --> NoteEditActivity: returnText
|
|
|
|
|
deactivate NoteEditor
|
|
|
|
|
|
|
|
|
|
NoteEditActivity -> SpeechSynthesizer: setParameter(VOICE_NAME, "xiaoyan")
|
|
|
|
|
activate SpeechSynthesizer
|
|
|
|
|
NoteEditActivity -> SpeechSynthesizer: setParameter(SPEED, "50")
|
|
|
|
|
NoteEditActivity -> SpeechSynthesizer: setParameter(VOLUME, "80")
|
|
|
|
|
NoteEditActivity -> SpeechSynthesizer: setParameter(ENGINE_TYPE, TYPE_CLOUD)
|
|
|
|
|
|
|
|
|
|
NoteEditActivity -> SpeechSynthesizer: startSpeaking(text:String, listener:TtsListener)
|
|
|
|
|
SpeechSynthesizer -> TtsListener: onSpeakBegin()
|
|
|
|
|
activate TtsListener
|
|
|
|
|
|
|
|
|
|
alt success
|
|
|
|
|
SpeechSynthesizer -> TtsListener: onSpeakProgress(percent:int, beginPos:int, endPos:int)
|
|
|
|
|
TtsListener --> User: playingAudio
|
|
|
|
|
SpeechSynthesizer -> TtsListener: onCompleted(error:SpeechError)
|
|
|
|
|
else error
|
|
|
|
|
SpeechSynthesizer -> NoteEditActivity: returnErrorCode
|
|
|
|
|
NoteEditActivity --> User: showTip("语音合成失败")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
TtsListener --> SpeechSynthesizer: speakingComplete
|
|
|
|
|
deactivate TtsListener
|
|
|
|
|
SpeechSynthesizer --> NoteEditActivity: synthesisComplete
|
|
|
|
|
deactivate SpeechSynthesizer
|
|
|
|
|
|
|
|
|
|
User -> NoteEditActivity: clickStopButton()
|
|
|
|
|
NoteEditActivity -> SpeechSynthesizer: stopSpeaking()
|
|
|
|
|
activate SpeechSynthesizer
|
|
|
|
|
SpeechSynthesizer --> NoteEditActivity: stoppedSpeaking
|
|
|
|
|
deactivate SpeechSynthesizer
|
|
|
|
|
|
|
|
|
|
NoteEditActivity --> User: ttsComplete
|
|
|
|
|
deactivate NoteEditActivity
|
|
|
|
|
deactivate User
|
|
|
|
|
|
|
|
|
|
@enduml
|
|
|
|
|
|
|
|
|
|
9.私密模式
|
|
|
|
|
@startuml
|
|
|
|
|
title Minote Private Mode Content Masking Sequence
|
|
|
|
|
skinparam sequenceParticipant underline
|
|
|
|
|
hide footbox
|
|
|
|
|
|
|
|
|
|
actor User
|
|
|
|
|
participant "NotesListActivity" as NotesListActivity <<boundary>>
|
|
|
|
|
participant "NotesListAdapter" as NotesListAdapter <<control>>
|
|
|
|
|
participant "NoteItemData" as NoteItemData <<entity>>
|
|
|
|
|
participant "WorkingNote" as WorkingNote <<entity>>
|
|
|
|
|
|
|
|
|
|
User -> NotesListActivity: togglePrivateMode()
|
|
|
|
|
activate User
|
|
|
|
|
activate NotesListActivity
|
|
|
|
|
|
|
|
|
|
NotesListActivity -> NotesListAdapter: setPrivateMode(isPrivate:boolean)
|
|
|
|
|
activate NotesListAdapter
|
|
|
|
|
|
|
|
|
|
loop for each note item
|
|
|
|
|
NotesListAdapter -> NoteItemData: getSnippet(String)
|
|
|
|
|
activate NoteItemData
|
|
|
|
|
NoteItemData -> WorkingNote: getContent()
|
|
|
|
|
activate WorkingNote
|
|
|
|
|
WorkingNote --> NoteItemData: originalContent
|
|
|
|
|
deactivate WorkingNote
|
|
|
|
|
|
|
|
|
|
alt isPrivate == true
|
|
|
|
|
NoteItemData -> NoteItemData: generateMaskedContent()
|
|
|
|
|
NoteItemData --> NotesListAdapter: coverwith"123456789"
|
|
|
|
|
else isPrivate == false
|
|
|
|
|
NoteItemData --> NotesListAdapter: originalContent
|
|
|
|
|
end
|
|
|
|
|
deactivate NoteItemData
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
NotesListAdapter -> NotesListAdapter: notifyDataSetChanged()
|
|
|
|
|
NotesListAdapter --> NotesListActivity: displayUpdated
|
|
|
|
|
deactivate NotesListAdapter
|
|
|
|
|
|
|
|
|
|
NotesListActivity --> User: showUpdatedList
|
|
|
|
|
deactivate NotesListActivity
|
|
|
|
|
deactivate User
|
|
|
|
|
|
|
|
|
|
@enduml
|
|
|
|
|
|
|
|
|
|
10search
|
|
|
|
|
@startuml
|
|
|
|
|
title Minote Text Search Sequence
|
|
|
|
|
skinparam sequenceParticipant underline
|
|
|
|
|
hide footbox
|
|
|
|
|
|
|
|
|
|
actor User
|
|
|
|
|
participant "NoteEditText" as NoteEditText <<boundary>>
|
|
|
|
|
participant "SearchToolbar" as SearchToolbar <<boundary>>
|
|
|
|
|
participant "InputMethodManager" as InputMethodManager <<control>>
|
|
|
|
|
participant "EditText" as EditText <<boundary>>
|
|
|
|
|
participant "Editable" as Editable <<entity>>
|
|
|
|
|
participant "Layout" as Layout <<entity>>
|
|
|
|
|
|
|
|
|
|
User -> NoteEditText: clickSearchButton
|
|
|
|
|
activate User
|
|
|
|
|
activate NoteEditText
|
|
|
|
|
|
|
|
|
|
NoteEditText -> SearchToolbar: showSearchToolbar
|
|
|
|
|
activate SearchToolbar
|
|
|
|
|
|
|
|
|
|
SearchToolbar -> SearchToolbar: initializeViews
|
|
|
|
|
SearchToolbar -> EditText: requestFocus
|
|
|
|
|
activate EditText
|
|
|
|
|
|
|
|
|
|
SearchToolbar -> InputMethodManager: showSoftInput(searchEditText, SHOW_IMPLICIT)
|
|
|
|
|
activate InputMethodManager
|
|
|
|
|
InputMethodManager --> EditText: showKeyboard
|
|
|
|
|
deactivate InputMethodManager
|
|
|
|
|
|
|
|
|
|
User -> EditText: inputSearchText(text:String)
|
|
|
|
|
EditText -> SearchToolbar: onConfirmClick(text:String)
|
|
|
|
|
deactivate EditText
|
|
|
|
|
|
|
|
|
|
SearchToolbar -> NoteEditText: performSearch(searchText:String)
|
|
|
|
|
deactivate SearchToolbar
|
|
|
|
|
|
|
|
|
|
NoteEditText -> NoteEditText: clearSearchHighlights
|
|
|
|
|
NoteEditText -> Editable: getText
|
|
|
|
|
activate Editable
|
|
|
|
|
Editable --> NoteEditText: content
|
|
|
|
|
deactivate Editable
|
|
|
|
|
|
|
|
|
|
loop for each match
|
|
|
|
|
NoteEditText -> NoteEditText: findNextMatch(content:String, searchText:String)
|
|
|
|
|
NoteEditText -> Editable: setSpan(BackgroundColorSpan, start:int, end:int, flags:int)
|
|
|
|
|
activate Editable
|
|
|
|
|
Editable --> NoteEditText: highlightApplied
|
|
|
|
|
deactivate Editable
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
NoteEditText -> Layout: getLineForOffset(index:int)
|
|
|
|
|
activate Layout
|
|
|
|
|
Layout --> NoteEditText: lineNumber
|
|
|
|
|
NoteEditText -> Layout: getLineTop(line:int)
|
|
|
|
|
Layout --> NoteEditText: yPosition
|
|
|
|
|
deactivate Layout
|
|
|
|
|
|
|
|
|
|
NoteEditText -> NoteEditText: scrollTo(0, yPosition)
|
|
|
|
|
NoteEditText --> User: displaySearchResults
|
|
|
|
|
|
|
|
|
|
User -> SearchToolbar: clickCancelButton
|
|
|
|
|
activate SearchToolbar
|
|
|
|
|
SearchToolbar -> NoteEditText: clearSearchHighlights
|
|
|
|
|
SearchToolbar -> SearchToolbar: hideSearchToolbar
|
|
|
|
|
SearchToolbar -> InputMethodManager: hideSoftInputFromWindow
|
|
|
|
|
deactivate SearchToolbar
|
|
|
|
|
|
|
|
|
|
NoteEditText --> User: restoreOriginalText
|
|
|
|
|
deactivate NoteEditText
|
|
|
|
|
deactivate User
|
|
|
|
|
|
|
|
|
|
@enduml
|
|
|
|
|
|
|
|
|
|
11.模板便签
|
|
|
|
|
@startuml
|
|
|
|
|
title Minote Template Note Sequence
|
|
|
|
|
skinparam sequenceParticipant underline
|
|
|
|
|
hide footbox
|
|
|
|
|
|
|
|
|
|
actor User
|
|
|
|
|
participant "NotesListActivity" as NotesListActivity <<boundary>>
|
|
|
|
|
participant "AlertDialog" as AlertDialog <<boundary>>
|
|
|
|
|
participant "NoteEditActivity" as NoteEditActivity <<boundary>>
|
|
|
|
|
participant "WorkingNote" as WorkingNote <<entity>>
|
|
|
|
|
participant "NotesProvider" as NotesProvider <<control>>
|
|
|
|
|
participant "ContentValues" as ContentValues <<entity>>
|
|
|
|
|
|
|
|
|
|
activate User
|
|
|
|
|
|
|
|
|
|
User -> NotesListActivity: clickNewNote()
|
|
|
|
|
activate NotesListActivity
|
|
|
|
|
|
|
|
|
|
NotesListActivity -> AlertDialog: showTemplateDialog()
|
|
|
|
|
activate AlertDialog
|
|
|
|
|
|
|
|
|
|
AlertDialog -> AlertDialog: setTitle("选择创建的便签")
|
|
|
|
|
AlertDialog -> AlertDialog: setItems(templateItems[])
|
|
|
|
|
|
|
|
|
|
User -> AlertDialog: selectTemplate(index:int)
|
|
|
|
|
AlertDialog --> NotesListActivity: createNewNote(templateType:int)
|
|
|
|
|
deactivate AlertDialog
|
|
|
|
|
|
|
|
|
|
NotesListActivity -> WorkingNote: createNote(context:Context, folderId:long)
|
|
|
|
|
activate WorkingNote
|
|
|
|
|
|
|
|
|
|
WorkingNote -> ContentValues: new ContentValues()
|
|
|
|
|
activate ContentValues
|
|
|
|
|
ContentValues --> WorkingNote: returnValues
|
|
|
|
|
deactivate ContentValues
|
|
|
|
|
|
|
|
|
|
alt templateType == TEMPLATE_TYPE_1
|
|
|
|
|
WorkingNote -> WorkingNote: setNoteValue("模板1预设内容")
|
|
|
|
|
else templateType == TEMPLATE_TYPE_2
|
|
|
|
|
WorkingNote -> WorkingNote: setNoteValue("模板2预设内容")
|
|
|
|
|
else templateType == TEMPLATE_TYPE_3
|
|
|
|
|
WorkingNote -> WorkingNote: setNoteValue("模板3预设内容")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
WorkingNote -> NotesProvider: insert(uri:Uri, values:ContentValues)
|
|
|
|
|
activate NotesProvider
|
|
|
|
|
NotesProvider --> WorkingNote: noteId:long
|
|
|
|
|
deactivate NotesProvider
|
|
|
|
|
|
|
|
|
|
WorkingNote --> NotesListActivity: newNote
|
|
|
|
|
deactivate WorkingNote
|
|
|
|
|
|
|
|
|
|
NotesListActivity -> NoteEditActivity: startActivity(intent:Intent)
|
|
|
|
|
activate NoteEditActivity
|
|
|
|
|
NoteEditActivity -> NoteEditActivity: loadNoteData(noteId:long)
|
|
|
|
|
NoteEditActivity --> User: displayTemplateNote
|
|
|
|
|
deactivate NoteEditActivity
|
|
|
|
|
|
|
|
|
|
NotesListActivity -> NotesListActivity: showToast(templateName:String)
|
|
|
|
|
NotesListActivity --> User: templateCreated
|
|
|
|
|
deactivate NotesListActivity
|
|
|
|
|
|
|
|
|
|
deactivate User
|
|
|
|
|
|
|
|
|
|
@enduml
|
|
|
|
|
|
|
|
|
|
分界线以下是弃用的UML顺序图
|
|
|
|
|
|
|
|
|
|