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

Revision 89, 553 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 javax.swing.JPanel;
4
5/**
6 *
7 * @author Bryan McGuffin
8 */
9public class PropertyPanel
10{
11
12    private final JPanel panel;
13    private final Properties property;
14
15    public PropertyPanel(JPanel thePanel,
16            Properties theProperty)
17    {
18        panel = thePanel;
19        property = theProperty;
20    }
21
22    public JPanel getPanel()
23    {
24        return panel;
25    }
26
27    public Properties getProperty()
28    {
29        return property;
30    }
31
32    public String title()
33    {
34        return property.getTitle();
35    }
36}
Note: See TracBrowser for help on using the repository browser.