Changeset 7 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder
- Timestamp:
- 07/25/2017 11:16:45 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
- 2 moved
-
. (modified) (1 prop)
-
src/scriptbuilder/gui/ScriptBuilderFrame.java (modified) (2 diffs)
-
src/scriptbuilder/gui/drawers/EventIconDrawer.java (modified) (2 diffs)
-
src/scriptbuilder/gui/drawers/TimeSliceDrawer.java (modified) (2 diffs)
-
src/scriptbuilder/gui/panels/IncidentTimelinePanel.java (modified) (3 diffs)
-
src/scriptbuilder/structures/MyScriptHandler.java (modified) (5 diffs)
-
src/scriptbuilder/structures/ScriptEvent.java (modified) (2 diffs)
-
src/scriptbuilder/structures/ScriptIncident.java (modified) (2 diffs)
-
src/scriptbuilder/structures/TimeSlice.java (modified) (6 diffs)
-
src/scriptbuilder/structures/events/ATMSEvaluationEvent.java (modified) (1 diff)
-
src/scriptbuilder/structures/events/ActivityLogEvaluationEvent.java (modified) (1 diff)
-
src/scriptbuilder/structures/events/CADEvaluationEvent.java (modified) (1 diff)
-
src/scriptbuilder/structures/events/CMSEvaluationEvent.java (modified) (1 diff)
-
src/scriptbuilder/structures/events/FacilitatorEvaluationEvent.java (modified) (1 diff)
-
src/scriptbuilder/structures/events/I_EvaluationEvent.java (moved) (moved from trunk/src/scriptbuilder/structures/events/EvaluationEventInterface.java) (2 diffs)
-
src/scriptbuilder/structures/events/I_ScriptEvent.java (moved) (moved from trunk/src/scriptbuilder/structures/events/ScriptEventInterface.java) (1 diff)
-
src/scriptbuilder/structures/events/RadioEvaluationEvent.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property
svn:ignore
set to
build
-
Property
svn:ignore
set to
-
trunk/src/scriptbuilder/gui/ScriptBuilderFrame.java
r1 r7 31 31 import scriptbuilder.structures.SimulationScript; 32 32 import scriptbuilder.structures.TimeSlice; 33 import scriptbuilder.structures.events. ScriptEventInterface;33 import scriptbuilder.structures.events.I_ScriptEvent; 34 34 35 35 /** … … 360 360 361 361 DefaultListModel model = new DefaultListModel(); 362 for ( ScriptEventInterfacee : slice.events)362 for (I_ScriptEvent e : slice.events) 363 363 { 364 364 model.addElement(e); -
trunk/src/scriptbuilder/gui/drawers/EventIconDrawer.java
r1 r7 13 13 import scriptbuilder.structures.ScriptEvent.ScriptEventType; 14 14 import images.*; 15 import scriptbuilder.structures.events. ScriptEventInterface;15 import scriptbuilder.structures.events.I_ScriptEvent; 16 16 17 17 /** … … 138 138 * y) 139 139 */ 140 public static void DrawEventIcon(Graphics2D g2d, ScriptEventInterfaceevent,140 public static void DrawEventIcon(Graphics2D g2d, I_ScriptEvent event, 141 141 int x, int y) 142 142 { -
trunk/src/scriptbuilder/gui/drawers/TimeSliceDrawer.java
r1 r7 12 12 import scriptbuilder.structures.ScriptEvent; 13 13 import scriptbuilder.structures.TimeSlice; 14 import scriptbuilder.structures.events. ScriptEventInterface;14 import scriptbuilder.structures.events.I_ScriptEvent; 15 15 16 16 /** … … 88 88 } 89 89 90 ScriptEventInterfaceevent = slice.events.get(i);90 I_ScriptEvent event = slice.events.get(i); 91 91 EventIconDrawer.DrawEventIcon(g2d, event, slice.getX() 92 92 - ScriptBuilderGuiConstants.EVENT_ICON_WIDTH, -
trunk/src/scriptbuilder/gui/panels/IncidentTimelinePanel.java
r1 r7 20 20 import scriptbuilder.structures.ScriptIncident; 21 21 import scriptbuilder.structures.TimeSlice; 22 import scriptbuilder.structures.events. ScriptEventInterface;22 import scriptbuilder.structures.events.I_ScriptEvent; 23 23 24 24 /** … … 129 129 } 130 130 131 for ( ScriptEventInterfacese : incident.slices.get(newSlice).events)131 for (I_ScriptEvent se : incident.slices.get(newSlice).events) 132 132 { 133 133 ed.addProperty(eventTypeToPropertyMap.get(se.getScriptEventType()), se); … … 141 141 if (f.currentEventType != null) 142 142 { 143 ScriptEventInterfaces = ScriptEvent.factoryByType(f.currentEventType);143 I_ScriptEvent s = ScriptEvent.factoryByType(f.currentEventType); 144 144 ed.addProperty(eventTypeToPropertyMap.get(f.currentEventType), s); 145 145 incident.slices.get(newSlice).addEvent(s); -
trunk/src/scriptbuilder/structures/MyScriptHandler.java
r1 r7 195 195 * Event object. 196 196 */ 197 private TreeMap<ELEMENT, ScriptEventInterface> eventMap;197 private TreeMap<ELEMENT, I_ScriptEvent> eventMap; 198 198 199 199 /** … … 335 335 * The most recent element which contains dialog or other sub-elements. 336 336 */ 337 private ScriptEventInterfacetrackedEvent = null;337 private I_ScriptEvent trackedEvent = null; 338 338 339 339 /** … … 369 369 script = s; 370 370 incidentMap = new TreeMap<Integer, ScriptIncident>(); 371 eventMap = new TreeMap<ELEMENT, ScriptEventInterface>();371 eventMap = new TreeMap<ELEMENT, I_ScriptEvent>(); 372 372 pcData = new TreeMap<ELEMENT, String>(); 373 373 docPosition = new Stack<ELEMENT>(); … … 727 727 728 728 currentElement = docPosition.pop(); 729 ScriptEventInterfacenewEvent = null;729 I_ScriptEvent newEvent = null; 730 730 try 731 731 { … … 804 804 else if (currentElement == ELEMENT.EXPECTED_ACTION) 805 805 { 806 if (trackedEvent instanceof EvaluationEventInterface)807 { 808 (( EvaluationEventInterface) trackedEvent).addAction(pcData.remove(ELEMENT.EXPECTED_ACTION));806 if (trackedEvent instanceof I_EvaluationEvent) 807 { 808 ((I_EvaluationEvent) trackedEvent).addAction(pcData.remove(ELEMENT.EXPECTED_ACTION)); 809 809 } 810 810 } -
trunk/src/scriptbuilder/structures/ScriptEvent.java
r1 r7 12 12 * @version 2017/06/30 13 13 */ 14 public abstract class ScriptEvent extends Observable implements ScriptEventInterface14 public abstract class ScriptEvent extends Observable implements I_ScriptEvent 15 15 { 16 16 … … 129 129 } 130 130 131 public static ScriptEventInterfacefactoryByType(ScriptEventType t)131 public static I_ScriptEvent factoryByType(ScriptEventType t) 132 132 { 133 133 switch(t) -
trunk/src/scriptbuilder/structures/ScriptIncident.java
r1 r7 7 7 import java.util.Observable; 8 8 import java.util.TreeMap; 9 import scriptbuilder.structures.events. ScriptEventInterface;9 import scriptbuilder.structures.events.I_ScriptEvent; 10 10 11 11 /** … … 161 161 * the simulation 162 162 */ 163 public void addNewEvent( ScriptEventInterfaceev, int start)163 public void addNewEvent(I_ScriptEvent ev, int start) 164 164 { 165 165 TimeSlice t = slices.get(start); -
trunk/src/scriptbuilder/structures/TimeSlice.java
r1 r7 5 5 import java.util.List; 6 6 import scriptbuilder.gui.ScriptBuilderGuiConstants; 7 import scriptbuilder.structures.events. ScriptEventInterface;7 import scriptbuilder.structures.events.I_ScriptEvent; 8 8 9 9 /** … … 23 23 * List of Script Events which begin at this instance. 24 24 */ 25 public List< ScriptEventInterface> events;25 public List<I_ScriptEvent> events; 26 26 //Absolute start time of this time slice 27 27 private int seconds; … … 36 36 { 37 37 this.seconds = seconds; 38 events = new ArrayList< ScriptEventInterface>();38 events = new ArrayList<I_ScriptEvent>(); 39 39 } 40 40 … … 44 44 * @param event the ScriptEvent to be added 45 45 */ 46 public void addEvent( ScriptEventInterfaceevent)46 public void addEvent(I_ScriptEvent event) 47 47 { 48 48 events.add(event); … … 93 93 { 94 94 int dur = 0; 95 for ( ScriptEventInterfacee : events)95 for (I_ScriptEvent e : events) 96 96 { 97 97 if (e.getLength() > dur) … … 151 151 StringBuilder sb = new StringBuilder(); 152 152 153 for ( ScriptEventInterfaceevent : events)153 for (I_ScriptEvent event : events) 154 154 { 155 155 sb.append(event.toString()); -
trunk/src/scriptbuilder/structures/events/ATMSEvaluationEvent.java
r1 r7 14 14 * @author Bryan McGuffin 15 15 */ 16 public class ATMSEvaluationEvent extends ScriptEvent implements EvaluationEventInterface16 public class ATMSEvaluationEvent extends ScriptEvent implements I_EvaluationEvent 17 17 { 18 18 -
trunk/src/scriptbuilder/structures/events/ActivityLogEvaluationEvent.java
r1 r7 14 14 * @author Bryan McGuffin 15 15 */ 16 public class ActivityLogEvaluationEvent extends ScriptEvent implements EvaluationEventInterface16 public class ActivityLogEvaluationEvent extends ScriptEvent implements I_EvaluationEvent 17 17 { 18 18 -
trunk/src/scriptbuilder/structures/events/CADEvaluationEvent.java
r1 r7 14 14 * @author Bryan McGuffin 15 15 */ 16 public class CADEvaluationEvent extends ScriptEvent implements EvaluationEventInterface16 public class CADEvaluationEvent extends ScriptEvent implements I_EvaluationEvent 17 17 { 18 18 -
trunk/src/scriptbuilder/structures/events/CMSEvaluationEvent.java
r1 r7 15 15 * @author Bryan McGuffin 16 16 */ 17 public class CMSEvaluationEvent extends ScriptEvent implements EvaluationEventInterface17 public class CMSEvaluationEvent extends ScriptEvent implements I_EvaluationEvent 18 18 { 19 19 -
trunk/src/scriptbuilder/structures/events/FacilitatorEvaluationEvent.java
r1 r7 14 14 * @author Bryan McGuffin 15 15 */ 16 public class FacilitatorEvaluationEvent extends ScriptEvent implements EvaluationEventInterface16 public class FacilitatorEvaluationEvent extends ScriptEvent implements I_EvaluationEvent 17 17 { 18 18 -
trunk/src/scriptbuilder/structures/events/I_EvaluationEvent.java
r1 r7 1 /*2 * To change this license header, choose License Headers in Project Properties.3 * To change this template file, choose Tools | Templates4 * and open the template in the editor.5 */6 1 package scriptbuilder.structures.events; 7 2 … … 14 9 * @author Bryan McGuffin 15 10 */ 16 public interface EvaluationEventInterface11 public interface I_EvaluationEvent 17 12 { 18 13 -
trunk/src/scriptbuilder/structures/events/I_ScriptEvent.java
r1 r7 10 10 * @author Bryan McGuffin 11 11 */ 12 public interface ScriptEventInterfaceextends Comparable12 public interface I_ScriptEvent extends Comparable 13 13 { 14 14 -
trunk/src/scriptbuilder/structures/events/RadioEvaluationEvent.java
r1 r7 15 15 * @author Bryan McGuffin 16 16 */ 17 public class RadioEvaluationEvent extends ScriptEvent implements EvaluationEventInterface17 public class RadioEvaluationEvent extends ScriptEvent implements I_EvaluationEvent 18 18 { 19 19
Note: See TracChangeset
for help on using the changeset viewer.
