source: tmcsimulator-scriptbuilder/branches/ScriptBuilder4/src/scriptbuilder/structures/ScriptEvent.java @ 6

Revision 6, 1.6 KB checked in by jdalbey, 9 years ago (diff)

Add original prototype to branch

Line 
1package scriptbuilder.structures;
2
3/**
4 *
5 * @author Greg Eddington <geddingt@calpoly.edu>
6 */
7public class ScriptEvent implements Comparable<ScriptEvent>
8{
9    public int compareTo(ScriptEvent o)
10    {
11        return this.type.compareTo(o.type);
12    }
13
14    public static enum ScriptEventType
15    {
16        AUDIO_EVENT             ("Audio"),
17        CAD_EVENT               ("CAD"),
18        CCTV_EVENT              ("CCTV"),
19        CHP_RADIO_EVENT         ("CHPRadio"),
20        PARAMICS_EVENT          ("Paramics"),
21        TOW_EVENT               ("Tow"),
22        UNIT_EVENT              ("Unit"),
23        WITNESS_EVENT           ("Witness"),
24        MAINTENANCE_RADIO_EVENT ("MaintenanceRadio"),
25        TMT_RADIO_EVENT         ("TMTRadio"),
26        TELEPHONE_EVENT         ("Telephone"),
27        ATMS_EVAL_EVENT         ("ATMSEval"),
28        ACTIVITY_LOG_EVAL_EVENT ("ActivityLogEval"),
29        CAD_EVAL_EVENT          ("CADEval"),
30        CMS_EVAL_EVENT          ("CMSEval"),
31        FACILITATOR_EVAL_EVENT  ("FacilitatorEval"),
32        RADIO_EVAL_EVENT        ("RadioEval");
33
34        public String IMAGE_NAME;
35
36        private ScriptEventType(String image)
37        {
38            this.IMAGE_NAME = image;
39        }
40    }
41
42    private ScriptEventType type;
43
44    /**
45     * Used for debugging only.
46     * @param type The type of event.
47     */
48    public ScriptEvent(ScriptEventType type)
49    {
50        this.type = type;
51    }
52
53    public ScriptEventType getScriptEventType()
54    {
55        return type;
56    }
57
58    @Override
59    public String toString()
60    {
61        return this.type.toString() + " - [Event Description]";
62    }
63}
Note: See TracBrowser for help on using the repository browser.