mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-09-04 16:17:08 +00:00
refactoring: Rename presentation to presentation model (#2291)
* Rename presentation to presentation-model * Rename image * Rename UML diagram * Rename presentation to presentation-model * Rename package to presentationmodel * Rename module reference in pom.xml
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 121 KiB |
@@ -0,0 +1,59 @@
|
||||
@startuml
|
||||
package com.iluwatar.presentationmodel {
|
||||
class Album {
|
||||
~ artist : String
|
||||
~ composer : String
|
||||
~ isClassical : boolean
|
||||
~ rowId : int
|
||||
~ title : String
|
||||
+ Album(rowId : int, title : String, artist : String, isClassical : boolean, composer : String)
|
||||
}
|
||||
class App {
|
||||
+ App()
|
||||
+ main(args : String[]) {static}
|
||||
}
|
||||
class DsAlbum {
|
||||
+ albums : List<Album>
|
||||
+ albumsCache : List<Album>
|
||||
+ DsAlbum()
|
||||
+ acceptChanges()
|
||||
+ addAlbums(rowId : int, title : String, artist : String, isClassical : boolean, composer : String)
|
||||
}
|
||||
class PresentationMod {
|
||||
- data : DsAlbum
|
||||
- selectedAlbum : Album
|
||||
- selectedAlbumNumber : int
|
||||
+ PresentationMod(data : DsAlbum)
|
||||
+ albumDataSet() : DsAlbum {static}
|
||||
+ getAlbumList() : String[]
|
||||
+ getArtist() : String
|
||||
+ getComposer() : String
|
||||
+ getIsClassical() : boolean
|
||||
+ getTitle() : String
|
||||
+ setArtist(value : String)
|
||||
+ setComposer(value : String)
|
||||
+ setIsClassical(value : boolean)
|
||||
+ setSelectedAlbumNumber(selectedAlbumNumber : int)
|
||||
+ setTitle(value : String)
|
||||
}
|
||||
class View {
|
||||
~ albumList : JList<String>
|
||||
~ apply : JButton
|
||||
~ cancel : JButton
|
||||
~ chkClassical : JCheckBox
|
||||
~ model : PresentationMod
|
||||
~ notLoadView : boolean
|
||||
~ txtArtist : TextField
|
||||
~ txtComposer : TextField
|
||||
~ txtTitle : TextField
|
||||
+ View()
|
||||
+ createView()
|
||||
+ loadFromPMod()
|
||||
+ saveToPMod()
|
||||
}
|
||||
}
|
||||
PresentationMod --> "-selectedAlbum" Album
|
||||
View --> "-model" PresentationMod
|
||||
DsAlbum --> "-albums" Album
|
||||
PresentationMod --> "-data" DsAlbum
|
||||
@enduml
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Reference in New Issue
Block a user