Changeset 76 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/gui
- Timestamp:
- 08/25/2017 12:22:28 PM (9 years ago)
- Location:
- trunk/src/scriptbuilder/gui
- Files:
-
- 6 edited
-
IncidentEditorFrame.java (modified) (1 diff)
-
IncidentPaletteFrame.java (modified) (5 diffs)
-
drawers/TimeSliceDrawer.java (modified) (1 diff)
-
panels/IncidentPaletteAddPanel.java (modified) (2 diffs)
-
panels/TimeStampPanel.java (modified) (2 diffs)
-
panels/TimelineTickPanel.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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)
Note: See TracChangeset
for help on using the changeset viewer.
