Changeset 76 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/gui/IncidentPaletteFrame.java


Ignore:
Timestamp:
08/25/2017 12:22:28 PM (9 years ago)
Author:
bmcguffin
Message:

Added javadoc for several files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/scriptbuilder/gui/IncidentPaletteFrame.java

    r73 r76  
    3131    private SimulationScript dummyScript; 
    3232 
     33    /** 
     34     * The list of incidents to be displayed in the palette. 
     35     */ 
    3336    public ArrayList<ScriptIncident> incidentList; 
    3437 
     
    3639 
    3740    /** 
    38      * Creates new form IncidentPaletteFrame 
     41     * Create new IncidentPaletteFrame from the form. 
     42     * 
     43     * @param scr The currently running script, to which new incidents will be 
     44     * added. 
    3945     */ 
    40     public IncidentPaletteFrame(SimulationScript s) 
    41     { 
    42         script = s; 
     46    public IncidentPaletteFrame(SimulationScript scr) 
     47    { 
     48        script = scr; 
    4349 
    4450        panelAdd = new JPanel(); 
     
    5460        incidentList = loadIncidentsFromFiles("Incidents"); 
    5561 
    56         recalculateList(); 
     62        refresh(); 
    5763 
    5864    } 
     
    128134    } 
    129135 
    130     private void recalculateList() 
     136    private void refresh() 
    131137    { 
    132138 
     
    136142    } 
    137143 
     144    /** 
     145     * Attempt to add an incident to the script. If successful, refresh the 
     146     * palette. 
     147     * 
     148     * @param incPanel the Add Panel which holds the incident to be added. 
     149     */ 
    138150    public void addIncidentToScript(IncidentPaletteAddPanel incPanel) 
    139151    { 
    140152        if (script.addIncident(incPanel.incident)) 
    141153        { 
    142             recalculateList(); 
     154            refresh(); 
    143155        } 
    144156    } 
Note: See TracChangeset for help on using the changeset viewer.