| Revision 89,
797 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 event.editor; |
|---|
| 2 | |
|---|
| 3 | /** |
|---|
| 4 | * |
|---|
| 5 | * @author Bryan McGuffin |
|---|
| 6 | */ |
|---|
| 7 | public class PropertyUpdate |
|---|
| 8 | { |
|---|
| 9 | |
|---|
| 10 | private UpdateType type; |
|---|
| 11 | private PropertyPanel panel; |
|---|
| 12 | private int position = -1; |
|---|
| 13 | |
|---|
| 14 | public PropertyUpdate(UpdateType theType, PropertyPanel thePanel) |
|---|
| 15 | { |
|---|
| 16 | type = theType; |
|---|
| 17 | panel = thePanel; |
|---|
| 18 | } |
|---|
| 19 | |
|---|
| 20 | public PropertyUpdate(UpdateType theType, PropertyPanel thePanel, int thePosition) |
|---|
| 21 | { |
|---|
| 22 | this(theType, thePanel); |
|---|
| 23 | position = thePosition; |
|---|
| 24 | } |
|---|
| 25 | |
|---|
| 26 | public int getPosition() |
|---|
| 27 | { |
|---|
| 28 | if (position == -1) |
|---|
| 29 | { |
|---|
| 30 | throw new RuntimeException("position unknown"); |
|---|
| 31 | } |
|---|
| 32 | |
|---|
| 33 | return position; |
|---|
| 34 | } |
|---|
| 35 | |
|---|
| 36 | public UpdateType getType() |
|---|
| 37 | { |
|---|
| 38 | return type; |
|---|
| 39 | } |
|---|
| 40 | |
|---|
| 41 | public PropertyPanel getPanel() |
|---|
| 42 | { |
|---|
| 43 | return panel; |
|---|
| 44 | } |
|---|
| 45 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.