-
Notifications
You must be signed in to change notification settings - Fork 1
/
diagram.puml
252 lines (251 loc) · 8.95 KB
/
diagram.puml
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
246
247
248
249
250
251
252
@startuml
interface src.backend.model.Figure{
+ {static} int OFFSET = 10
.. getters ..
+ double getLeft()
+ double getTop()
+ double getHeight()
+ double getWidth()
+ Point getCenter()
.. Other methods ..
+ boolean belongs(Point eventPoint)
+ void move(double diffX, double diffY)
+ Figure duplicate()
+ Pair<Figure,Figure> split()
}
class src.backend.model.Ellipse implements src.backend.model.Figure{
# Point centerPoint
- double sMayorAxis
- double sMinorAxis
+ Ellipse(Point centerPoint, double sMayorAxis, double sMinorAxis)
.. getters ..
+ Point getCenterPoint()
+ double getsMayorAxis()
+ double getsMinorAxis()
+ String toString()
}
class src.backend.model.Circle extends src.backend.model.Ellipse{
+ Circle(Point centerPoint, double radius)
.. getters ..
+ double getRadius()
}
class src.backend.model.Rectangle implements src.backend.model.Figure{
- Point topLeft
- Point bottomRight
+ Rectangle(Point topLeft, Point bottomRight)
.. getters ..
+ Point getTopLeft()
+ Point getBottomRight()
+ String toString()
}
class src.backend.model.Square extends src.backend.model.Rectangle{
- double size
+ Square(Point topLeft, double size)
}
class src.backend.model.Point{
- double x
- double y
.. getters ..
+ double getX()
+ double getY()
+ double getDistanceX(Point point)
+ double getDistanceY(Point point)
+ String toString()
.. setters ..
+ void setX(double x)
+ void setY(double y)
}
Ellipse::centerPoint *-right- Point : contains
Rectangle::topLeft *-left- Point : contains
Rectangle::bottomRight *-left- Point : contains
class src.frontend.main.AppLauncher extends javafx.application.Application{
+ void main(String[] args)
--
+ void start(Stage primaryStage)
}
class src.frontend.main.MainFrame extends javafx.scene.layout.VBox{
+ MainFrame(SortedMap<Layer, Pair<Boolean, CanvasState>> layersMap)}
}
class src.frontend.main.AppMenuBar extends javafx.scene.control.MenuBar{
+ AppMenuBar()
}
enum src.frontend.properties.BorderEnum{
NORMAL
PUNTEADO_SIMPLE
PUNTEADO_COMPLEJO
- choiceName
+ String toString()
+ void setPattern(GraphicsContext gc)
}
interface java.lang.Comparable<T>
class src.frontend.properties.Layer implements java.lang.Comparable<Layer>{
- int layer
+ Layer(int layer)
+ int getLayer()
+ String toString()
+ int compareTo(Layer o)
+ boolean equals(Object o)
}
class src.frontend.panes.LayersPane extends javafx.scene.layout.BorderPane{
- int layerCount = 3
.. ButtonsBox ..
- ChoiceBox<Layer> capas
- RadioButton mostrarButton
- RadioButton ocultarButton
- Button addLayer
- Button removeLayer
--
+ LayersPane()
.. getters ..
+ ChoiceBox<Layer> getChoiceLayer()
+ RadioButton getMostrarButton()
+ RadioButton getOcultarButton()
+ Button getAddLayerButton()
+ Button getRemoveLayerButton()
+ int nextLayer()
}
class src.frontend.properties.Properties{
- Pair<Color, Color> colors
- ShadowEnum figureShadow
- BorderEnum figureBorderStyle
- double figureBorderWidth
- Layer figureLayer
- Set<String> tags
+ Properties(Color c1, Color c2, ShadowEnum figureShadow, BorderEnum figureBorderStyle, double figureBorderWidth, Layer figureLayer)
..Setters..
+ void setTags(String tagsToAdd)
+ void setColors(Color c1, Color c2)
+ void setFigureBorderStyle(BorderEnum figureBorderStyle)
+ void setFigureBorderWidth(double figureBorderWidth)
+ void setFigureShadow(ShadowEnum figureShadow)
..Getters..
+ Set<String> getTags()
+ Pair<Color, Color> getColors()
+ ShadowEnum getFigureShadow()
+ BorderEnum getFigureBorderStyle()
+ double getFigureBorderWidth()
+ Layer getFigureLayer()
}
enum src.frontend.properties.ShadowEnum{
SIMPLE
COLOREADA
SIMPLE_INVERSA
COLOREADA_INVERSA
NINGUNA
- int offset
- String choiceName
# void shadowRecGen(GraphicsContext gc, Figure figure, Color color)
# void shadowRoundGen(GraphicsContext gc, Figure figure, Color color)
+ String toString()
+ void shadowRec(GraphicsContext gc, Figure figure,Color c)
+ void shadowRound(GraphicsContext gc, Figure figure,Color c)
}
class src.frontend.panes.StatusPane extends javafx.scene.layout.BorderPane{
- Label statusLabel
+ StatusPane()
+ void updateStatus(String text)
}
class src.frontend.panes.PaintPane extends javafx.scene.layout.BorderPane{
.. panes ..
+ LayersPane layersPane
+ LabelsPane labelPane
+ StatusPane statusPane
+ SortedMap<Layer, Pair<Boolean, ArrayList<FrontFigure>>> layerPairSortedMap
+ Canvas canvas
+ GraphicsContext gc
+ Color lineColor
+ Color defaultFillColor1
+ Color defaultFillColor2
+ ToggleButton selectionButton
+ FigureButton rectangleButton
+ FigureButton circleButton
+ FigureButton squareButton
+ FigureButton ellipseButton
+ ToggleButton deleteButton
+ ObservableList<ShadowEnum> shadowsOptions
+ ChoiceBox<ShadowEnum> shadows
+ ColorPicker fillColorPicker1
+ ColorPicker fillColorPicker2
+ Slider edgeSlider
+ ObservableList<BorderEnum> borderOptions
+ ChoiceBox<BorderEnum> borders
+ Button duplicarButton
+ Button dividirButton
+ Button movCentroButton
+ Button guardarButton
+ TextArea etiquetasDeForma
+ Point startPoint
+ FrontFigure selectedFigure
- double MAX=10
- double MIN=0.00000001
--
+ PaintPane(SortedMap<Layer, Pair<Boolean, ArrayList<FrontFigure>>> canvasState, StatusPane statusPane, LabelsPane labelPane,LayersPane layersPane)
- void redrawCanvas()
- void deleteFigure(FrontFigure figure)
}
interface src.frontend.front_figures.Drawable{
+ void drawEdge(GraphicsContext gc)
+ void draw(GraphicsContext gc)
+ Properties getProperties()
}
abstract class src.frontend.front_figures.FrontFigure implements src.frontend.front_figures.Drawable{
# Figure figure
# Properties properties
+ FrontFigure(Figure figure, Properties properties)
+ void setProperties(Properties properties)
+ Boolean belongs(Point point)
+ void move(double diffX,double diffY)
+ Point getCenter()
+ Pair<FrontFigure,FrontFigure> split()
+ Properties copyProperties()
+ public FrontFigure duplicate()
}
src.backend.model.Figure --* src.frontend.front_figures.FrontFigure::figure
src.frontend.properties.Properties --* src.frontend.front_figures.FrontFigure::properties
abstract class src.frontend.front_figures.FrontRectangularFigure extends src.frontend.front_figures.FrontFigure{
+ FrontRectangularFigure(Figure figure, Properties properties)
}
abstract class src.frontend.front_figures.FrontOvalFigure extends src.frontend.front_figures.FrontFigure{
+ FrontOvalFigure(Figure figure, Properties properties)
}
class src.frontend.front_figures.FrontRectangle extends src.frontend.front_figures.FrontRectangularFigure{
+ FrontRectangle(Figure figure, Properties properties)
+ FrontRectangle(Point topLeft, Point bottomRight, Properties properties)
}
class src.frontend.front_figures.FrontSquare extends src.frontend.front_figures.FrontRectangularFigure{
+ FrontSquare(Figure figure, Properties properties)
+ FrontSquare(Point topLeft, double size, Properties properties)
}
class src.frontend.front_figures.FrontCircle extends src.frontend.front_figures.FrontOvalFigure{
+ FrontCircle(Figure figure, Properties properties)
+ FrontCircle(Point centerPoint, double radius, Properties properties)
}
class src.frontend.front_figures.FrontEllipse extends src.frontend.front_figures.FrontOvalFigure{
+ FrontElipse(Figure figure, Properties properties)
+ FrontElipse(Point centerPoint, double sMayorAxis, double sMinorAxis, Properties properties)
}
class src.frontend.panes.button_types.FigureButton extends javafx.scene.control.ToggleButton{
- FigureButtonFunctionality fbf
+ FigureButton(String name, FigureButtonFunctionality fbf)
+ FrontFigure makeFrontFigure( Point endPoint, Point startPoint, Properties properties)
}
enum src.frontend.panes.button_types.FigureButtonFunctionality{
CICLE_BUTTON
ELLIPSE_BUTTON
RECTANGLE_BUTTON
SQUARE_BUTTON
+ FrontFigure makeNewFigure( Point endPoint, Point startPoint, Properties properties)
}
class src.frontend.panes.labelsPane extends javafx.scene.layout.BorderPane{
- RadioButton todasButton
- RadioButton soloButton
- TextField filterByLabel
- String inputFilter
+ LabelsPane()
+ RadioButton getSoloButton()
+ RadioButton getTodasButton()
+ TextField getFilterByLabel()
+ String getInputFilter()
+ void setInputFilter(String inputFilter)
}
@enduml