Merge lp:~danilovesky/workcraft/trunk-bug-1395360 into lp:workcraft
- trunk-bug-1395360
- Merge into trunk
Proposed by
Danil Sokolov
Status: | Merged |
---|---|
Merged at revision: | 594 |
Proposed branch: | lp:~danilovesky/workcraft/trunk-bug-1395360 |
Merge into: | lp:workcraft |
Diff against target: |
1050 lines (+427/-368) 8 files modified
CircuitPlugin/src/org/workcraft/plugins/circuit/VisualCircuit.java (+1/-0) CircuitPlugin/src/org/workcraft/plugins/circuit/VisualCircuitComponent.java (+60/-58) CircuitPlugin/src/org/workcraft/plugins/circuit/VisualContact.java (+53/-35) CircuitPlugin/src/org/workcraft/plugins/circuit/tools/CircuitSelectionTool.java (+48/-34) CircuitPlugin/src/org/workcraft/plugins/circuit/tools/CircuitSimulationTool.java (+43/-27) STGPlugin/src/org/workcraft/plugins/stg/tools/StgSimulationTool.java (+16/-8) WorkcraftCore/models/simulation.ucls (+202/-202) WorkcraftCore/src/org/workcraft/dom/visual/VisualComponent.java (+4/-4) |
To merge this branch: | bzr merge lp:~danilovesky/workcraft/trunk-bug-1395360 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Danil Sokolov | Approve | ||
Review via email: mp+251306@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Danil Sokolov (danilovesky) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'CircuitPlugin/src/org/workcraft/plugins/circuit/VisualCircuit.java' |
2 | --- CircuitPlugin/src/org/workcraft/plugins/circuit/VisualCircuit.java 2015-02-09 10:46:28 +0000 |
3 | +++ CircuitPlugin/src/org/workcraft/plugins/circuit/VisualCircuit.java 2015-02-27 18:34:42 +0000 |
4 | @@ -218,6 +218,7 @@ |
5 | if (container instanceof VisualFunctionComponent) { |
6 | VisualFunctionComponent component = (VisualFunctionComponent)container; |
7 | component.addContact(this, vc); |
8 | + component.setContactsDefaultPosition(); |
9 | } else { |
10 | Container mathContainer = NamespaceHelper.getMathContainer(this, getRoot()); |
11 | mathContainer.add(vc.getReferencedComponent()); |
12 | |
13 | === modified file 'CircuitPlugin/src/org/workcraft/plugins/circuit/VisualCircuitComponent.java' |
14 | --- CircuitPlugin/src/org/workcraft/plugins/circuit/VisualCircuitComponent.java 2015-02-26 11:19:42 +0000 |
15 | +++ CircuitPlugin/src/org/workcraft/plugins/circuit/VisualCircuitComponent.java 2015-02-27 18:34:42 +0000 |
16 | @@ -163,7 +163,6 @@ |
17 | public void setRenderType(RenderType renderType) { |
18 | if (this.renderType != renderType) { |
19 | this.renderType = renderType; |
20 | - //spreadContactsEvenly(); |
21 | setContactsDefaultPosition(); |
22 | invalidateBoundingBox(); |
23 | sendNotification(new PropertyChangedEvent(this, "render type")); |
24 | @@ -278,6 +277,18 @@ |
25 | invalidateBoundingBox(); |
26 | } |
27 | |
28 | + public void centerPivotPoint() { |
29 | + Rectangle2D bb = getInternalBoundingBoxInLocalSpace(); |
30 | + setX(getX() + bb.getCenterX()); |
31 | + setY(getY() + bb.getCenterY()); |
32 | + Collection<VisualContact> contacts = getContacts(); |
33 | + for (VisualContact vc: contacts) { |
34 | + vc.setX(vc.getX() - bb.getCenterX()); |
35 | + vc.setY(vc.getY() - bb.getCenterY()); |
36 | + } |
37 | + invalidateBoundingBox(); |
38 | + } |
39 | + |
40 | public static double snapP5(double x) { |
41 | return (double) (Math.round(x * 2)) / 2; |
42 | } |
43 | @@ -329,7 +340,6 @@ |
44 | double y1 = -size/2; |
45 | double x2 = size/2; |
46 | double y2 = size/2; |
47 | - |
48 | for (VisualContact vc: Hierarchy.getChildrenOfType(this, VisualContact.class)) { |
49 | switch (vc.getDirection()) { |
50 | case WEST: |
51 | @@ -358,38 +368,54 @@ |
52 | break; |
53 | } |
54 | } |
55 | - |
56 | - for (VisualContact vc: Hierarchy.getChildrenOfType(this, VisualContact.class)) { |
57 | - double x = vc.getX(); |
58 | - double y = vc.getY(); |
59 | - switch (vc.getDirection()) { |
60 | - case WEST: |
61 | - y1 = Math.min(y1, y - contactStep / 2); |
62 | - y2 = Math.max(y2, y + contactStep / 2); |
63 | - break; |
64 | - case NORTH: |
65 | - x1 = Math.min(x1, x - contactStep / 2); |
66 | - x2 = Math.max(x2, x + contactStep / 2); |
67 | - break; |
68 | - case EAST: |
69 | - y1 = Math.min(y1, y - contactStep / 2); |
70 | - y2 = Math.max(y2, y + contactStep / 2); |
71 | - break; |
72 | - case SOUTH: |
73 | - x1 = Math.min(x1, x - contactStep / 2); |
74 | - x2 = Math.max(x2, x + contactStep / 2); |
75 | - break; |
76 | - } |
77 | - } |
78 | return new Rectangle2D.Double(x1, y1, x2 - x1, y2 - y1); |
79 | } |
80 | - |
81 | - private Rectangle2D getContactBestBox() { |
82 | + |
83 | + private Rectangle2D getContactExpandedBox() { |
84 | Rectangle2D minBox = getContactMinimalBox(); |
85 | double x1 = minBox.getMinX(); |
86 | double y1 = minBox.getMinY(); |
87 | double x2 = minBox.getMaxX(); |
88 | double y2 = minBox.getMaxY(); |
89 | + for (VisualContact vc: Hierarchy.getChildrenOfType(this, VisualContact.class)) { |
90 | + double x = vc.getX(); |
91 | + double y = vc.getY(); |
92 | + switch (vc.getDirection()) { |
93 | + case WEST: |
94 | + if (vc.getX() < minBox.getMinX()) { |
95 | + y1 = Math.min(y1, y - contactStep / 2); |
96 | + y2 = Math.max(y2, y + contactStep / 2); |
97 | + } |
98 | + break; |
99 | + case NORTH: |
100 | + if (vc.getY() < minBox.getMinY()) { |
101 | + x1 = Math.min(x1, x - contactStep / 2); |
102 | + x2 = Math.max(x2, x + contactStep / 2); |
103 | + } |
104 | + break; |
105 | + case EAST: |
106 | + if (vc.getX() > minBox.getMaxX()) { |
107 | + y1 = Math.min(y1, y - contactStep / 2); |
108 | + y2 = Math.max(y2, y + contactStep / 2); |
109 | + } |
110 | + break; |
111 | + case SOUTH: |
112 | + if (vc.getY() > minBox.getMaxY()) { |
113 | + x1 = Math.min(x1, x - contactStep / 2); |
114 | + x2 = Math.max(x2, x + contactStep / 2); |
115 | + } |
116 | + break; |
117 | + } |
118 | + } |
119 | + return new Rectangle2D.Double(x1, y1, x2 - x1, y2 - y1); |
120 | + } |
121 | + |
122 | + private Rectangle2D getContactBestBox() { |
123 | + Rectangle2D expBox = getContactExpandedBox(); |
124 | + double x1 = expBox.getMinX(); |
125 | + double y1 = expBox.getMinY(); |
126 | + double x2 = expBox.getMaxX(); |
127 | + double y2 = expBox.getMaxY(); |
128 | |
129 | boolean westFirst = true; |
130 | boolean northFirst = true; |
131 | @@ -442,9 +468,9 @@ |
132 | y1 = y2 = (y1 + y2) / 2; |
133 | } |
134 | Rectangle2D maxBox = new Rectangle2D.Double(x1, y1, x2 - x1, y2 - y1); |
135 | - return BoundingBoxHelper.union(minBox, maxBox); |
136 | + return BoundingBoxHelper.union(expBox, maxBox); |
137 | } |
138 | - |
139 | + |
140 | private void drawContactLines(DrawRequest r) { |
141 | Rectangle2D bb = getInternalBoundingBoxInLocalSpace(); |
142 | for (VisualContact vc: Hierarchy.getChildrenOfType(this, VisualContact.class)) { |
143 | @@ -688,17 +714,17 @@ |
144 | AffineTransform at = t.sender.getTransform(); |
145 | double x = at.getTranslateX(); |
146 | double y = at.getTranslateY(); |
147 | - Rectangle2D bb = getInternalBoundingBoxInLocalSpace(); |
148 | - if ((x < bb.getMinX()) && (y > bb.getMinY()) && (y < bb.getMaxY())) { |
149 | + Rectangle2D bb = getContactExpandedBox(); //getContactMinimalBox();//getInternalBoundingBoxInLocalSpace(); |
150 | + if ((x <= bb.getMinX()) && (y > bb.getMinY()) && (y < bb.getMaxY())) { |
151 | vc.setDirection(Direction.WEST); |
152 | } |
153 | - if ((x > bb.getMaxX()) && (y > bb.getMinY()) && (y < bb.getMaxY())) { |
154 | + if ((x >= bb.getMaxX()) && (y > bb.getMinY()) && (y < bb.getMaxY())) { |
155 | vc.setDirection(Direction.EAST); |
156 | } |
157 | - if ((y < bb.getMinY()) && (x > bb.getMinX()) && (x < bb.getMaxX())) { |
158 | + if ((y <= bb.getMinY()) && (x > bb.getMinX()) && (x < bb.getMaxX())) { |
159 | vc.setDirection(Direction.NORTH); |
160 | } |
161 | - if ((y > bb.getMaxY()) && (x > bb.getMinX()) && (x < bb.getMaxX())) { |
162 | + if ((y >= bb.getMaxY()) && (x > bb.getMinX()) && (x < bb.getMaxX())) { |
163 | vc.setDirection(Direction.SOUTH); |
164 | } |
165 | invalidateBoundingBox(); |
166 | @@ -739,29 +765,5 @@ |
167 | public void removeAllObservers() { |
168 | groupImpl.removeAllObservers(); |
169 | } |
170 | - |
171 | - @Override |
172 | - public void rotateClockwise() { |
173 | - super.rotateClockwise(); |
174 | - setContactsDefaultPosition(); |
175 | - } |
176 | - |
177 | - @Override |
178 | - public void rotateCounterclockwise() { |
179 | - super.rotateCounterclockwise(); |
180 | - setContactsDefaultPosition(); |
181 | - } |
182 | - |
183 | - @Override |
184 | - public void flipHorizontal() { |
185 | - super.flipHorizontal(); |
186 | - setContactsDefaultPosition(); |
187 | - } |
188 | - |
189 | - @Override |
190 | - public void flipVertical() { |
191 | - super.flipVertical(); |
192 | - setContactsDefaultPosition(); |
193 | - } |
194 | |
195 | } |
196 | |
197 | === modified file 'CircuitPlugin/src/org/workcraft/plugins/circuit/VisualContact.java' |
198 | --- CircuitPlugin/src/org/workcraft/plugins/circuit/VisualContact.java 2015-02-26 11:19:42 +0000 |
199 | +++ CircuitPlugin/src/org/workcraft/plugins/circuit/VisualContact.java 2015-02-27 18:34:42 +0000 |
200 | @@ -155,25 +155,6 @@ |
201 | addPropertyDeclarations(); |
202 | } |
203 | |
204 | - private Shape getShape() { |
205 | - if (getParent() instanceof VisualCircuitComponent) { |
206 | - return new Rectangle2D.Double( |
207 | - -size / 2 + CircuitSettings.getWireWidth(), |
208 | - -size / 2 + CircuitSettings.getWireWidth(), |
209 | - size - CircuitSettings.getWireWidth() * 2, |
210 | - size - CircuitSettings.getWireWidth() * 2); |
211 | - } else { |
212 | - Path2D path = new Path2D.Double(); |
213 | - path.moveTo(-size / 2, -size / 2); |
214 | - path.lineTo(0, -size / 2); |
215 | - path.lineTo(size / 2, 0); |
216 | - path.lineTo(0, size / 2); |
217 | - path.lineTo(-size / 2, size / 2); |
218 | - path.closePath(); |
219 | - return path; |
220 | - } |
221 | - } |
222 | - |
223 | private void addPropertyDeclarations() { |
224 | addPropertyDeclaration(new PropertyDeclaration<VisualContact, Direction>( |
225 | this, "Direction", Direction.class) { |
226 | @@ -205,6 +186,25 @@ |
227 | } |
228 | }); |
229 | } |
230 | + |
231 | + private Shape getShape() { |
232 | + if (getParent() instanceof VisualCircuitComponent) { |
233 | + return new Rectangle2D.Double( |
234 | + -size / 2 + CircuitSettings.getWireWidth(), |
235 | + -size / 2 + CircuitSettings.getWireWidth(), |
236 | + size - CircuitSettings.getWireWidth() * 2, |
237 | + size - CircuitSettings.getWireWidth() * 2); |
238 | + } else { |
239 | + Path2D path = new Path2D.Double(); |
240 | + path.moveTo(-size / 2, -size / 2); |
241 | + path.lineTo(0, -size / 2); |
242 | + path.lineTo(size / 2, 0); |
243 | + path.lineTo(0, size / 2); |
244 | + path.lineTo(-size / 2, size / 2); |
245 | + path.closePath(); |
246 | + return path; |
247 | + } |
248 | + } |
249 | |
250 | @Override |
251 | public void draw(DrawRequest r) { |
252 | @@ -392,38 +392,56 @@ |
253 | |
254 | @Override |
255 | public void rotateClockwise() { |
256 | + if (getParent() instanceof VisualCircuitComponent) { |
257 | + VisualCircuitComponent component = (VisualCircuitComponent)getParent(); |
258 | + if (component.getRenderType() == RenderType.BOX) { |
259 | + AffineTransform at = new AffineTransform(); |
260 | + at.quadrantRotate(1); |
261 | + Point2D pos = at.transform(getPosition(), null); |
262 | + setPosition(pos); |
263 | + } |
264 | + } |
265 | + setDirection(getDirection().rotateClockwise()); |
266 | super.rotateClockwise(); |
267 | - setDirection(getDirection().rotateClockwise()); |
268 | } |
269 | |
270 | @Override |
271 | public void rotateCounterclockwise() { |
272 | + if (getParent() instanceof VisualCircuitComponent) { |
273 | + VisualCircuitComponent component = (VisualCircuitComponent)getParent(); |
274 | + if (component.getRenderType() == RenderType.BOX) { |
275 | + AffineTransform at = new AffineTransform(); |
276 | + at.quadrantRotate(-1); |
277 | + Point2D pos = at.transform(getPosition(), null); |
278 | + setPosition(pos); |
279 | + } |
280 | + } |
281 | + setDirection(getDirection().rotateCounterclockwise()); |
282 | super.rotateCounterclockwise(); |
283 | - setDirection(getDirection().rotateCounterclockwise()); |
284 | } |
285 | |
286 | @Override |
287 | public void flipHorizontal() { |
288 | + if (getParent() instanceof VisualCircuitComponent) { |
289 | + VisualCircuitComponent component = (VisualCircuitComponent)getParent(); |
290 | + if (component.getRenderType() == RenderType.BOX) { |
291 | + setX(-getX()); |
292 | + } |
293 | + } |
294 | + setDirection(getDirection().flipHorizontal()); |
295 | super.flipHorizontal(); |
296 | - setDirection(getDirection().flipHorizontal()); |
297 | - if (getParent() instanceof VisualCircuitComponent) { |
298 | - VisualCircuitComponent component = (VisualCircuitComponent)getParent(); |
299 | - if (component.getRenderType() == RenderType.BOX) { |
300 | - setX(-getX()); |
301 | - } |
302 | - } |
303 | } |
304 | |
305 | @Override |
306 | public void flipVertical() { |
307 | + if (getParent() instanceof VisualCircuitComponent) { |
308 | + VisualCircuitComponent component = (VisualCircuitComponent)getParent(); |
309 | + if (component.getRenderType() == RenderType.BOX) { |
310 | + setY(-getY()); |
311 | + } |
312 | + } |
313 | + setDirection(getDirection().flipVertical()); |
314 | super.flipVertical(); |
315 | - setDirection(getDirection().flipVertical()); |
316 | - if (getParent() instanceof VisualCircuitComponent) { |
317 | - VisualCircuitComponent component = (VisualCircuitComponent)getParent(); |
318 | - if (component.getRenderType() == RenderType.BOX) { |
319 | - setY(-getY()); |
320 | - } |
321 | - } |
322 | } |
323 | |
324 | } |
325 | |
326 | === modified file 'CircuitPlugin/src/org/workcraft/plugins/circuit/tools/CircuitSelectionTool.java' |
327 | --- CircuitPlugin/src/org/workcraft/plugins/circuit/tools/CircuitSelectionTool.java 2014-10-10 10:35:07 +0000 |
328 | +++ CircuitPlugin/src/org/workcraft/plugins/circuit/tools/CircuitSelectionTool.java 2015-02-27 18:34:42 +0000 |
329 | @@ -50,41 +50,55 @@ |
330 | popup.setFocusable(false); |
331 | popup.add(new JLabel("Function component")); |
332 | popup.addSeparator(); |
333 | - |
334 | - JMenuItem addOutput = new JMenuItem("Add output (EAST)"); |
335 | - addOutput.addActionListener(new ActionListener() { |
336 | - @Override |
337 | - public void actionPerformed(ActionEvent e) { |
338 | - editor.getWorkspaceEntry().saveMemento(); |
339 | - VisualCircuit vcircuit = (VisualCircuit)editor.getModel(); |
340 | - vcircuit.getOrCreateContact(component, null, IOType.OUTPUT); |
341 | - } |
342 | - }); |
343 | - popup.add(addOutput); |
344 | - |
345 | - JMenuItem addInput = new JMenuItem("Add input (WEST)"); |
346 | - addInput.addActionListener(new ActionListener() { |
347 | - @Override |
348 | - public void actionPerformed(ActionEvent e) { |
349 | - editor.getWorkspaceEntry().saveMemento(); |
350 | - VisualCircuit vcircuit = (VisualCircuit)editor.getModel(); |
351 | - vcircuit.getOrCreateContact(component, null, IOType.INPUT); |
352 | - } |
353 | - }); |
354 | - popup.add(addInput); |
355 | - |
356 | + { |
357 | + JMenuItem addOutput = new JMenuItem("Add output (EAST)"); |
358 | + addOutput.addActionListener(new ActionListener() { |
359 | + @Override |
360 | + public void actionPerformed(ActionEvent e) { |
361 | + editor.getWorkspaceEntry().saveMemento(); |
362 | + VisualCircuit vcircuit = (VisualCircuit)editor.getModel(); |
363 | + vcircuit.getOrCreateContact(component, null, IOType.OUTPUT); |
364 | + component.setContactsDefaultPosition(); |
365 | + } |
366 | + }); |
367 | + popup.add(addOutput); |
368 | + } |
369 | + { |
370 | + JMenuItem addInput = new JMenuItem("Add input (WEST)"); |
371 | + addInput.addActionListener(new ActionListener() { |
372 | + @Override |
373 | + public void actionPerformed(ActionEvent e) { |
374 | + editor.getWorkspaceEntry().saveMemento(); |
375 | + VisualCircuit vcircuit = (VisualCircuit)editor.getModel(); |
376 | + vcircuit.getOrCreateContact(component, null, IOType.INPUT); |
377 | + component.setContactsDefaultPosition(); |
378 | + } |
379 | + }); |
380 | + popup.add(addInput); |
381 | + } |
382 | popup.addSeparator(); |
383 | - |
384 | - JMenuItem defaultPosition = new JMenuItem("Set contacts in default position"); |
385 | - defaultPosition.addActionListener(new ActionListener() { |
386 | - @Override |
387 | - public void actionPerformed(ActionEvent e) { |
388 | - editor.getWorkspaceEntry().saveMemento(); |
389 | - component.setContactsDefaultPosition(); |
390 | - } |
391 | - }); |
392 | - popup.add(defaultPosition); |
393 | - |
394 | + { |
395 | + JMenuItem defaultContactPosition = new JMenuItem("Set contacts in default position"); |
396 | + defaultContactPosition.addActionListener(new ActionListener() { |
397 | + @Override |
398 | + public void actionPerformed(ActionEvent e) { |
399 | + editor.getWorkspaceEntry().saveMemento(); |
400 | + component.setContactsDefaultPosition(); |
401 | + } |
402 | + }); |
403 | + popup.add(defaultContactPosition); |
404 | + } |
405 | + { |
406 | + JMenuItem centerPivotPoint = new JMenuItem("Center pivot point"); |
407 | + centerPivotPoint.addActionListener(new ActionListener() { |
408 | + @Override |
409 | + public void actionPerformed(ActionEvent e) { |
410 | + editor.getWorkspaceEntry().saveMemento(); |
411 | + component.centerPivotPoint(); |
412 | + } |
413 | + }); |
414 | + popup.add(centerPivotPoint); |
415 | + } |
416 | return popup; |
417 | } |
418 | |
419 | |
420 | === modified file 'CircuitPlugin/src/org/workcraft/plugins/circuit/tools/CircuitSimulationTool.java' |
421 | --- CircuitPlugin/src/org/workcraft/plugins/circuit/tools/CircuitSimulationTool.java 2015-01-14 18:10:46 +0000 |
422 | +++ CircuitPlugin/src/org/workcraft/plugins/circuit/tools/CircuitSimulationTool.java 2015-02-27 18:34:42 +0000 |
423 | @@ -23,6 +23,7 @@ |
424 | import org.workcraft.plugins.circuit.VisualCircuitConnection; |
425 | import org.workcraft.plugins.circuit.VisualContact; |
426 | import org.workcraft.plugins.circuit.VisualJoint; |
427 | +import org.workcraft.plugins.petri.Place; |
428 | import org.workcraft.plugins.shared.CommonSimulationSettings; |
429 | import org.workcraft.plugins.stg.SignalTransition; |
430 | import org.workcraft.plugins.stg.SignalTransition.Direction; |
431 | @@ -55,31 +56,51 @@ |
432 | }); |
433 | controlPanel.add(copyInitButton); |
434 | } |
435 | + |
436 | + @Override |
437 | + public void initialiseSignalState() { |
438 | + super.initialiseSignalState(); |
439 | + for (String signalName: stateMap.keySet()) { |
440 | + SignalState signalState = stateMap.get(signalName); |
441 | + Node zeroNode = net.getNodeByReference(signalName + "_0"); |
442 | + if (zeroNode instanceof Place) { |
443 | + Place zeroPlace = (Place)zeroNode; |
444 | + signalState.value = ((zeroPlace.getTokens() > 0) ? 0 : 1); |
445 | + } |
446 | + Node oneNode= net.getNodeByReference(signalName + "_1"); |
447 | + if (oneNode instanceof Place) { |
448 | + Place onePlace = (Place)oneNode; |
449 | + signalState.value = ((onePlace.getTokens() > 0) ? 1 : 0); |
450 | + } |
451 | + } |
452 | + } |
453 | |
454 | // return first enabled transition |
455 | public SignalTransition isContactExcited(VisualContact c) { |
456 | boolean up = false; |
457 | boolean down = false; |
458 | - |
459 | SignalTransition st = null; |
460 | - if (c == null) |
461 | - return null; |
462 | - |
463 | - for (SignalTransition tr : c.getReferencedTransitions()) { |
464 | - if (net.isEnabled(tr)) { |
465 | - if (st == null) |
466 | - st = tr; |
467 | - if (tr.getDirection() == Direction.MINUS) |
468 | - down = true; |
469 | - if (tr.getDirection() == Direction.PLUS) |
470 | - up = true; |
471 | - if (up && down) |
472 | - break; |
473 | + if (c != null) { |
474 | + for (SignalTransition tr : c.getReferencedTransitions()) { |
475 | + if (net.isEnabled(tr)) { |
476 | + if (st == null) { |
477 | + st = tr; |
478 | + } |
479 | + if (tr.getDirection() == Direction.MINUS) { |
480 | + down = true; |
481 | + } |
482 | + if (tr.getDirection() == Direction.PLUS) { |
483 | + up = true; |
484 | + } |
485 | + if (up && down) { |
486 | + break; |
487 | + } |
488 | + } |
489 | + } |
490 | + if (up && down) { |
491 | + st = null; |
492 | } |
493 | } |
494 | - |
495 | - if (up && down) |
496 | - return null; |
497 | return st; |
498 | } |
499 | |
500 | @@ -93,11 +114,11 @@ |
501 | } |
502 | }); |
503 | |
504 | - if (node == null) |
505 | - return; |
506 | - SignalTransition st = isContactExcited((VisualContact) node); |
507 | - if (st != null) { |
508 | - executeTransition(e.getEditor(), st); |
509 | + if (node != null) { |
510 | + SignalTransition st = isContactExcited((VisualContact) node); |
511 | + if (st != null) { |
512 | + executeTransition(e.getEditor(), st); |
513 | + } |
514 | } |
515 | } |
516 | |
517 | @@ -229,11 +250,8 @@ |
518 | } |
519 | }; |
520 | } else if (node instanceof VisualPage || node instanceof VisualGroup) { |
521 | - |
522 | final boolean ret = isContainerExcited((Container)node); |
523 | - |
524 | return new ContainerDecoration() { |
525 | - |
526 | @Override |
527 | public Color getColorisation() { |
528 | return null; |
529 | @@ -251,8 +269,6 @@ |
530 | }; |
531 | |
532 | } |
533 | - |
534 | - |
535 | |
536 | return null; |
537 | } |
538 | |
539 | === modified file 'STGPlugin/src/org/workcraft/plugins/stg/tools/StgSimulationTool.java' |
540 | --- STGPlugin/src/org/workcraft/plugins/stg/tools/StgSimulationTool.java 2015-02-09 18:34:32 +0000 |
541 | +++ STGPlugin/src/org/workcraft/plugins/stg/tools/StgSimulationTool.java 2015-02-27 18:34:42 +0000 |
542 | @@ -39,7 +39,7 @@ |
543 | protected Map<String, SignalState> stateMap; |
544 | protected JTable stateTable; |
545 | |
546 | - private final class SignalState { |
547 | + public final class SignalState { |
548 | public String name = ""; |
549 | public Color color = Color.BLACK; |
550 | public boolean excited = false; |
551 | @@ -191,6 +191,12 @@ |
552 | @Override |
553 | public void updateState(final GraphEditor editor) { |
554 | super.updateState(editor); |
555 | + updateSignalState(); |
556 | + stateTable.tableChanged(new TableModelEvent(traceTable.getModel())); |
557 | + } |
558 | + |
559 | + public void updateSignalState() { |
560 | + initialiseSignalState(); |
561 | ArrayList<String> combinedTrace = new ArrayList<String>(); |
562 | if (!mainTrace.isEmpty()) { |
563 | combinedTrace.addAll(mainTrace.subList(0, mainTrace.getPosition())); |
564 | @@ -199,12 +205,6 @@ |
565 | combinedTrace.addAll(branchTrace.subList(0, branchTrace.getPosition())); |
566 | } |
567 | |
568 | - for (String signalName: stateMap.keySet()) { |
569 | - SignalState signalState = stateMap.get(signalName); |
570 | - signalState.value = -1; |
571 | - signalState.excited = false; |
572 | - } |
573 | - |
574 | for (String ref : combinedTrace) { |
575 | Node node = net.getNodeByReference(ref); |
576 | if (node instanceof SignalTransition) { |
577 | @@ -243,7 +243,14 @@ |
578 | } |
579 | } |
580 | } |
581 | - stateTable.tableChanged(new TableModelEvent(traceTable.getModel())); |
582 | + } |
583 | + |
584 | + public void initialiseSignalState() { |
585 | + for (String signalName: stateMap.keySet()) { |
586 | + SignalState signalState = stateMap.get(signalName); |
587 | + signalState.value = -1; |
588 | + signalState.excited = false; |
589 | + } |
590 | } |
591 | |
592 | @Override |
593 | @@ -276,6 +283,7 @@ |
594 | } |
595 | } |
596 | } |
597 | + updateSignalState(); |
598 | } |
599 | |
600 | |
601 | |
602 | === modified file 'WorkcraftCore/models/simulation.ucls' |
603 | --- WorkcraftCore/models/simulation.ucls 2014-10-17 14:13:06 +0000 |
604 | +++ WorkcraftCore/models/simulation.ucls 2015-02-27 18:34:42 +0000 |
605 | @@ -1,203 +1,203 @@ |
606 | -<?xml version="1.0" encoding="UTF-8"?> |
607 | -<class-diagram version="1.1.5" icons="true" always-add-relationships="false" generalizations="true" realizations="true" |
608 | - associations="true" dependencies="false" nesting-relationships="true"> |
609 | - <class id="1" language="java" name="org.workcraft.plugins.circuit.tools.CircuitSimulationTool" project="CircuitPlugin" |
610 | - file="/CircuitPlugin/src/org/workcraft/plugins/circuit/tools/CircuitSimulationTool.java" binary="false" |
611 | - corner="BOTTOM_RIGHT"> |
612 | - <position height="-1" width="-1" x="1030" y="368"/> |
613 | - <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
614 | - visibility="true"> |
615 | - <attributes public="true" package="true" protected="false" private="false" static="true"/> |
616 | - <operations public="true" package="true" protected="false" private="false" static="true"/> |
617 | - </display> |
618 | - </class> |
619 | - <class id="2" language="java" name="org.workcraft.plugins.dfs.tools.SimulationTool" project="DfsPlugin" |
620 | - file="/DfsPlugin/src/org/workcraft/plugins/dfs/tools/SimulationTool.java" binary="false" corner="BOTTOM_RIGHT"> |
621 | - <position height="-1" width="-1" x="752" y="372"/> |
622 | - <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
623 | - visibility="true"> |
624 | - <attributes public="true" package="true" protected="false" private="false" static="true"/> |
625 | - <operations public="true" package="true" protected="false" private="false" static="true"/> |
626 | - </display> |
627 | - </class> |
628 | - <class id="3" language="java" name="org.workcraft.plugins.son.tools.SONSimulationTool" project="SONPlugin" |
629 | - file="/SONPlugin/src/org/workcraft/plugins/son/tools/SONSimulationTool.java" binary="false" corner="BOTTOM_RIGHT"> |
630 | - <position height="-1" width="-1" x="180" y="742"/> |
631 | - <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
632 | - visibility="true"> |
633 | - <attributes public="true" package="true" protected="false" private="false" static="true"/> |
634 | - <operations public="true" package="true" protected="false" private="false" static="true"/> |
635 | - </display> |
636 | - </class> |
637 | - <interface id="4" language="java" name="org.workcraft.gui.graph.tools.Decorator" project="WorkcraftCore" |
638 | - file="/WorkcraftCore/src/org/workcraft/gui/graph/tools/Decorator.java" binary="false" corner="BOTTOM_RIGHT"> |
639 | - <position height="-1" width="-1" x="955" y="592"/> |
640 | - <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
641 | - visibility="true"> |
642 | - <attributes public="true" package="true" protected="false" private="false" static="true"/> |
643 | - <operations public="true" package="true" protected="false" private="false" static="true"/> |
644 | - </display> |
645 | - </interface> |
646 | - <class id="5" language="java" name="org.workcraft.gui.graph.tools.Decorator.Empty" project="WorkcraftCore" |
647 | - file="/WorkcraftCore/src/org/workcraft/gui/graph/tools/Decorator.java" binary="false" corner="BOTTOM_RIGHT"> |
648 | - <position height="-1" width="-1" x="955" y="732"/> |
649 | - <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
650 | - visibility="true"> |
651 | - <attributes public="true" package="true" protected="false" private="false" static="true"/> |
652 | - <operations public="true" package="true" protected="false" private="false" static="true"/> |
653 | - </display> |
654 | - </class> |
655 | - <class id="6" language="java" name="org.workcraft.gui.graph.tools.Decoration.Empty" project="WorkcraftCore" |
656 | - file="/WorkcraftCore/src/org/workcraft/gui/graph/tools/Decoration.java" binary="false" corner="BOTTOM_RIGHT"> |
657 | - <position height="-1" width="-1" x="440" y="757"/> |
658 | - <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
659 | - visibility="true"> |
660 | - <attributes public="true" package="true" protected="false" private="false" static="true"/> |
661 | - <operations public="true" package="true" protected="false" private="false" static="true"/> |
662 | - </display> |
663 | - </class> |
664 | - <interface id="7" language="java" name="org.workcraft.gui.graph.tools.Decoration" project="WorkcraftCore" |
665 | - file="/WorkcraftCore/src/org/workcraft/gui/graph/tools/Decoration.java" binary="false" corner="BOTTOM_RIGHT"> |
666 | - <position height="-1" width="-1" x="440" y="609"/> |
667 | - <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
668 | - visibility="true"> |
669 | - <attributes public="true" package="true" protected="false" private="false" static="true"/> |
670 | - <operations public="true" package="true" protected="false" private="false" static="true"/> |
671 | - </display> |
672 | - </interface> |
673 | - <interface id="8" language="java" name="org.workcraft.plugins.son.tools.PlaceNodeDecoration" project="SONPlugin" |
674 | - file="/SONPlugin/src/org/workcraft/plugins/son/tools/PlaceNodeDecoration.java" binary="false" corner="BOTTOM_RIGHT"> |
675 | - <position height="-1" width="-1" x="709" y="525"/> |
676 | - <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
677 | - visibility="true"> |
678 | - <attributes public="true" package="true" protected="false" private="false" static="true"/> |
679 | - <operations public="true" package="true" protected="false" private="false" static="true"/> |
680 | - </display> |
681 | - </interface> |
682 | - <interface id="9" language="java" name="org.workcraft.plugins.petri.tools.PlaceDecoration" project="PetriNetPlugin" |
683 | - file="/PetriNetPlugin/src/org/workcraft/plugins/petri/tools/PlaceDecoration.java" binary="false" |
684 | - corner="BOTTOM_RIGHT"> |
685 | - <position height="-1" width="-1" x="708" y="656"/> |
686 | - <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
687 | - visibility="true"> |
688 | - <attributes public="true" package="true" protected="false" private="false" static="true"/> |
689 | - <operations public="true" package="true" protected="false" private="false" static="true"/> |
690 | - </display> |
691 | - </interface> |
692 | - <interface id="10" language="java" name="org.workcraft.plugins.dfs.decorations.BinaryRegisterDecoration" |
693 | - project="DfsPlugin" file="/DfsPlugin/src/org/workcraft/plugins/dfs/decorations/BinaryRegisterDecoration.java" |
694 | - binary="false" corner="BOTTOM_RIGHT"> |
695 | - <position height="-1" width="-1" x="691" y="880"/> |
696 | - <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
697 | - visibility="true"> |
698 | - <attributes public="true" package="true" protected="false" private="false" static="true"/> |
699 | - <operations public="true" package="true" protected="false" private="false" static="true"/> |
700 | - </display> |
701 | - </interface> |
702 | - <interface id="11" language="java" name="org.workcraft.plugins.dfs.decorations.CounterflowLogicDecoration" |
703 | - project="DfsPlugin" file="/DfsPlugin/src/org/workcraft/plugins/dfs/decorations/CounterflowLogicDecoration.java" |
704 | - binary="false" corner="BOTTOM_RIGHT"> |
705 | - <position height="-1" width="-1" x="940" y="883"/> |
706 | - <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
707 | - visibility="true"> |
708 | - <attributes public="true" package="true" protected="false" private="false" static="true"/> |
709 | - <operations public="true" package="true" protected="false" private="false" static="true"/> |
710 | - </display> |
711 | - </interface> |
712 | - <interface id="12" language="java" name="org.workcraft.plugins.dfs.decorations.CounterflowRegisterDecoration" |
713 | - project="DfsPlugin" file="/DfsPlugin/src/org/workcraft/plugins/dfs/decorations/CounterflowRegisterDecoration.java" |
714 | - binary="false" corner="BOTTOM_RIGHT"> |
715 | - <position height="-1" width="-1" x="935" y="1065"/> |
716 | - <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
717 | - visibility="true"> |
718 | - <attributes public="true" package="true" protected="false" private="false" static="true"/> |
719 | - <operations public="true" package="true" protected="false" private="false" static="true"/> |
720 | - </display> |
721 | - </interface> |
722 | - <interface id="13" language="java" name="org.workcraft.plugins.dfs.decorations.LogicDecoration" project="DfsPlugin" |
723 | - file="/DfsPlugin/src/org/workcraft/plugins/dfs/decorations/LogicDecoration.java" binary="false" |
724 | - corner="BOTTOM_RIGHT"> |
725 | - <position height="-1" width="-1" x="471" y="993"/> |
726 | - <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
727 | - visibility="true"> |
728 | - <attributes public="true" package="true" protected="false" private="false" static="true"/> |
729 | - <operations public="true" package="true" protected="false" private="false" static="true"/> |
730 | - </display> |
731 | - </interface> |
732 | - <interface id="14" language="java" name="org.workcraft.plugins.dfs.decorations.RegisterDecoration" project="DfsPlugin" |
733 | - file="/DfsPlugin/src/org/workcraft/plugins/dfs/decorations/RegisterDecoration.java" binary="false" |
734 | - corner="BOTTOM_RIGHT"> |
735 | - <position height="-1" width="-1" x="696" y="1037"/> |
736 | - <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
737 | - visibility="true"> |
738 | - <attributes public="true" package="true" protected="false" private="false" static="true"/> |
739 | - <operations public="true" package="true" protected="false" private="false" static="true"/> |
740 | - </display> |
741 | - </interface> |
742 | - <generalization id="15"> |
743 | - <end type="SOURCE" refId="11"/> |
744 | - <end type="TARGET" refId="7"/> |
745 | - </generalization> |
746 | - <association id="16"> |
747 | - <end type="SOURCE" refId="5" navigable="false"> |
748 | - <attribute id="17" name="INSTANCE"/> |
749 | - <multiplicity id="18" minimum="0" maximum="1"/> |
750 | - </end> |
751 | - <end type="TARGET" refId="5" navigable="true"/> |
752 | - <display labels="true" multiplicity="true"/> |
753 | - </association> |
754 | - <association id="19"> |
755 | - <end type="SOURCE" refId="6" navigable="false"> |
756 | - <attribute id="20" name="INSTANCE"/> |
757 | - <multiplicity id="21" minimum="0" maximum="1"/> |
758 | - </end> |
759 | - <end type="TARGET" refId="6" navigable="true"/> |
760 | - <display labels="true" multiplicity="true"/> |
761 | - </association> |
762 | - <nesting id="22"> |
763 | - <end type="SOURCE" refId="7"/> |
764 | - <end type="TARGET" refId="6"/> |
765 | - </nesting> |
766 | - <nesting id="23"> |
767 | - <end type="SOURCE" refId="4"/> |
768 | - <end type="TARGET" refId="5"/> |
769 | - </nesting> |
770 | - <generalization id="24"> |
771 | - <end type="SOURCE" refId="9"/> |
772 | - <end type="TARGET" refId="7"/> |
773 | - </generalization> |
774 | - <realization id="25"> |
775 | - <end type="SOURCE" refId="6"/> |
776 | - <end type="TARGET" refId="7"/> |
777 | - </realization> |
778 | - <generalization id="26"> |
779 | - <end type="SOURCE" refId="12"/> |
780 | - <end type="TARGET" refId="7"/> |
781 | - </generalization> |
782 | - <realization id="27"> |
783 | - <end type="SOURCE" refId="5"/> |
784 | - <end type="TARGET" refId="4"/> |
785 | - </realization> |
786 | - <generalization id="28"> |
787 | - <end type="SOURCE" refId="13"/> |
788 | - <end type="TARGET" refId="7"/> |
789 | - </generalization> |
790 | - <generalization id="29"> |
791 | - <end type="SOURCE" refId="8"/> |
792 | - <end type="TARGET" refId="7"/> |
793 | - </generalization> |
794 | - <generalization id="30"> |
795 | - <end type="SOURCE" refId="14"/> |
796 | - <end type="TARGET" refId="7"/> |
797 | - </generalization> |
798 | - <generalization id="31"> |
799 | - <end type="SOURCE" refId="10"/> |
800 | - <end type="TARGET" refId="7"/> |
801 | - </generalization> |
802 | - <classifier-display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" |
803 | - accessors="true" visibility="true"> |
804 | - <attributes public="true" package="true" protected="false" private="false" static="true"/> |
805 | - <operations public="true" package="true" protected="false" private="false" static="true"/> |
806 | - </classifier-display> |
807 | - <association-display labels="true" multiplicity="true"/> |
808 | +<?xml version="1.0" encoding="UTF-8"?> |
809 | +<class-diagram version="1.1.6" icons="true" always-add-relationships="false" generalizations="true" realizations="true" |
810 | + associations="true" dependencies="false" nesting-relationships="true"> |
811 | + <class id="1" language="java" name="org.workcraft.plugins.circuit.tools.CircuitSimulationTool" project="CircuitPlugin" |
812 | + file="/CircuitPlugin/src/org/workcraft/plugins/circuit/tools/CircuitSimulationTool.java" binary="false" |
813 | + corner="BOTTOM_RIGHT"> |
814 | + <position height="-1" width="-1" x="1030" y="368"/> |
815 | + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
816 | + visibility="true"> |
817 | + <attributes public="true" package="true" protected="false" private="false" static="true"/> |
818 | + <operations public="true" package="true" protected="false" private="false" static="true"/> |
819 | + </display> |
820 | + </class> |
821 | + <class id="2" language="java" name="org.workcraft.plugins.dfs.tools.SimulationTool" project="DfsPlugin" |
822 | + file="/DfsPlugin/src/org/workcraft/plugins/dfs/tools/SimulationTool.java" binary="false" corner="BOTTOM_RIGHT"> |
823 | + <position height="-1" width="-1" x="752" y="372"/> |
824 | + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
825 | + visibility="true"> |
826 | + <attributes public="true" package="true" protected="false" private="false" static="true"/> |
827 | + <operations public="true" package="true" protected="false" private="false" static="true"/> |
828 | + </display> |
829 | + </class> |
830 | + <class id="3" language="java" name="org.workcraft.plugins.son.tools.SONSimulationTool" project="SONPlugin" |
831 | + file="/SONPlugin/src/org/workcraft/plugins/son/tools/SONSimulationTool.java" binary="false" corner="BOTTOM_RIGHT"> |
832 | + <position height="-1" width="-1" x="180" y="742"/> |
833 | + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
834 | + visibility="true"> |
835 | + <attributes public="true" package="true" protected="false" private="false" static="true"/> |
836 | + <operations public="true" package="true" protected="false" private="false" static="true"/> |
837 | + </display> |
838 | + </class> |
839 | + <interface id="4" language="java" name="org.workcraft.gui.graph.tools.Decorator" project="WorkcraftCore" |
840 | + file="/WorkcraftCore/src/org/workcraft/gui/graph/tools/Decorator.java" binary="false" corner="BOTTOM_RIGHT"> |
841 | + <position height="-1" width="-1" x="955" y="592"/> |
842 | + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
843 | + visibility="true"> |
844 | + <attributes public="true" package="true" protected="false" private="false" static="true"/> |
845 | + <operations public="true" package="true" protected="false" private="false" static="true"/> |
846 | + </display> |
847 | + </interface> |
848 | + <class id="5" language="java" name="org.workcraft.gui.graph.tools.Decorator.Empty" project="WorkcraftCore" |
849 | + file="/WorkcraftCore/src/org/workcraft/gui/graph/tools/Decorator.java" binary="false" corner="BOTTOM_RIGHT"> |
850 | + <position height="-1" width="-1" x="955" y="732"/> |
851 | + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
852 | + visibility="true"> |
853 | + <attributes public="true" package="true" protected="false" private="false" static="true"/> |
854 | + <operations public="true" package="true" protected="false" private="false" static="true"/> |
855 | + </display> |
856 | + </class> |
857 | + <class id="6" language="java" name="org.workcraft.gui.graph.tools.Decoration.Empty" project="WorkcraftCore" |
858 | + file="/WorkcraftCore/src/org/workcraft/gui/graph/tools/Decoration.java" binary="false" corner="BOTTOM_RIGHT"> |
859 | + <position height="-1" width="-1" x="440" y="757"/> |
860 | + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
861 | + visibility="true"> |
862 | + <attributes public="true" package="true" protected="false" private="false" static="true"/> |
863 | + <operations public="true" package="true" protected="false" private="false" static="true"/> |
864 | + </display> |
865 | + </class> |
866 | + <interface id="7" language="java" name="org.workcraft.gui.graph.tools.Decoration" project="WorkcraftCore" |
867 | + file="/WorkcraftCore/src/org/workcraft/gui/graph/tools/Decoration.java" binary="false" corner="BOTTOM_RIGHT"> |
868 | + <position height="-1" width="-1" x="440" y="609"/> |
869 | + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
870 | + visibility="true"> |
871 | + <attributes public="true" package="true" protected="false" private="false" static="true"/> |
872 | + <operations public="true" package="true" protected="false" private="false" static="true"/> |
873 | + </display> |
874 | + </interface> |
875 | + <interface id="8" language="java" name="org.workcraft.plugins.son.tools.PlaceNodeDecoration" project="SONPlugin" |
876 | + file="/SONPlugin/src/org/workcraft/plugins/son/tools/PlaceNodeDecoration.java" binary="false" corner="BOTTOM_RIGHT"> |
877 | + <position height="-1" width="-1" x="709" y="525"/> |
878 | + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
879 | + visibility="true"> |
880 | + <attributes public="true" package="true" protected="false" private="false" static="true"/> |
881 | + <operations public="true" package="true" protected="false" private="false" static="true"/> |
882 | + </display> |
883 | + </interface> |
884 | + <interface id="9" language="java" name="org.workcraft.plugins.petri.tools.PlaceDecoration" project="PetriNetPlugin" |
885 | + file="/PetriNetPlugin/src/org/workcraft/plugins/petri/tools/PlaceDecoration.java" binary="false" |
886 | + corner="BOTTOM_RIGHT"> |
887 | + <position height="-1" width="-1" x="708" y="656"/> |
888 | + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
889 | + visibility="true"> |
890 | + <attributes public="true" package="true" protected="false" private="false" static="true"/> |
891 | + <operations public="true" package="true" protected="false" private="false" static="true"/> |
892 | + </display> |
893 | + </interface> |
894 | + <interface id="10" language="java" name="org.workcraft.plugins.dfs.decorations.BinaryRegisterDecoration" |
895 | + project="DfsPlugin" file="/DfsPlugin/src/org/workcraft/plugins/dfs/decorations/BinaryRegisterDecoration.java" |
896 | + binary="false" corner="BOTTOM_RIGHT"> |
897 | + <position height="-1" width="-1" x="691" y="880"/> |
898 | + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
899 | + visibility="true"> |
900 | + <attributes public="true" package="true" protected="false" private="false" static="true"/> |
901 | + <operations public="true" package="true" protected="false" private="false" static="true"/> |
902 | + </display> |
903 | + </interface> |
904 | + <interface id="11" language="java" name="org.workcraft.plugins.dfs.decorations.CounterflowLogicDecoration" |
905 | + project="DfsPlugin" file="/DfsPlugin/src/org/workcraft/plugins/dfs/decorations/CounterflowLogicDecoration.java" |
906 | + binary="false" corner="BOTTOM_RIGHT"> |
907 | + <position height="-1" width="-1" x="940" y="883"/> |
908 | + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
909 | + visibility="true"> |
910 | + <attributes public="true" package="true" protected="false" private="false" static="true"/> |
911 | + <operations public="true" package="true" protected="false" private="false" static="true"/> |
912 | + </display> |
913 | + </interface> |
914 | + <interface id="12" language="java" name="org.workcraft.plugins.dfs.decorations.CounterflowRegisterDecoration" |
915 | + project="DfsPlugin" file="/DfsPlugin/src/org/workcraft/plugins/dfs/decorations/CounterflowRegisterDecoration.java" |
916 | + binary="false" corner="BOTTOM_RIGHT"> |
917 | + <position height="-1" width="-1" x="935" y="1065"/> |
918 | + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
919 | + visibility="true"> |
920 | + <attributes public="true" package="true" protected="false" private="false" static="true"/> |
921 | + <operations public="true" package="true" protected="false" private="false" static="true"/> |
922 | + </display> |
923 | + </interface> |
924 | + <interface id="13" language="java" name="org.workcraft.plugins.dfs.decorations.LogicDecoration" project="DfsPlugin" |
925 | + file="/DfsPlugin/src/org/workcraft/plugins/dfs/decorations/LogicDecoration.java" binary="false" |
926 | + corner="BOTTOM_RIGHT"> |
927 | + <position height="-1" width="-1" x="471" y="993"/> |
928 | + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
929 | + visibility="true"> |
930 | + <attributes public="true" package="true" protected="false" private="false" static="true"/> |
931 | + <operations public="true" package="true" protected="false" private="false" static="true"/> |
932 | + </display> |
933 | + </interface> |
934 | + <interface id="14" language="java" name="org.workcraft.plugins.dfs.decorations.RegisterDecoration" project="DfsPlugin" |
935 | + file="/DfsPlugin/src/org/workcraft/plugins/dfs/decorations/RegisterDecoration.java" binary="false" |
936 | + corner="BOTTOM_RIGHT"> |
937 | + <position height="-1" width="-1" x="696" y="1037"/> |
938 | + <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" accessors="true" |
939 | + visibility="true"> |
940 | + <attributes public="true" package="true" protected="false" private="false" static="true"/> |
941 | + <operations public="true" package="true" protected="false" private="false" static="true"/> |
942 | + </display> |
943 | + </interface> |
944 | + <generalization id="15"> |
945 | + <end type="SOURCE" refId="8"/> |
946 | + <end type="TARGET" refId="7"/> |
947 | + </generalization> |
948 | + <generalization id="16"> |
949 | + <end type="SOURCE" refId="12"/> |
950 | + <end type="TARGET" refId="7"/> |
951 | + </generalization> |
952 | + <generalization id="17"> |
953 | + <end type="SOURCE" refId="10"/> |
954 | + <end type="TARGET" refId="7"/> |
955 | + </generalization> |
956 | + <association id="18"> |
957 | + <end type="SOURCE" refId="6" navigable="false"> |
958 | + <attribute id="19" name="INSTANCE"/> |
959 | + <multiplicity id="20" minimum="0" maximum="1"/> |
960 | + </end> |
961 | + <end type="TARGET" refId="6" navigable="true"/> |
962 | + <display labels="true" multiplicity="true"/> |
963 | + </association> |
964 | + <generalization id="21"> |
965 | + <end type="SOURCE" refId="9"/> |
966 | + <end type="TARGET" refId="7"/> |
967 | + </generalization> |
968 | + <generalization id="22"> |
969 | + <end type="SOURCE" refId="14"/> |
970 | + <end type="TARGET" refId="7"/> |
971 | + </generalization> |
972 | + <nesting id="23"> |
973 | + <end type="SOURCE" refId="4"/> |
974 | + <end type="TARGET" refId="5"/> |
975 | + </nesting> |
976 | + <nesting id="24"> |
977 | + <end type="SOURCE" refId="7"/> |
978 | + <end type="TARGET" refId="6"/> |
979 | + </nesting> |
980 | + <realization id="25"> |
981 | + <end type="SOURCE" refId="5"/> |
982 | + <end type="TARGET" refId="4"/> |
983 | + </realization> |
984 | + <association id="26"> |
985 | + <end type="SOURCE" refId="5" navigable="false"> |
986 | + <attribute id="27" name="INSTANCE"/> |
987 | + <multiplicity id="28" minimum="0" maximum="1"/> |
988 | + </end> |
989 | + <end type="TARGET" refId="5" navigable="true"/> |
990 | + <display labels="true" multiplicity="true"/> |
991 | + </association> |
992 | + <generalization id="29"> |
993 | + <end type="SOURCE" refId="11"/> |
994 | + <end type="TARGET" refId="7"/> |
995 | + </generalization> |
996 | + <realization id="30"> |
997 | + <end type="SOURCE" refId="6"/> |
998 | + <end type="TARGET" refId="7"/> |
999 | + </realization> |
1000 | + <generalization id="31"> |
1001 | + <end type="SOURCE" refId="13"/> |
1002 | + <end type="TARGET" refId="7"/> |
1003 | + </generalization> |
1004 | + <classifier-display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" |
1005 | + accessors="true" visibility="true"> |
1006 | + <attributes public="true" package="true" protected="false" private="false" static="true"/> |
1007 | + <operations public="true" package="true" protected="false" private="false" static="true"/> |
1008 | + </classifier-display> |
1009 | + <association-display labels="true" multiplicity="true"/> |
1010 | </class-diagram> |
1011 | \ No newline at end of file |
1012 | |
1013 | === modified file 'WorkcraftCore/src/org/workcraft/dom/visual/VisualComponent.java' |
1014 | --- WorkcraftCore/src/org/workcraft/dom/visual/VisualComponent.java 2015-02-18 16:25:29 +0000 |
1015 | +++ WorkcraftCore/src/org/workcraft/dom/visual/VisualComponent.java 2015-02-27 18:34:42 +0000 |
1016 | @@ -388,30 +388,30 @@ |
1017 | |
1018 | @Override |
1019 | public void rotateClockwise() { |
1020 | - super.rotateClockwise(); |
1021 | setNamePositioning(getNamePositioning().rotateClockwise()); |
1022 | setLabelPositioning(getLabelPositioning().rotateClockwise()); |
1023 | + super.rotateClockwise(); |
1024 | } |
1025 | |
1026 | @Override |
1027 | public void rotateCounterclockwise() { |
1028 | - super.rotateCounterclockwise(); |
1029 | setNamePositioning(getNamePositioning().rotateCounterclockwise()); |
1030 | setLabelPositioning(getLabelPositioning().rotateCounterclockwise()); |
1031 | + super.rotateCounterclockwise(); |
1032 | } |
1033 | |
1034 | @Override |
1035 | public void flipHorizontal() { |
1036 | - super.flipHorizontal(); |
1037 | setNamePositioning(getNamePositioning().flipHorizontal()); |
1038 | setLabelPositioning(getLabelPositioning().flipHorizontal()); |
1039 | + super.flipHorizontal(); |
1040 | } |
1041 | |
1042 | @Override |
1043 | public void flipVertical() { |
1044 | - super.flipVertical(); |
1045 | setNamePositioning(getNamePositioning().flipVertical()); |
1046 | setLabelPositioning(getLabelPositioning().flipVertical()); |
1047 | + super.flipVertical(); |
1048 | } |
1049 | |
1050 | } |