| Revision 89,
1005 bytes
checked in by bmcguffin, 9 years ago
(diff) |
|
Added dropdown menu item to ScriptBuilderFrame?: "Delete Incident". When clicked, user may select an existing incident to delete. Program will prompt user to confirm the deletion, then remove the incident from the script and refresh the display.
Added button to individual event editor window: "Remove this event". When clicked, the currently displayed event will be removed from the timeslice it is in. The display will be refreshed accordingly. NOTE: This still has some bugs, namely that the last remaining event in a timeslice fails to be deleted.
Restructured Interface ScriptEventEditorPanel? to include a removeAssociatedEvent method, which calls a new method in I_ScriptEvent called removeThis, which causes the event to be removed from its timeslice.
Editor.Java previously contained several classes and enums, none of which were set to private scope. Moved these extra classes to their own files to decrease clutter in Editor.java and increase readability of all files.
|
| Line | |
|---|
| 1 | package scriptbuilder.structures.events; |
|---|
| 2 | |
|---|
| 3 | import scriptbuilder.structures.ScriptEvent; |
|---|
| 4 | import scriptbuilder.structures.ScriptEvent.ScriptEventType; |
|---|
| 5 | import scriptbuilder.structures.TimeSlice; |
|---|
| 6 | |
|---|
| 7 | /** |
|---|
| 8 | * Generic interface for ScriptEvent objects. Script Events have an event type, |
|---|
| 9 | * a length, and several data values unique to the event. |
|---|
| 10 | * |
|---|
| 11 | * @author Bryan McGuffin |
|---|
| 12 | */ |
|---|
| 13 | public interface I_ScriptEvent extends Comparable |
|---|
| 14 | { |
|---|
| 15 | |
|---|
| 16 | /** |
|---|
| 17 | * Get the time length of this event. |
|---|
| 18 | * |
|---|
| 19 | * @return number of seconds the event takes place; default is 1 |
|---|
| 20 | */ |
|---|
| 21 | int getLength(); |
|---|
| 22 | |
|---|
| 23 | /** |
|---|
| 24 | * Remove this event from the timeslice it's in. |
|---|
| 25 | */ |
|---|
| 26 | void removeThis(); |
|---|
| 27 | |
|---|
| 28 | /** |
|---|
| 29 | * Give this event access to the timeslice it's in. |
|---|
| 30 | * |
|---|
| 31 | * @param ts the timeslice which contains this event |
|---|
| 32 | */ |
|---|
| 33 | void assignTimeSlice(TimeSlice ts); |
|---|
| 34 | |
|---|
| 35 | /** |
|---|
| 36 | * Get the event type. |
|---|
| 37 | * |
|---|
| 38 | * @return the enum script event type of this event |
|---|
| 39 | */ |
|---|
| 40 | ScriptEventType getScriptEventType(); |
|---|
| 41 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.