Changeset 98 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/gui/panels
- Timestamp:
- 08/29/2017 10:40:27 AM (9 years ago)
- Location:
- trunk/src/scriptbuilder/gui/panels
- Files:
-
- 3 edited
-
IncidentTimelinePanel.java (modified) (3 diffs)
-
TimeStampPanel.java (modified) (3 diffs)
-
TimelineTickPanel.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/scriptbuilder/gui/panels/IncidentTimelinePanel.java
r96 r98 62 62 63 63 /** 64 * Filler time at the end of the screen for a particular incident 65 */ 66 public int requestedEditorFillerTime; 67 68 /** 69 * Filler time at the end of the screen for the whole script 70 */ 71 public static int requestedScriptBuilderFillerTime = 0; 72 73 /** 74 * Constant for amount of filler to add, in seconds. Set to 15 minutes 75 */ 76 public static final int FILLER_INTERVAL_SECONDS = 900; 77 78 /** 64 79 * The map representing the properties of this incident's events. Keys: 65 80 * event types. Values: Properties objects for those events. … … 310 325 super(); 311 326 327 requestedEditorFillerTime = 0; 312 328 // FACILITATOR_EVAL_EVENT, RADIO_EVAL_EVENT 313 329 eventTypeToPropertyMap = new HashMap(); … … 352 368 { 353 369 354 newSize = new Dimension(((incident.length + incident.offset) 355 / ScriptBuilderGuiConstants.HORIZONTAL_TICK_RESOLUTION 356 * ScriptBuilderGuiConstants.PIXEL_WIDTH_PER_HORIZONTAL_TICK) 357 + ScriptBuilderGuiConstants.EVENT_ICON_WIDTH, 358 ScriptBuilderGuiConstants.TIMELINE_COLLAPSED_HEIGHT 359 + ScriptBuilderGuiConstants.SCRIPT_EVENT_ICON_STEP * 2); 370 if (getTopLevelAncestor() instanceof IncidentEditorFrame) 371 { 372 373 newSize = new Dimension(((incident.length + incident.offset + requestedEditorFillerTime) 374 / ScriptBuilderGuiConstants.HORIZONTAL_TICK_RESOLUTION 375 * ScriptBuilderGuiConstants.PIXEL_WIDTH_PER_HORIZONTAL_TICK) 376 + ScriptBuilderGuiConstants.EVENT_ICON_WIDTH, 377 ScriptBuilderGuiConstants.TIMELINE_COLLAPSED_HEIGHT 378 + ScriptBuilderGuiConstants.SCRIPT_EVENT_ICON_STEP * 2); 379 } 380 else 381 { 382 newSize = new Dimension(((incident.length + incident.offset + requestedScriptBuilderFillerTime) 383 / ScriptBuilderGuiConstants.HORIZONTAL_TICK_RESOLUTION 384 * ScriptBuilderGuiConstants.PIXEL_WIDTH_PER_HORIZONTAL_TICK) 385 + ScriptBuilderGuiConstants.EVENT_ICON_WIDTH, 386 ScriptBuilderGuiConstants.TIMELINE_COLLAPSED_HEIGHT 387 + ScriptBuilderGuiConstants.SCRIPT_EVENT_ICON_STEP * 2); 388 } 360 389 361 390 } -
trunk/src/scriptbuilder/gui/panels/TimeStampPanel.java
r76 r98 61 61 if ((incident.length + incident.offset) > longestLength) 62 62 { 63 longestLength = incident.length + incident.offset ;63 longestLength = incident.length + incident.offset + IncidentTimelinePanel.requestedScriptBuilderFillerTime; 64 64 } 65 65 } … … 92 92 * @param incident the incident which this window is editing. 93 93 */ 94 public void update(ScriptIncident incident )94 public void update(ScriptIncident incident, IncidentTimelinePanel timeline) 95 95 { 96 96 longestLength = ScriptBuilderGuiConstants.TICK_TIMELINE_SMALLEST_LENGTH; … … 105 105 if ((incident.length + incident.offset) > longestLength) 106 106 { 107 longestLength = incident.length + incident.offset ;107 longestLength = incident.length + incident.offset + timeline.requestedEditorFillerTime; 108 108 } 109 109 } -
trunk/src/scriptbuilder/gui/panels/TimelineTickPanel.java
r76 r98 118 118 if ((incident.length + incident.offset) > longestLength) 119 119 { 120 longestLength = incident.length + incident.offset ;120 longestLength = incident.length + incident.offset + IncidentTimelinePanel.requestedScriptBuilderFillerTime; 121 121 } 122 122 } … … 141 141 * @param incident the incident being edited 142 142 */ 143 public void update(ScriptIncident incident )143 public void update(ScriptIncident incident, IncidentTimelinePanel timeline) 144 144 { 145 145 longestLength = ScriptBuilderGuiConstants.TICK_TIMELINE_SMALLEST_LENGTH; … … 155 155 if ((incident.length + incident.offset) > longestLength) 156 156 { 157 longestLength = incident.length + incident.offset ;157 longestLength = incident.length + incident.offset + timeline.requestedEditorFillerTime; 158 158 } 159 159
Note: See TracChangeset
for help on using the changeset viewer.
