Changeset 76 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/gui/IncidentPaletteFrame.java
- Timestamp:
- 08/25/2017 12:22:28 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.
