Changeset 73 in tmcsimulator-scriptbuilder for trunk


Ignore:
Timestamp:
08/24/2017 01:51:32 PM (9 years ago)
Author:
bmcguffin
Message:

Updated details in incident editor window allowing editor to more accurately reflect details in the incident.

Location:
trunk/src/scriptbuilder/gui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/scriptbuilder/gui/IncidentEditorFrame.form

    r61 r73  
    765765            <Component class="javax.swing.JTextArea" name="incidentDescription"> 
    766766              <Properties> 
     767                <Property name="editable" type="boolean" value="false"/> 
    767768                <Property name="columns" type="int" value="20"/> 
    768                 <Property name="editable" type="boolean" value="false"/> 
    769769                <Property name="lineWrap" type="boolean" value="true"/> 
    770770                <Property name="rows" type="int" value="5"/> 
  • trunk/src/scriptbuilder/gui/IncidentEditorFrame.java

    r61 r73  
    293293        eventButtons.add(facilitatorEvalButton); 
    294294        eventButtons.add(radioEvalButton); 
     295         
     296        incidentNumber.setText(""+this.theIncident.number); 
     297        incidentName.setText(""+this.theIncident.name); 
     298        incidentDescription.setText(""+this.theIncident.description); 
    295299    } 
    296300 
     
    330334        { 
    331335            TimeSlice slice = ((SliceChangedEvent) arg).slice; 
    332  
     336             
    333337            DefaultListModel model = new DefaultListModel(); 
    334338            for (I_ScriptEvent e : slice.events) 
  • trunk/src/scriptbuilder/gui/IncidentPaletteFrame.java

    r69 r73  
    3535    JPanel panelAdd; 
    3636 
    37     private int incidentCount; 
    38  
    3937    /** 
    4038     * Creates new form IncidentPaletteFrame 
     
    5048        incidentList = new ArrayList<ScriptIncident>(); 
    5149 
    52         incidentCount = 0; 
    53  
    5450        panelAdd.setLayout(new GridLayout(0, 1)); 
    5551 
     
    121117    private void loadPanels(ArrayList<ScriptIncident> incList) 
    122118    { 
    123         incidentCount = 0; 
    124119        scrollAddPanels.setViewport(new JViewport()); 
    125120        panelAdd.removeAll(); 
    126         labelFileCount.setText("Found "+incList.size()+" available incidents."); 
     121        labelFileCount.setText("Found " + incList.size() + " available incidents."); 
    127122        for (ScriptIncident inc : incList) 
    128123        { 
    129             ++incidentCount; 
    130124 
    131125            panelAdd.add(new IncidentPaletteAddPanel(inc, this)); 
  • trunk/src/scriptbuilder/gui/ScriptBuilderFrame.java

    r62 r73  
    19141914            if (inc != null) 
    19151915            { 
    1916                 new IncidentEditorFrame(inc).setVisible(true); 
     1916                IncidentEditorFrame editor = new IncidentEditorFrame(inc); 
     1917                script.addObserver(editor); 
     1918                editor.setVisible(true); 
    19171919            } 
    19181920        } 
Note: See TracChangeset for help on using the changeset viewer.