Changeset 89 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/structures/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/ScriptEvent.java

    r76 r89  
    8282     */ 
    8383    public int length; 
     84     
     85    private TimeSlice slice; 
    8486 
    8587    /** 
     
    189191        return event instanceof I_EvaluationEvent; 
    190192    } 
     193     
     194    @Override 
     195    public void removeThis() 
     196    { 
     197        this.slice.events.remove(this); 
     198    } 
     199     
     200    @Override 
     201    public void assignTimeSlice(TimeSlice ts) 
     202    { 
     203        this.slice = ts; 
     204    } 
    191205} 
Note: See TracChangeset for help on using the changeset viewer.