Changeset 89 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/structures
- Timestamp:
- 08/28/2017 01:38:15 PM (9 years ago)
- Location:
- trunk/src/scriptbuilder/structures
- Files:
-
- 3 edited
-
ScriptEvent.java (modified) (2 diffs)
-
TimeSlice.java (modified) (1 diff)
-
events/I_ScriptEvent.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/scriptbuilder/structures/ScriptEvent.java
r76 r89 82 82 */ 83 83 public int length; 84 85 private TimeSlice slice; 84 86 85 87 /** … … 189 191 return event instanceof I_EvaluationEvent; 190 192 } 193 194 @Override 195 public void removeThis() 196 { 197 this.slice.events.remove(this); 198 } 199 200 @Override 201 public void assignTimeSlice(TimeSlice ts) 202 { 203 this.slice = ts; 204 } 191 205 } -
trunk/src/scriptbuilder/structures/TimeSlice.java
r76 r89 58 58 public void addEvent(I_ScriptEvent event) 59 59 { 60 event.assignTimeSlice(this); 60 61 events.add(event); 61 62 Collections.sort(events); -
trunk/src/scriptbuilder/structures/events/I_ScriptEvent.java
r7 r89 3 3 import scriptbuilder.structures.ScriptEvent; 4 4 import scriptbuilder.structures.ScriptEvent.ScriptEventType; 5 import scriptbuilder.structures.TimeSlice; 5 6 6 7 /** … … 19 20 */ 20 21 int getLength(); 22 23 /** 24 * Remove this event from the timeslice it's in. 25 */ 26 void removeThis(); 27 28 /** 29 * Give this event access to the timeslice it's in. 30 * 31 * @param ts the timeslice which contains this event 32 */ 33 void assignTimeSlice(TimeSlice ts); 21 34 22 35 /**
Note: See TracChangeset
for help on using the changeset viewer.
