Changeset 9 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/structures/ScriptIncident.java
- Timestamp:
- 07/25/2017 02:59:09 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/scriptbuilder/structures/ScriptIncident.java
r7 r9 19 19 * @version 2017/06/29 20 20 */ 21 public class ScriptIncident extends Observable21 public class ScriptIncident 22 22 { 23 23 … … 66 66 */ 67 67 private int latestStart = 0; 68 69 SimulationScript script; 68 70 69 71 /** … … 82 84 this.name = name; 83 85 this.description = description; 84 this. addObserver(script);86 this.script = script; 85 87 slices = new TreeMap<Integer, TimeSlice>(); 86 88 } … … 102 104 this.name = name; 103 105 this.description = description; 104 this. addObserver(script);106 this.script = script; 105 107 slices = new TreeMap<Integer, TimeSlice>(); 106 108 } … … 124 126 this.name = name; 125 127 this.description = description; 126 this. addObserver(script);128 this.script = script; 127 129 slices = new TreeMap<Integer, TimeSlice>(); 128 130 this.setOffset(offset); … … 137 139 { 138 140 this.collapsed = collapsed; 139 setChanged(); 140 notifyObservers(); 141 script.update(); 141 142 } 142 143 … … 150 151 { 151 152 this.offset = offset; 152 setChanged(); 153 notifyObservers(); 153 script.update(); 154 154 } 155 155 … … 253 253 if (this.slices.get(i) != null) 254 254 { 255 setChanged(); 256 notifyObservers(new SliceChangedEvent(this.slices.get(i))); 255 script.broadcastEvent(new SliceChangedEvent(this.slices.get(i))); 257 256 } 258 257 } … … 277 276 public void setIncidentActive() 278 277 { 279 setChanged(); 280 notifyObservers(new IncidentFocusedEvent(this)); 278 script.broadcastEvent(new IncidentFocusedEvent(this)); 281 279 } 282 280
Note: See TracChangeset
for help on using the changeset viewer.
