Changeset 89 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/structures/events/I_ScriptEvent.java


Ignore:
Timestamp:
08/28/2017 01:38:15 PM (9 years ago)
Author:
bmcguffin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/scriptbuilder/structures/events/I_ScriptEvent.java

    r7 r89  
    33import scriptbuilder.structures.ScriptEvent; 
    44import scriptbuilder.structures.ScriptEvent.ScriptEventType; 
     5import scriptbuilder.structures.TimeSlice; 
    56 
    67/** 
     
    1920     */ 
    2021    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); 
    2134 
    2235    /** 
Note: See TracChangeset for help on using the changeset viewer.