Changeset 134 in tmcsimulator-scriptbuilder for trunk/src/event/editor/frame/Properties.java


Ignore:
Timestamp:
10/23/2017 05:27:01 PM (9 years ago)
Author:
bmcguffin
Message:

The event-add dropdown menus in the event editor window now function correctly. Clicking on an event in the dropdown list adds it to that timeslice.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/event/editor/frame/Properties.java

    r93 r134  
    66import java.awt.Image; 
    77import java.awt.image.BufferedImage; 
     8import scriptbuilder.structures.ScriptEvent; 
     9import scriptbuilder.structures.ScriptEvent; 
     10import scriptbuilder.structures.events.*; 
     11import scriptbuilder.structures.events.I_ScriptEvent; 
    812 
    913public enum Properties 
    1014{ 
    1115    ATMS                ("ATMS", PropertyTypes.Optional, 
    12         loadImage(Images.getImage("ATMSEval.png"))), 
     16        loadImage(Images.getImage("ATMSEval.png")), new ATMSEvaluationEvent()), 
    1317    ActivityLog         ("Activity Log", PropertyTypes.Optional, 
    14         loadImage(Images.getImage("ActivityLogEval.png"))), 
     18        loadImage(Images.getImage("ActivityLogEval.png")), new ActivityLogEvaluationEvent()), 
    1519    CAD                 ("CAD", PropertyTypes.Optional, 
    16         loadImage(Images.getImage("CADEval.png"))), 
     20        loadImage(Images.getImage("CADEval.png")), new CADEvaluationEvent()), 
    1721    Facilitator         ("Faciliatator", PropertyTypes.Optional, 
    18         loadImage(Images.getImage("FacilitatorEval.png"))), 
     22        loadImage(Images.getImage("FacilitatorEval.png")), new FacilitatorEvaluationEvent()), 
    1923    Radio               ("Radio", PropertyTypes.Optional, 
    20         loadImage(Images.getImage("RadioEval.png"))), 
     24        loadImage(Images.getImage("RadioEval.png")), new RadioEvaluationEvent()), 
    2125    MaintenanceRadio    ("Maintenance Radio", PropertyTypes.Optional, 
    22         loadImage(Images.getImage("MaintenanceRadio.png"))), 
     26        loadImage(Images.getImage("MaintenanceRadio.png")), new MaintenanceRadioEvent()), 
    2327    TMTRadio            ("TMT Radio", PropertyTypes.Optional, 
    24         loadImage(Images.getImage("TMTRadio.png"))), 
     28        loadImage(Images.getImage("TMTRadio.png")), new TMTRadioEvent()), 
    2529    Telephone           ("Telephone", PropertyTypes.Optional, 
    26         loadImage(Images.getImage("Telephone.png"))), 
     30        loadImage(Images.getImage("Telephone.png")), new TelephoneEvent()), 
    2731    CHPRadio            ("CHP Radio",PropertyTypes.Optional, 
    28         loadImage(Images.getImage("CHPRadio.png"))), 
     32        loadImage(Images.getImage("CHPRadio.png")), new CHPRadioEvent()), 
    2933    CMS                 ("CMS", PropertyTypes.Multiple, 
    30         loadImage(Images.getImage("CMSEval.png"))), 
     34        loadImage(Images.getImage("CMSEval.png")), new CMSEvaluationEvent()), 
    3135    Audio               ("Audio", PropertyTypes.Multiple, 
    32         loadImage(Images.getImage("Audio.png"))), 
     36        loadImage(Images.getImage("Audio.png")), new AudioEvent()), 
    3337    CCTV                ("CCTV", PropertyTypes.Multiple, 
    34         loadImage(Images.getImage("CCTV.png"))), 
     38        loadImage(Images.getImage("CCTV.png")), new CCTVEvent()), 
    3539    CADLog              ("CAD Log", PropertyTypes.Multiple, 
    36         loadImage(Images.getImage("CAD.png"))), 
     40        loadImage(Images.getImage("CAD.png")), new CADEvent()), 
    3741    Paramics            ("Paramics", PropertyTypes.Multiple, 
    38         loadImage(Images.getImage("Paramics.png"))), 
     42        loadImage(Images.getImage("Paramics.png")), new ParamicsEvent()), 
    3943    Tow                 ("Tow", PropertyTypes.Multiple, 
    40         loadImage(Images.getImage("Tow.png"))), 
     44        loadImage(Images.getImage("Tow.png")), new TowEvent()), 
    4145    Unit                ("Unit", PropertyTypes.Multiple, 
    42         loadImage(Images.getImage("Unit.png"))), 
     46        loadImage(Images.getImage("Unit.png")), new UnitEvent()), 
    4347    Witness             ("Witness", PropertyTypes.Multiple, 
    44         loadImage(Images.getImage("Witness.png"))); 
     48        loadImage(Images.getImage("Witness.png")), new WitnessEvent()); 
    4549 
    4650    private String title; 
    4751    private PropertyTypes type; 
    4852    private ImageIcon image; 
     53    private I_ScriptEvent sevt; 
    4954 
    50     private Properties(String theTitle, PropertyTypes theType, ImageIcon theImage) 
     55    private Properties(String theTitle, PropertyTypes theType, ImageIcon theImage, I_ScriptEvent se) 
    5156    { 
    5257        title = theTitle; 
    5358        type = theType; 
    5459        image = theImage; 
     60        sevt = se; 
    5561    } 
    5662 
     
    5864    { 
    5965        return title; 
     66    } 
     67     
     68    public I_ScriptEvent getEvent() 
     69    { 
     70        return ScriptEvent.factoryByType(sevt.getScriptEventType()); 
    6071    } 
    6172 
Note: See TracChangeset for help on using the changeset viewer.