first commit
This commit is contained in:
commit
21ab9f2e54
79 changed files with 1298 additions and 0 deletions
|
@ -0,0 +1,28 @@
|
|||
@startuml
|
||||
skinparam classAttributeIconSize 0
|
||||
|
||||
class DefaultView extends JFrame
|
||||
|
||||
class DefaultView extends ActionListener
|
||||
|
||||
class DefaultView {
|
||||
+ enum: RepresentableType
|
||||
- board: RepresentableBoard
|
||||
- frame: JFrame
|
||||
}
|
||||
interface IView {
|
||||
+ void: updateView()
|
||||
+ void: setDataSource(RepresentableBoard)
|
||||
+ void: actionPerformed(ActionEvent e)
|
||||
}
|
||||
interface RepresentableBoard {
|
||||
+ getWidth(): int
|
||||
+ getHeight(): int
|
||||
+ getCoordinateAsColor(int x, int y): color
|
||||
+ getCoordinateAsString(int x, int y): String
|
||||
+ getCoordinateAsIcon(int x, int y): Icon
|
||||
}
|
||||
|
||||
DefaultView .down.|> IView
|
||||
DefaultView "1" o-Right- "0..1" RepresentableBoard : displays
|
||||
@enduml
|
BIN
docs/Composant bug-oli-ros/bug-oli-ros-view_class_diagram.png
Normal file
BIN
docs/Composant bug-oli-ros/bug-oli-ros-view_class_diagram.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 KiB |
18
docs/Composant bug-oli-ros/bug-oli-ros-view_component.md
Normal file
18
docs/Composant bug-oli-ros/bug-oli-ros-view_component.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Bug-oli-ros - Components
|
||||
|
||||
## View
|
||||
|
||||
This class diagram describes the internal structure of our view component :
|
||||

|
||||
The "main" class was initially called `DefaultView` but it had to be renamed to `BugOliRosDefaultView` to avoid conflicts with
|
||||
other view components, also named `DefaultView`.
|
||||
|
||||
Here below, the sequence diagram explains how interactions with our view component are handled:
|
||||

|
||||
|
||||
Additionally, the user can, in the GUI, chose to display the elements in the board as icons, text or colors. By default,
|
||||
the text representation is used.
|
||||
|
||||
# Model (Board)
|
||||
|
||||
> **Note:** In this integrated project (team blue), we chose to use the model from the Jul-Mic-Rol group.
|
BIN
docs/Composant bug-oli-ros/bug-oli-ros-view_sequence_diagram.png
Normal file
BIN
docs/Composant bug-oli-ros/bug-oli-ros-view_sequence_diagram.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 89 KiB |
|
@ -0,0 +1,62 @@
|
|||
@startuml
|
||||
|
||||
actor Client order 10
|
||||
participant DefaultView order 20
|
||||
participant JFrame order 30
|
||||
participant ActionListener order 40
|
||||
|
||||
activate Client
|
||||
'defaultView()'
|
||||
Client --> DefaultView **: <<create>> DefaultView
|
||||
|
||||
DefaultView --> DefaultView ++ : DefaultView()
|
||||
|
||||
DefaultView --> JFrame **: <<create>> JFrame
|
||||
activate JFrame
|
||||
DefaultView --> JFrame: set up frame
|
||||
DefaultView --> ActionListener ++: set up ActionListener
|
||||
return ok
|
||||
return ok
|
||||
|
||||
return ok
|
||||
|
||||
'updateView()'
|
||||
Client -> DefaultView ++: updateView()
|
||||
|
||||
'loop'
|
||||
loop x - number of height
|
||||
loop y - number of width
|
||||
opt String is selected
|
||||
DefaultView -> JFrame++ : set text in cell
|
||||
JFrame --> DefaultView-- : String
|
||||
else Color is selected
|
||||
DefaultView -> JFrame++ : set color in cell
|
||||
JFrame --> DefaultView-- : Color
|
||||
else Icon is selected
|
||||
DefaultView -> JFrame++ : set icon in cell
|
||||
JFrame --> DefaultView-- : Icon
|
||||
end
|
||||
DefaultView -> JFrame ++: add the cell
|
||||
JFrame --> DefaultView --: ok
|
||||
end
|
||||
DefaultView -> JFrame ++ : revalidate the frame
|
||||
JFrame --> DefaultView --: ok
|
||||
end
|
||||
|
||||
DefaultView --> Client --: ok
|
||||
|
||||
|
||||
'setDataSource(RepresentableBoard)'
|
||||
Client -> DefaultView ++: setDataSource(representableBoard)
|
||||
return ok
|
||||
|
||||
|
||||
'actionPerformed(ActionEvent)'
|
||||
DefaultView -> ActionListener ++: actionPerformed(ActionEvent)
|
||||
return ok
|
||||
DefaultView -> ActionListener ++ : handle type of event
|
||||
return ok
|
||||
DefaultView -> DefaultView ++ : update the view
|
||||
return ok
|
||||
|
||||
@enduml
|
Loading…
Add table
Add a link
Reference in a new issue