first commit
26
docs/Composant and-juz-per/and-juz-per_components.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
# And-Juz-Per - 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 `AndJuzPerView` 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. Because the
|
||||
> And-Juz-Per model wasn't used in any integrated project, it does not implement the `SimulableBoard` API.
|
||||
|
||||
The diagrams below explain the structure and behaviour of this component. Because it is not used in this project, it
|
||||
won't be explained further.
|
||||
|
||||

|
||||
|
||||

|
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 179 KiB |
BIN
docs/Composant and-juz-per/and-juz-per_model_class_diagram.jpg
Normal file
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 97 KiB |
BIN
docs/Composant bed-her-ruf/ClassDiagram-GridAnalyser.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
docs/Composant bed-her-ruf/ClassDiagram-Simulation.jpg
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
docs/Composant bed-her-ruf/SequenceDiagram_EnonceFinale.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
docs/Composant bed-her-ruf/SequenceDiagram_Simulation.jpg
Normal file
After Width: | Height: | Size: 93 KiB |
6
docs/Composant bed-her-ruf/elements-doc.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Documentation
|
||||
|
||||
La documentation des composants du groupe bed-her-ruf a été réaliser sur le wiki du groupe en question.
|
||||
|
||||
Vous pouvez accédez à la documentation du [GridAnalyser](ttps://gitlab.forge.hefr.ch/yohan.ruffieux/gl1-bed-her-ruf/-/wikis/GridAnalyser) et du [Simulation](https://gitlab.forge.hefr.ch/yohan.ruffieux/gl1-bed-her-ruf/-/wikis/Simulation).
|
||||
|
|
@ -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
After Width: | Height: | Size: 54 KiB |
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
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
|
0
docs/Composant dem-kul-gom/.gitkeep
Normal file
BIN
docs/Composant dem-kul-gom/ActivityDiagram.jpg
Normal file
After Width: | Height: | Size: 106 KiB |
BIN
docs/Composant dem-kul-gom/SequenceDiagrammElements.jpg
Normal file
After Width: | Height: | Size: 212 KiB |
BIN
docs/Composant dem-kul-gom/element_ClassDiagramm.jpg
Normal file
After Width: | Height: | Size: 160 KiB |
47
docs/Composant dem-kul-gom/elements_doc.md
Normal file
|
@ -0,0 +1,47 @@
|
|||
# Documentation des Elements
|
||||
## Diagramme de Classe
|
||||
### Diagramme
|
||||
Les classes Engineer et SolarPannel implémentent l'interface SimulableElements.
|
||||
|
||||

|
||||
|
||||
### Explications des méthodes et variables
|
||||
#### Simulable Element
|
||||
- setSimulableBoard(SimulableBoard board) est une méthode qui permet de définir la board. Il est également possible de déassigner la board en passant le mot-clé null. Une exception est levée si on essaie de changer la board
|
||||
- getSimulableBoard() est la méthode qui permet de récupérer la board où se trouve l'élément.
|
||||
- action() permet d'effectuer une action spécifique à l'ingénieur ou au SolarPannel. Une exception est générée en cas de board non définie.
|
||||
- getState() permet de récupérer l'état de l'élément en fournissant au minimum la position "x" et "y". Une exception est générée en cas de board non définie.
|
||||
#### SolarPannel
|
||||
Variables :
|
||||
- energy contient l'énergie produite par le panneau solaire
|
||||
- timetolive contient la durée de vie restante du panneau
|
||||
- name contient le nom du Panneau Solaire selon "SP" + ID
|
||||
- elementBoard contient la board définie pour l'élément
|
||||
|
||||
Méthodes :
|
||||
- SolarPannel(int id) permet d'initialiser le SolarPannel en générant aléatoirement sa durée de vie et en y définissant un nom
|
||||
- toString() offre la représentation en caractère du SolarPannel
|
||||
- damageSolarPannel() offre la possibilité d'endommager le panneau solaire à chaque fois qu'un ingénieur rencontre un SolarPannel. Dans le pire des cas, l'ingénieur peut détruire l'élément
|
||||
- action() permet de produire un nombre aléatoire d'énergie et va décrémenter la durée de vie de l'élément. Si le temps de vie est 0, alors le panneau solaire sera retiré de la board
|
||||
### Engineer
|
||||
Variables :
|
||||
- name contient le nom de l'ingénieur selon "EN" + ID
|
||||
- elementBoard contient la board définie pour l'élément
|
||||
- actualID contient l'identifiant du futur panneau solaire placé par l'ingénieur
|
||||
|
||||
Méthodes :
|
||||
- Engineer(int id) est le constructeur permettant d'initialiser l'ingénieur
|
||||
- toString() offre la représentation en caractère du SolarPannel
|
||||
- action() va effectuer un déplacement aléatoire dans la grille, contrôler qu'aucun panneau solaire n'est déjà présent. Si ce n'est pas le cas alors il en crée un nouveau. Sinon, il va endommager le panneau.
|
||||
|
||||
## Diagramme de séquence
|
||||
Le diagramme suivant représente le fonctionnement des éléments à savoir :
|
||||
- la création d'un ingénieur
|
||||
- L'action d'un ingénieur (avec création d'un panneau)
|
||||
- La récupération de l'état des éléments
|
||||
|
||||

|
||||
|
||||
## Diagramme d'activité
|
||||
Le diagramme d'activité suivant représente les étapes de fonctionnement des éléments
|
||||

|
16
docs/Composant gl12024ros/README.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# gl2024ros Shared components
|
||||
|
||||
Author: Rossi Stefano
|
||||
|
||||
With this project I share 3 components, 2 analyzers and a simulator.
|
||||
|
||||
**Note: It's a cached site, so if it's not the latest version, force a page
|
||||
refresh**
|
||||
|
||||
- [VitroSimulator](https://stefano.rossi.pages.forge.hefr.ch/gl1-2024-ros/ch/fr/hes/id/simulife2024/simulation/VitroSimulator.html)
|
||||
- [CellularCollisionAnalyzer](https://stefano.rossi.pages.forge.hefr.ch/gl1-2024-ros/ch/fr/hes/id/simulife2024/analysis/CellularCollisionAnalyzer.html)
|
||||
- [TypesCounterAnalyzer](https://stefano.rossi.pages.forge.hefr.ch/gl1-2024-ros/ch/fr/hes/id/simulife2024/analysis/TypesCounterAnalyzer.html)
|
||||
|
||||
The base link with the complete documentation for the historical project:
|
||||
|
||||
[gl12024ros](https://stefano.rossi.pages.forge.hefr.ch/gl1-2024-ros/)
|
After Width: | Height: | Size: 98 KiB |
|
@ -0,0 +1,43 @@
|
|||
classDiagram
|
||||
|
||||
class Coordinate {
|
||||
- int x
|
||||
- int y
|
||||
|
||||
- Coordinate(int x, int y)
|
||||
|
||||
+ containedWithin(final Coordinate a, final Coordinate b) : boolean
|
||||
}
|
||||
|
||||
class Board {
|
||||
|
||||
- Coordinate minCoordinates
|
||||
- Coordinate maxCoordinates
|
||||
- Map~Element~ ~Coordinate~ elements
|
||||
|
||||
Board()
|
||||
Board(int width, int height)
|
||||
|
||||
+ toString() : String
|
||||
+ addElement(int arg0, int arg1, final SimulableElement arg2) : boolean
|
||||
+ getCoordinatesOfSimulableElement(final SimulableElement arg0) : int[]
|
||||
+ getSimulableElements() : ArrayList<SimulableElement>
|
||||
+ moveElement(int arg0, int arg1, final SimulableElement arg2) : boolean
|
||||
+ removeElement(final SimulableElement arg0) : boolean
|
||||
- testCoordinates(final Coordinate coord) : boolean
|
||||
- getElements(int x, int y) : List~SimulableElement~
|
||||
- drawLine(final StringBuilder sb, int i)
|
||||
- drawCells(final StringBuilder sb, int i)
|
||||
}
|
||||
|
||||
class RepresentableBoard {
|
||||
<<interface>>
|
||||
+ getCoordinateAsColor(int x, int y) : Color
|
||||
+ getCoordinateAsString(int x, int y) : String
|
||||
+ getCoordinateAsIcon(int x, int y) : Icon
|
||||
+ getWidth() : int
|
||||
+ getHeight() : int
|
||||
}
|
||||
|
||||
Board *-- Coordinate
|
||||
Board <|-- RepresentableBoard
|
After Width: | Height: | Size: 57 KiB |
|
@ -0,0 +1,24 @@
|
|||
classDiagram
|
||||
|
||||
class DefaultView {
|
||||
# enum RepresentationMode
|
||||
- RepresentableBoard board
|
||||
- RepresentationMode mode
|
||||
- JPanel panel
|
||||
|
||||
DefaultView()
|
||||
|
||||
+ setDataSource(RepresentableBoard board)
|
||||
+ updateView()
|
||||
- fillAndAddCell(int y, int x, AndAddCell(int y, int x, final JLabel cellLabel)
|
||||
# setRepresentationMode(final RepresentationMode mode)
|
||||
}
|
||||
|
||||
class IView {
|
||||
<<interface>>
|
||||
+ updateView()
|
||||
+ setDataSource(RepresentableBoard board)
|
||||
}
|
||||
|
||||
DefaultView <|-- Jpanel
|
||||
DefaultView <|-- IView
|
|
@ -0,0 +1,65 @@
|
|||
sequenceDiagram
|
||||
actor User
|
||||
|
||||
rect rgb(204, 255, 255)
|
||||
note right of User: Create a board
|
||||
create participant Board
|
||||
User--)Board: Board(int width, int height)
|
||||
create participant CollectionElements
|
||||
Board--)CollectionElements: HashMap<>();
|
||||
create participant Coordinate
|
||||
Board--)Coordinate: Coordinate(int minX, int minY)
|
||||
Board--)Coordinate: Coordinate(int maxX, int maxY)
|
||||
end
|
||||
|
||||
rect rgb(229, 255, 204)
|
||||
note right of User: Create and add an element
|
||||
create participant Element
|
||||
User--)Element: Element() implement ElementInterface
|
||||
User->>Board: addElement(Element element, int x, int y)
|
||||
Board--)Coordinate: Coordinate(int x, int y)
|
||||
Board-)Coordinate: testCoordinate(Coordinate(int x, int y)
|
||||
alt coordinate are invalid
|
||||
Coordinate--)Board: IndexOutOfBoundsException()
|
||||
Board--)User: IndexOutOfBoundsException()
|
||||
else coordinate are valid
|
||||
Board->>CollectionElements: put(Element element, Coordinate coordinate)
|
||||
end
|
||||
end
|
||||
|
||||
rect rgb(255, 204, 204)
|
||||
note right of User: Get elements of a coordinate
|
||||
User-)Board: getElements(int x, int y)
|
||||
Board-)Coordinate: testCoordinate(Coordinate(int x, int y)
|
||||
alt coordinate are invalid
|
||||
Coordinate--)Board: IndexOutOfBoundsException()
|
||||
Board->>User: IndexOutOfBoundsException()
|
||||
else coordinate are valid
|
||||
Board-)CollectionElements: Get elements at given coordinate
|
||||
CollectionElements--)Board: return elements
|
||||
Board->>User: return elements
|
||||
end
|
||||
end
|
||||
|
||||
rect rgb(255, 204, 255)
|
||||
note right of User: Remove an element
|
||||
User-)Board: removeElement(Element element)
|
||||
Board-)CollectionElements: containsKey(Element element)
|
||||
alt element not in CollectionElements
|
||||
CollectionElements--)Board: return false
|
||||
Board--)User: return false
|
||||
else element in CollectionElements
|
||||
CollectionElements--)Board: return true
|
||||
Board-)CollectionElements: remove(Element element)
|
||||
Board--)User: return true
|
||||
end
|
||||
end
|
||||
|
||||
rect rgb(204, 204, 255)
|
||||
note right of User: Clear coordinate
|
||||
User-)Board: clearCoordinate(int x, int y)
|
||||
Board->>Board: getElements(int x, int y)
|
||||
note over Board: see Get elements of a coordinate
|
||||
Board->>Board: removeElement(Element element)
|
||||
note over Board: For each element found, see Remove an element
|
||||
end
|
After Width: | Height: | Size: 38 KiB |
|
@ -0,0 +1,18 @@
|
|||
sequenceDiagram
|
||||
actor User
|
||||
|
||||
rect rgb(204, 255, 255)
|
||||
note right of User: Create a DefaultView
|
||||
create participant DefaultView
|
||||
User--)DefaultView: DefaultView()
|
||||
end
|
||||
|
||||
rect rgb(229, 255, 204)
|
||||
note right of User: Set a new data Source for the view
|
||||
User ->> DefaultView: setDataSource(final RepresentableBoard board)
|
||||
end
|
||||
|
||||
rect rgb(255, 204, 204)
|
||||
note right of User: Update the view
|
||||
User ->> DefaultView: updateView()
|
||||
end
|
24
docs/Composant jul-mic-rol/jul-mic-rol_components.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
# jul-mic-rol - 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 `JulMicRolView` 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.
|
||||
|
||||
The diagrams below explain the structure and behaviour of this component.
|
||||
|
||||

|
||||
|
||||
Unfortunately, the sequence diagram is too long to be put as an image in this document.
|
21
docs/Composant wae-vis-bog/Composant-Simulator.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Composant: Analyzer
|
||||
|
||||
## Author: gl1-2024-wae-vis-bog ID
|
||||
|
||||
## Diagramme de classe :
|
||||
|
||||

|
||||
|
||||
## Description
|
||||
|
||||
|
||||
La classe <i>Simulation</i> implémente l'interface <i>Simulator</i> et elle est utilisé afin d'effectuer une Simulation de la Grid ainsi que des ses divers éléments
|
||||
|
||||
Détails dans la [javadoc](https://simulife.isc.heia-fr.ch/v1.5.1/site/apidocs/ch/fr/hes/id/simulife2024/Simulator.html).
|
||||
|
||||
### Digramme de sequence :
|
||||
|
||||
Fonctionnement :
|
||||
|
||||

|
||||
|
BIN
docs/Composant wae-vis-bog/Diagramme de classe Analyseur.png
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
docs/Composant wae-vis-bog/Diagramme de classe de Simulation.png
Normal file
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 77 KiB |
BIN
docs/Composant wae-vis-bog/diagSeq-Analyzer.PNG
Normal file
After Width: | Height: | Size: 59 KiB |
0
docs/diagrams/.gitkeep
Normal file
BIN
docs/diagrams/Activity_ProjetIntegre.jpg
Normal file
After Width: | Height: | Size: 55 KiB |
BIN
docs/diagrams/Component_ProjetIntegre.jpg
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
docs/diagrams/UseCase_ProjetIntegre.jpg
Normal file
After Width: | Height: | Size: 51 KiB |