This repository has been archived by the owner on Oct 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
クラス図.pu
245 lines (241 loc) · 9.13 KB
/
クラス図.pu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
@startuml Chairsクラス図
package android{
package text{
interface ImageGetter
package method{
class LinkMovementMethod
}
package graphics{
package drawable{
class BitmapDrawable
}
}
}
package support{
package v4{
package app{
class Fragment
}
}
package v7{
package widget{
package RecyclerView{
class ViewHolder
}
}
package app{
class AppCompatActivity
}
}
}
}
package com.bumptech.glide.request.target{
class SimpleTarget
}
package chairs{
package data{
package database{
class MastodonAccount{
+ id : String
+ instanceName : String
+ userName : String
+ accessToken : String
+ lastLogin : Date
}
}
package model{
class NotificationModel{
+ createAt(context : Context, now : Long) : String
+ tootCreateAt : Long
+ type : String?
+ actionUserName : String?
+ actionAcater : String?
+ id : Long
+ content() : String
}
class TimeLineStatus{
- offsetMap : Map
+ isFavourited : Boolean
+ favouritedCount() : Int
+ isReblogged : Boolean
+ rebloggedCount() : Int
+ reblog : TimeLineStatus?
+ content() : String
+ displayName() : String
+ spoilerText() : String
+ createAt(context : Context, now : Long) : String
+ isSensitive : Boolean
+ isCW : Boolean
+ spoilerText : String
+ avater : String
+ userName : String
+ displayName : String
+ tootID : Long
+ tootCreateAt : Long
+ via : String
+ isMediaAttach : Boolean
+ mediaAttachments List<Attachment>
}
}
}
package extensions{
class String{
+ fromHtml(context: Context, textView : TextView) : Spanned
+ toIsoZonedDateTime() : ZonedDateTime
+ showToast(context: Context?, duration: Int)
+ showToastLogD(context: Context?, tag: String = "Debug")
+ showToastLogE(context: Context?, tag: String = "Error")
}
note left: 拡張メソッド
class MutableLinkMovementMethod{
- listener: OnUrlClickListener?
+ setOnUrlClickListener(l: OnUrlClickListener)
+ onTouchEvent(widget: TextView, buffer: Spannable, event: MotionEvent): Boolean
}
MutableLinkMovementMethod -up-> LinkMovementMethod
}
package Images{
class PhotoViewActivity{
# onCreate(savedInstanceState: Bundle?)
}
class URLImageParser{
- targets: ArrayList<Any>
+ getDrawable(url: String): Drawable
}
URLImageParser .up-> ImageGetter
class BitmapTarget{
+ onResourceReady(resource: Bitmap, glideAnimation: Transition<in Bitmap>?)
}
BitmapTarget -up-> SimpleTarget
class UrlDrawable{
+ drawable: Drawable?
+ draw(canvas: Canvas)
}
UrlDrawable -up-> BitmapDrawable
}
package Interfaces{
interface ItemClickListener{
+ onItemClick(view: View, postion: Int)
}
interface OnUrlClickListener{
onUrlClick(widget: TextView, uri: Uri)
}
}
package initialize{
class MainActivity{
- accountDataBase: AccountDataBaseTool
# onCreate(savedInstanceState: Bundle?)
# onDestroy()
}
MainActivity -|> AppCompatActivity
}
package ViewPages{
package Fragments{
class DummyFragment{
}
class BaseFragment{
# accountDataBase: AccountDataBaseTool
# mastodonTool: MastodonTimeLineTool
# loadLock : Boolean = false
# shutdownable : Shutdownable? = null
# itemList: ArrayAdapter<BaseStatus>
# tootList: RecyclerView!
+ onItemClick(view: View, position: Int)
+ onActivityCreated(savedInstanceState: Bundle?)
# refreshTimeLine(range: Range = Range()) = launch(UI)
# CreateHandler()
+ onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View?
+ onDestroy()
# suspend getTimeLine(range: Range = Range()): List<Status>
# checkListPosTop(): Boolean
}
class HomeFragment{
+ accountDataBase: AccountDataBaseTool
+ timeLine : MastodonTimeLineTool
+ loadLock : Boolean = false
+ shutdownable : Shutdownable? = null
+ itemList: ArrayAdapter<TimeLineStatus>
- tootList: RecyclerView!
+ onItemClick(view: View, position: Int)
+ onActivityCreated(savedInstanceState: Bundle?)
+ refreshHomeTimeLine(range: Range = Range()) = launch(UI)
+ CreateHandler()
+ onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View?
+ onDestroy()
+ suspend getTimeLine(range: Range = Range()): List<Status>
- checkListPosTop(): Boolean
+ listScroll2Top()
}
class LocalPublicTLFragment{
+ accountDataBase: AccountDataBaseTool
+ timeLine : MastodonTimeLineTool
+ loadLock : Boolean = false
+ shutdownable : Shutdownable? = null
+ itemList: ArrayAdapter<TimeLineStatus>
- tootList: RecyclerView!
+ onItemClick(view: View, position: Int)
+ onActivityCreated(savedInstanceState: Bundle?)
+ refreshLocalPublicTimeLine(range: Range = Range()) = launch(UI)
+ CreateHandler()
+ onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View?
+ onDestroy()
+ suspend getTimeLine(range: Range = Range()): List<Status>
- checkListPosTop(): Boolean
+ listScroll2Top()
}
class NotificationFragment{
+ accountDataBase: AccountDataBaseTool
+ notification : MastodonNotificationTool
+ adapter : NotificationAdapter
+ shutdownable : Shutdownable? = null
+ loadLock : Boolean = false
+ itemList: ArrayAdapter<NotificationModel>
- tootList: RecyclerView!
+ onItemClick(view: View, position: Int)
+ onActivityCreated(savedInstanceState: Bundle?)
+ refresNotification(range: Range = Range()) = launch(UI)
+ onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View?
+ onDestroy()
+ getNotification(range: Range = Range()): List<Notification>
+ CreateHandler()
- checkListPosTop(): Boolean
+ listScroll2Top()
}
class PublicTLFragment{
+ accountDataBase: AccountDataBaseTool
+ timeLine : MastodonTimeLineTool
+ loadLock : Boolean = false
+ shutdownable : Shutdownable? = null
+ itemList: ArrayAdapter<TimeLineStatus>
- tootList: RecyclerView!
+ onItemClick(view: View, position: Int)
+ onActivityCreated(savedInstanceState: Bundle?)
+ refreshPublicTimeLine(range: Range = Range()) = launch(UI)
+ CreateHandler()
+ onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View?
+ onDestroy()
+ suspend getTimeLine(range: Range = Range()): List<Status>
- checkListPosTop(): Boolean
+ listScroll2Top()
}
DummyFragment -up-|> Fragment
BaseFragment -up-|> Fragment
BaseFragment .> ItemClickListener
HomeFragment -left-|> BaseFragment
LocalPublicTLFragment -up-|> BaseFragment
NotificationFragment -right-|> BaseFragment
PublicTLFragment -up-|> BaseFragment
}
package ViewHolders{
class TimeLineViewHolder{
+ constructor(itemView:View)
}
class NotificationViewHolder{
+ constructor(itemView:View)
}
TimeLineViewHolder -up-|> ViewHolder
NotificationViewHolder -up-|> ViewHolder
}
}
}
@enduml