Merge lp:~yrke/tapaal/tapaal-removeObservableDataLayer into lp:tapaal

Proposed by Kenneth Yrke Jørgensen
Status: Merged
Approved by: Jiri Srba
Approved revision: 970
Merged at revision: 974
Proposed branch: lp:~yrke/tapaal/tapaal-removeObservableDataLayer
Merge into: lp:tapaal
Diff against target: 110 lines (+1/-26)
2 files modified
src/pipe/dataLayer/DataLayer.java (+1/-23)
src/pipe/gui/Animator.java (+0/-3)
To merge this branch: bzr merge lp:~yrke/tapaal/tapaal-removeObservableDataLayer
Reviewer Review Type Date Requested Status
Jiri Srba Approve
TAPAAL Reviewers Pending
Review via email: mp+352325@code.launchpad.net

Commit message

Datalyer no longer implements observable

To post a comment you must log in.
Revision history for this message
Jiri Srba (srba) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/pipe/dataLayer/DataLayer.java'
--- src/pipe/dataLayer/DataLayer.java 2018-05-04 08:01:39 +0000
+++ src/pipe/dataLayer/DataLayer.java 2018-08-03 18:05:12 +0000
@@ -23,7 +23,7 @@
23import dk.aau.cs.util.Require;23import dk.aau.cs.util.Require;
2424
2525
26public class DataLayer extends Observable implements Cloneable {26public class DataLayer implements Cloneable {
2727
28 /** PNML File Name */28 /** PNML File Name */
29 public String pnmlName = null;29 public String pnmlName = null;
@@ -96,8 +96,6 @@
96 Require.that(placeInput != null, "input place was null");96 Require.that(placeInput != null, "input place was null");
9797
98 placesArray.add(placeInput);98 placesArray.add(placeInput);
99 setChanged();
100 notifyObservers(placeInput);
101 }99 }
102100
103 /**101 /**
@@ -109,8 +107,6 @@
109 */107 */
110 public void addAnnotation(AnnotationNote labelInput) {108 public void addAnnotation(AnnotationNote labelInput) {
111 labelsArray.add(labelInput);109 labelsArray.add(labelInput);
112 setChanged();
113 notifyObservers(labelInput);
114 }110 }
115111
116 /**112 /**
@@ -124,8 +120,6 @@
124 Require.that(transitionInput != null, "input transition was null");120 Require.that(transitionInput != null, "input transition was null");
125 121
126 transitionsArray.add(transitionInput);122 transitionsArray.add(transitionInput);
127 setChanged();
128 notifyObservers(transitionInput);
129 }123 }
130124
131 /**125 /**
@@ -236,18 +230,12 @@
236 arcsArray.add(arcInput);230 arcsArray.add(arcInput);
237 addArcToArcsMap(arcInput);231 addArcToArcsMap(arcInput);
238232
239 setChanged();
240
241 // notifyObservers(arcInput.getBounds());
242 notifyObservers(arcInput);
243 }233 }
244 }234 }
245235
246 public void addTransportArc(TimedTransportArcComponent transportArc) {236 public void addTransportArc(TimedTransportArcComponent transportArc) {
247 arcsArray.add(transportArc);237 arcsArray.add(transportArc);
248 addArcToArcsMap(transportArc);238 addArcToArcsMap(transportArc);
249 setChanged();
250 notifyObservers();
251 }239 }
252240
253 public void addArc(TimedInhibitorArcComponent inhibitorArcInput) {241 public void addArc(TimedInhibitorArcComponent inhibitorArcInput) {
@@ -292,10 +280,6 @@
292 arcsArray.add(inhibitorArcInput);280 arcsArray.add(inhibitorArcInput);
293 addInhibitorArcToInhibitorsMap(inhibitorArcInput);281 addInhibitorArcToInhibitorsMap(inhibitorArcInput);
294282
295 setChanged();
296
297 // notifyObservers(arcInput.getBounds());
298 notifyObservers(inhibitorArcInput);
299 }283 }
300 }284 }
301285
@@ -535,12 +519,6 @@
535 }519 }
536 } 520 }
537521
538 if (didSomething) {
539 setChanged();
540
541 // notifyObservers(pnObject.getBounds());
542 notifyObservers(pnObject);
543 }
544 }522 }
545 } catch (NullPointerException npe) {523 } catch (NullPointerException npe) {
546 System.out.println("NullPointerException [debug]\n"524 System.out.println("NullPointerException [debug]\n"
547525
=== modified file 'src/pipe/gui/Animator.java'
--- src/pipe/gui/Animator.java 2018-04-29 08:38:52 +0000
+++ src/pipe/gui/Animator.java 2018-08-03 18:05:12 +0000
@@ -146,7 +146,6 @@
146 while (transitionIterator.hasNext()) {146 while (transitionIterator.hasNext()) {
147 Transition tempTransition = transitionIterator.next();147 Transition tempTransition = transitionIterator.next();
148 if (tempTransition.isEnabled(true) || (tempTransition.isDelayEnabledTransition(true) && !isUrgentTransitionEnabled)) {148 if (tempTransition.isEnabled(true) || (tempTransition.isDelayEnabledTransition(true) && !isUrgentTransitionEnabled)) {
149 current.notifyObservers();
150 tempTransition.repaint();149 tempTransition.repaint();
151 }150 }
152 }151 }
@@ -162,7 +161,6 @@
162 while (transitionIterator.hasNext()) {161 while (transitionIterator.hasNext()) {
163 Transition tempTransition = transitionIterator.next();162 Transition tempTransition = transitionIterator.next();
164 if (!(tempTransition.isEnabled(true)) || !tempTransition.isDelayEnabledTransition(true) || (tempTransition.isDelayEnabledTransition(true) && isUrgentTransitionEnabled)) {163 if (!(tempTransition.isEnabled(true)) || !tempTransition.isDelayEnabledTransition(true) || (tempTransition.isDelayEnabledTransition(true) && isUrgentTransitionEnabled)) {
165 current.notifyObservers();
166 tempTransition.repaint();164 tempTransition.repaint();
167 }165 }
168 }166 }
@@ -209,7 +207,6 @@
209 Transition tempTransition = transitionIterator.next();207 Transition tempTransition = transitionIterator.next();
210 tempTransition.setEnabledFalse();208 tempTransition.setEnabledFalse();
211 tempTransition.setDelayEnabledTransitionFalse();209 tempTransition.setDelayEnabledTransitionFalse();
212 activeGuiModel().notifyObservers();
213 tempTransition.repaint();210 tempTransition.repaint();
214 }211 }
215 }212 }

Subscribers

People subscribed via source and target branches