source: tmcsimulator-scriptbuilder/trunk/src/event/editor/RemoveablePanel.java @ 89

Revision 89, 270 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 
1package event.editor;
2
3import java.awt.event.*;
4
5public interface RemoveablePanel
6{
7
8    /**
9     * Set up the listener for removing this panel.
10     *
11     * @param listener the remove listener to be added
12     */
13    void setRemoveListener(ActionListener listener);
14}
Note: See TracBrowser for help on using the repository browser.