- Timestamp:
- 08/25/2017 12:22:28 PM (9 years ago)
- Location:
- trunk/src
- Files:
-
- 2 deleted
- 37 edited
-
event/editor/AudioPanel.java (modified) (1 diff)
-
event/editor/CADLogPanel.java (modified) (2 diffs)
-
event/editor/CCTVPanel.java (modified) (3 diffs)
-
event/editor/CHPRadioPanel.java (modified) (1 diff)
-
event/editor/CMSEvaluationPanel.java (modified) (1 diff)
-
event/editor/Editor.java (modified) (2 diffs)
-
event/editor/RemoveablePanel.java (modified) (1 diff)
-
event/editor/ScriptEventEditorPanel.java (modified) (1 diff)
-
old/MouseWatcherPainter.java (deleted)
-
old/TimelinePanel.java (deleted)
-
scriptbuilder/gui/IncidentEditorFrame.java (modified) (1 diff)
-
scriptbuilder/gui/IncidentPaletteFrame.java (modified) (5 diffs)
-
scriptbuilder/gui/drawers/TimeSliceDrawer.java (modified) (1 diff)
-
scriptbuilder/gui/panels/IncidentPaletteAddPanel.java (modified) (2 diffs)
-
scriptbuilder/gui/panels/TimeStampPanel.java (modified) (2 diffs)
-
scriptbuilder/gui/panels/TimelineTickPanel.java (modified) (3 diffs)
-
scriptbuilder/structures/I_XML_Writable.java (modified) (2 diffs)
-
scriptbuilder/structures/MyScriptHandler.java (modified) (3 diffs)
-
scriptbuilder/structures/ScriptEvent.java (modified) (3 diffs)
-
scriptbuilder/structures/ScriptIncident.java (modified) (3 diffs)
-
scriptbuilder/structures/SimulationScript.java (modified) (4 diffs)
-
scriptbuilder/structures/TimeSlice.java (modified) (1 diff)
-
scriptbuilder/structures/XMLWriter.java (modified) (4 diffs)
-
scriptbuilder/structures/events/ATMSEvaluationEvent.java (modified) (2 diffs)
-
scriptbuilder/structures/events/ActivityLogEvaluationEvent.java (modified) (2 diffs)
-
scriptbuilder/structures/events/AudioEvent.java (modified) (2 diffs)
-
scriptbuilder/structures/events/CADEvaluationEvent.java (modified) (2 diffs)
-
scriptbuilder/structures/events/CADEvent.java (modified) (2 diffs)
-
scriptbuilder/structures/events/CCTVEvent.java (modified) (3 diffs)
-
scriptbuilder/structures/events/CHPRadioEvent.java (modified) (2 diffs)
-
scriptbuilder/structures/events/CMSEvaluationEvent.java (modified) (1 diff)
-
scriptbuilder/structures/events/FacilitatorEvaluationEvent.java (modified) (2 diffs)
-
scriptbuilder/structures/events/MaintenanceRadioEvent.java (modified) (1 diff)
-
scriptbuilder/structures/events/ParamicsEvent.java (modified) (1 diff)
-
scriptbuilder/structures/events/RadioEvaluationEvent.java (modified) (2 diffs)
-
scriptbuilder/structures/events/TMTRadioEvent.java (modified) (1 diff)
-
scriptbuilder/structures/events/TelephoneEvent.java (modified) (1 diff)
-
scriptbuilder/structures/events/TowEvent.java (modified) (1 diff)
-
scriptbuilder/structures/events/UnitEvent.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/event/editor/AudioPanel.java
r7 r76 26 26 } 27 27 28 /** 29 * Load the script event associated with this editor panel. 30 * 31 * @param sei The script event in question 32 */ 33 @Override 28 34 public void getEventObject(I_ScriptEvent sei) 29 35 { -
trunk/src/event/editor/CADLogPanel.java
r7 r76 29 29 } 30 30 31 /** 32 * Load the script event associated with this editor panel. 33 * 34 * @param sei The script event in question 35 */ 36 @Override 31 37 public void getEventObject(I_ScriptEvent sei) 32 38 { … … 42 48 public void keyPressed(KeyEvent e) 43 49 { 44 if (e.getKeyCode() == KeyEvent.VK_ENTER)50 if (e.getKeyCode() == KeyEvent.VK_ENTER) 45 51 { 46 52 event.detail = CadTextField.getText(); -
trunk/src/event/editor/CCTVPanel.java
r50 r76 54 54 } 55 55 56 @Override 56 57 public void setRemoveListener(ActionListener listener) 57 58 { … … 59 60 } 60 61 61 public boolean isOptional() 62 { 63 return false; 64 } 65 62 @Override 66 63 public void getEventObject(I_ScriptEvent sei) 67 64 { … … 73 70 } 74 71 72 @Override 75 73 public void update(Observable o, Object arg) 76 74 { -
trunk/src/event/editor/CHPRadioPanel.java
r7 r76 31 31 } 32 32 33 @Override 33 34 public void getEventObject(I_ScriptEvent sei) 34 35 { -
trunk/src/event/editor/CMSEvaluationPanel.java
r50 r76 36 36 } 37 37 38 @Override 38 39 public void getEventObject(I_ScriptEvent sei) 39 40 { -
trunk/src/event/editor/Editor.java
r7 r76 452 452 private PropertyModel model = new PropertyModel(); 453 453 454 public PropertyModel getPropertyModel()455 {456 return model;457 }454 // public PropertyModel getPropertyModel() 455 // { 456 // return model; 457 // } 458 458 459 459 public void addProperty(Properties property, I_ScriptEvent se) … … 489 489 }; 490 490 491 /** 492 * Blank constructor for a new editor. 493 */ 491 494 public Editor() 492 495 { -
trunk/src/event/editor/RemoveablePanel.java
r7 r76 7 7 { 8 8 9 10 9 /** 10 * Set up the listener for removing this panel. 11 * 12 * @param listener the remove listener to be added 13 */ 11 14 void setRemoveListener(ActionListener listener); 12 15 } -
trunk/src/event/editor/ScriptEventEditorPanel.java
r7 r76 16 16 { 17 17 18 /** 19 * Load the script event associated with this editor panel. 20 * 21 * @param sei The script event in question 22 */ 18 23 void getEventObject(I_ScriptEvent sei); 19 24 } -
trunk/src/scriptbuilder/gui/IncidentEditorFrame.java
r73 r76 240 240 * Constructor. Prep new script model, initialize the GUI, and add listeners 241 241 * for all buttons. 242 * 243 * @param theIncident the Script Incident which this window will edit. 242 244 */ 243 245 public IncidentEditorFrame(ScriptIncident theIncident) -
trunk/src/scriptbuilder/gui/IncidentPaletteFrame.java
r73 r76 31 31 private SimulationScript dummyScript; 32 32 33 /** 34 * The list of incidents to be displayed in the palette. 35 */ 33 36 public ArrayList<ScriptIncident> incidentList; 34 37 … … 36 39 37 40 /** 38 * Creates new form IncidentPaletteFrame 41 * Create new IncidentPaletteFrame from the form. 42 * 43 * @param scr The currently running script, to which new incidents will be 44 * added. 39 45 */ 40 public IncidentPaletteFrame(SimulationScript s )41 { 42 script = s ;46 public IncidentPaletteFrame(SimulationScript scr) 47 { 48 script = scr; 43 49 44 50 panelAdd = new JPanel(); … … 54 60 incidentList = loadIncidentsFromFiles("Incidents"); 55 61 56 re calculateList();62 refresh(); 57 63 58 64 } … … 128 134 } 129 135 130 private void re calculateList()136 private void refresh() 131 137 { 132 138 … … 136 142 } 137 143 144 /** 145 * Attempt to add an incident to the script. If successful, refresh the 146 * palette. 147 * 148 * @param incPanel the Add Panel which holds the incident to be added. 149 */ 138 150 public void addIncidentToScript(IncidentPaletteAddPanel incPanel) 139 151 { 140 152 if (script.addIncident(incPanel.incident)) 141 153 { 142 re calculateList();154 refresh(); 143 155 } 144 156 } -
trunk/src/scriptbuilder/gui/drawers/TimeSliceDrawer.java
r53 r76 103 103 * @param g2d the graphics component 104 104 * @param slice the timeSlice to draw 105 * @param collapsed if true, don't draw the event icons106 105 */ 107 106 public static void DrawScriptBuilderTimeSlice(Graphics2D g2d, TimeSlice slice) -
trunk/src/scriptbuilder/gui/panels/IncidentPaletteAddPanel.java
r64 r76 22 22 { 23 23 24 /** 25 * The script incident represented by this panel. 26 */ 24 27 public ScriptIncident incident; 25 28 … … 27 30 28 31 /** 29 * Creates new form IncidentPaletteAddPanel 32 * Create new IncidentPaletteAddPanel from the form. 33 * 34 * @param inc the incident to be represented in this panel. 35 * @param frame the parent palette which holds this panel. 30 36 */ 31 37 public IncidentPaletteAddPanel(ScriptIncident inc, IncidentPaletteFrame frame) -
trunk/src/scriptbuilder/gui/panels/TimeStampPanel.java
r54 r76 41 41 42 42 /** 43 * Update the length interval and the dimensions of the panel. NOTE: This 44 * method implementation is an exact duplication of the update method in 45 * panels.TimelineTickPanel. I'm not sure if it actually accomplishes 46 * anything here. 43 * Update the length interval and the dimensions of the panel. This version 44 * of the method is used in the main script builder window. 47 45 * 48 46 * @param script The simulation script model … … 89 87 90 88 /** 91 * Update the length interval and the dimensions of the panel. NOTE: This 92 * method implementation is an exact duplication of the update method in 93 * panels.TimelineTickPanel. I'm not sure if it actually accomplishes 94 * anything here. 89 * Update the length interval and the dimensions of the panel. This version 90 * of the method is used in the individual incident editor window. 95 91 * 96 * @param script The simulation script model92 * @param incident the incident which this window is editing. 97 93 */ 98 94 public void update(ScriptIncident incident) -
trunk/src/scriptbuilder/gui/panels/TimelineTickPanel.java
r74 r76 33 33 private boolean focused = false; 34 34 35 public void setZoom(float zoom) 36 { 37 repaint(); 38 } 39 35 // public void setZoom(float zoom) 36 // { 37 // repaint(); 38 // } 40 39 /** 41 40 * Listener for the mouse. Is notified when the mouse enters, exits, or … … 99 98 /** 100 99 * Update the panel's dimensions based on number of events, zoom level, and 101 * which events are collapsed. 100 * which events are collapsed. The version of the method is used in the main 101 * script builder. 102 102 * 103 103 * @param script The main script model … … 136 136 /** 137 137 * Update the panel's dimensions based on number of events, zoom level, and 138 * which events are collapsed. 139 * 140 * @param script The main script model 138 * which events are collapsed. This version of the method is used in the 139 * individual incident editor. 140 * 141 * @param incident the incident being edited 141 142 */ 142 143 public void update(ScriptIncident incident) -
trunk/src/scriptbuilder/structures/I_XML_Writable.java
r46 r76 1 2 1 package scriptbuilder.structures; 3 2 … … 8 7 public interface I_XML_Writable 9 8 { 9 10 /** 11 * Translate this object's data into an appropriate XML string. 12 * 13 * @return an XML-compliant string representing this object's data 14 */ 10 15 String toXML(); 11 16 } -
trunk/src/scriptbuilder/structures/MyScriptHandler.java
r45 r76 241 241 /** 242 242 * Constructor. Initializes incident map. 243 */ 244 public MyScriptHandler(SimulationScript s) 245 { 246 script = s; 243 * 244 * @param scr the script into which the XML file is being read 245 */ 246 public MyScriptHandler(SimulationScript scr) 247 { 248 script = scr; 247 249 incidentMap = new TreeMap<Integer, ScriptIncident>(); 248 250 eventMap = new TreeMap<ELEMENT, I_ScriptEvent>(); … … 255 257 * Get the list of incidents that have been parsed from the script file. 256 258 * 257 * @return sVector of Incident objects.259 * @return Vector of Incident objects. 258 260 */ 259 261 public Vector<ScriptIncident> getIncidents() … … 265 267 * Get the list of units that have been parsed from the script file. 266 268 * 267 * @return sVector of Unit objects.269 * @return Vector of Unit objects. 268 270 */ 269 271 public ArrayList<Unit> getUnits() -
trunk/src/scriptbuilder/structures/ScriptEvent.java
r72 r76 18 18 * Compare the Script Events based on their type enum. 19 19 * 20 * @param othe other script event to be compared20 * @param a the other script event to be compared 21 21 * @return -1, 0, or 1 depending on if this event's type comes before, 22 22 * simultaneously, or after the other event's type in the enum list … … 130 130 } 131 131 132 /** 133 * Generate a new script event object of the specified type. 134 * 135 * @param t the type of the script event 136 * @return a new I_ScriptEvent object matching the given type 137 */ 132 138 public static I_ScriptEvent factoryByType(ScriptEventType t) 133 139 { … … 172 178 } 173 179 } 174 180 181 /** 182 * Determines if the event in question is an evaluation event. 183 * 184 * @param event the event to be checked 185 * @return true if the event implements I_EvaluationEvent 186 */ 175 187 public static boolean isEvaluationEvent(I_ScriptEvent event) 176 188 { -
trunk/src/scriptbuilder/structures/ScriptIncident.java
r58 r76 221 221 } 222 222 223 /** 224 * Write this incident, in proper XML form, to the file in question. 225 * 226 * @param f the destination savefile 227 */ 223 228 public void saveIncidentToFile(File f) 224 229 { … … 298 303 { 299 304 305 /** 306 * The slice which has received focus in this event. 307 */ 300 308 public TimeSlice slice; 301 309 … … 325 333 { 326 334 335 /** 336 * The incident which has received focus in this event. 337 */ 327 338 public ScriptIncident incident; 328 339 -
trunk/src/scriptbuilder/structures/SimulationScript.java
r65 r76 50 50 }; 51 51 52 /** 53 * The file to which this script will be saved. 54 */ 52 55 public File saveFile = null; 53 56 57 /** 58 * The name of this script. 59 */ 54 60 public String title = ""; 55 61 … … 160 166 } 161 167 168 /** 169 * Add a new incident to the script. 170 * 171 * @param sci the incident to be added. 172 * @return true if there was enough room to add this incident. 173 */ 162 174 public boolean addIncident(ScriptIncident sci) 163 175 { … … 170 182 } 171 183 184 /** 185 * Write this script, in proper XML format, to the file in question. 186 * 187 * @param f the destination savefile to be written. 188 */ 172 189 public void saveScriptToFile(File f) 173 190 { … … 262 279 } 263 280 281 /** 282 * Counts the number of incidents currently running. 283 * 284 * @return the number of non-null incidents currently in the script. A 285 * number between 0 and INCIDENT_FILL_COUNT, inclusive. 286 */ 264 287 public int incidentCount() 265 288 { -
trunk/src/scriptbuilder/structures/TimeSlice.java
r67 r76 42 42 * @param seconds Number of seconds from the beginning of the simulation 43 43 * that this timeslice occurs 44 * @param inc the incident to which this timeslice belongs. 44 45 */ 45 46 public TimeSlice(int seconds, ScriptIncident inc) -
trunk/src/scriptbuilder/structures/XMLWriter.java
r46 r76 8 8 { 9 9 10 /** 11 * XML-style opening tag. Example: if given string "my_tag", returns 12 * "<my_tag>". 13 * 14 * @param s the XML element to be included in the tag. 15 * @return the properly formatted tag 16 */ 10 17 public static String openTag(String s) 11 18 { … … 13 20 } 14 21 22 /** 23 * XML-style closing tag. Example: if given string "my_tag", returns 24 * "</my_tag>". 25 * 26 * @param s the XML element to be included in the tag. 27 * @return the properly formatted tag 28 */ 15 29 public static String closeTag(String s) 16 30 { … … 18 32 } 19 33 34 /** 35 * XML-style empty tag. Example: if given string "my_tag", returns 36 * "<my_tag/>". 37 * 38 * @param s the XML element to be included in the tag. 39 * @return the properly formatted tag 40 */ 20 41 public static String emptyTag(String s) 21 42 { … … 23 44 } 24 45 46 /** 47 * Creates a pair of XML open and close tags to wrap a simple line of data. 48 * Useful if only one element need be enclosed in this particular tag. 49 * 50 * @param s the data to be wrapped 51 * @param e the XML element represented by the data 52 * @return an XML string of the format <my_tag>some_data_goes_here</my_tag> 53 */ 25 54 public static String simpleTag(String s, ELEMENT e) 26 55 { -
trunk/src/scriptbuilder/structures/events/ATMSEvaluationEvent.java
r46 r76 20 20 { 21 21 22 /** 23 * Constructor. 24 */ 22 25 public ATMSEvaluationEvent() 23 26 { … … 25 28 } 26 29 30 /** 31 * A list of the expected actions held by this evaluation event. 32 */ 27 33 public ArrayList<String> expectedAction = new ArrayList<String>(); 28 34 -
trunk/src/scriptbuilder/structures/events/ActivityLogEvaluationEvent.java
r46 r76 20 20 { 21 21 22 /** 23 * Constructor. 24 */ 22 25 public ActivityLogEvaluationEvent() 23 26 { … … 25 28 } 26 29 30 /** 31 * A list of the expected actions held by this evaluation event. 32 */ 27 33 public ArrayList<String> expectedAction = new ArrayList<String>(); 28 34 -
trunk/src/scriptbuilder/structures/events/AudioEvent.java
r46 r76 20 20 { 21 21 22 /** 23 * Constructor. 24 */ 22 25 public AudioEvent() 23 26 { … … 25 28 } 26 29 30 /** 31 * Length of the audio to be played, in seconds. 32 */ 27 33 public Integer audioLength = 0; 28 34 35 /** 36 * File path for the audio file. 37 */ 29 38 public String audioPath = ""; 30 39 -
trunk/src/scriptbuilder/structures/events/CADEvaluationEvent.java
r46 r76 20 20 { 21 21 22 /** 23 * Constructor. 24 */ 22 25 public CADEvaluationEvent() 23 26 { … … 25 28 } 26 29 30 /** 31 * A list of the expected actions held by this evaluation event. 32 */ 27 33 public ArrayList<String> expectedAction = new ArrayList<String>(); 28 34 -
trunk/src/scriptbuilder/structures/events/CADEvent.java
r47 r76 21 21 { 22 22 23 /** 24 * Constructor. 25 */ 23 26 public CADEvent() 24 27 { … … 26 29 } 27 30 31 /** 32 * True if this CAD event has sub-events. 33 */ 28 34 public boolean hasSubEvents = false; 29 35 36 /** 37 * Description of this event. 38 */ 30 39 public String detail = ""; 31 40 -
trunk/src/scriptbuilder/structures/events/CCTVEvent.java
r46 r76 12 12 13 13 /** 14 * Data model for a CCTV event .(Just a stub; CCTV events aren't currently15 * used .)A CCTV event has, for now, a string message.14 * Data model for a CCTV event(Just a stub; CCTV events aren't currently 15 * used). A CCTV event has, for now, a string message. 16 16 * 17 17 * @author Bryan McGuffin … … 20 20 { 21 21 22 /** 23 * Constructor. 24 */ 22 25 public CCTVEvent() 23 26 { … … 25 28 } 26 29 30 /** 31 * The message represented by this event. 32 */ 27 33 public String message = ""; 28 34 -
trunk/src/scriptbuilder/structures/events/CHPRadioEvent.java
r46 r76 22 22 { 23 23 24 /** 25 * Constructor. 26 */ 24 27 public CHPRadioEvent() 25 28 { … … 27 30 } 28 31 32 /** 33 * List of the lines of dialog in this event. 34 */ 29 35 public ArrayList<String> lines = new ArrayList<String>(); 30 36 37 /** 38 * List of the corresponding roles for each line of dialog. 39 */ 31 40 public ArrayList<String> roles = new ArrayList<String>(); 32 41 42 /** 43 * Path for the audio file to be played during this event. 44 */ 33 45 public String radioFile = ""; 34 46 -
trunk/src/scriptbuilder/structures/events/CMSEvaluationEvent.java
r46 r76 21 21 { 22 22 23 /** 24 * Constructor. 25 */ 23 26 public CMSEvaluationEvent() 24 27 { -
trunk/src/scriptbuilder/structures/events/FacilitatorEvaluationEvent.java
r46 r76 20 20 { 21 21 22 /** 23 * Constructor. 24 */ 22 25 public FacilitatorEvaluationEvent() 23 26 { … … 25 28 } 26 29 30 /** 31 * A list of the expected actions held by this evaluation event. 32 */ 27 33 public ArrayList<String> expectedAction = new ArrayList<String>(); 28 34 -
trunk/src/scriptbuilder/structures/events/MaintenanceRadioEvent.java
r46 r76 20 20 { 21 21 22 /** 23 * Constructor. 24 */ 22 25 public MaintenanceRadioEvent() 23 26 { -
trunk/src/scriptbuilder/structures/events/ParamicsEvent.java
r47 r76 21 21 { 22 22 23 /** 24 * Constructor. 25 */ 23 26 public ParamicsEvent() 24 27 { -
trunk/src/scriptbuilder/structures/events/RadioEvaluationEvent.java
r46 r76 20 20 { 21 21 22 /** 23 * Constructor. 24 */ 22 25 public RadioEvaluationEvent() 23 26 { … … 25 28 } 26 29 30 /** 31 * A list of the expected actions held by this evaluation event. 32 */ 27 33 public ArrayList<String> expectedAction = new ArrayList<String>(); 28 34 -
trunk/src/scriptbuilder/structures/events/TMTRadioEvent.java
r46 r76 20 20 { 21 21 22 /** 23 * Constructor. 24 */ 22 25 public TMTRadioEvent() 23 26 { -
trunk/src/scriptbuilder/structures/events/TelephoneEvent.java
r46 r76 22 22 { 23 23 24 /** 25 * Constructor. 26 */ 24 27 public TelephoneEvent() 25 28 { -
trunk/src/scriptbuilder/structures/events/TowEvent.java
r46 r76 20 20 { 21 21 22 /** 23 * Constructor. 24 */ 22 25 public TowEvent() 23 26 { -
trunk/src/scriptbuilder/structures/events/UnitEvent.java
r46 r76 20 20 { 21 21 22 /** 23 * Constructor. 24 */ 22 25 public UnitEvent() 23 26 {
Note: See TracChangeset
for help on using the changeset viewer.
