Changeset 76 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/gui


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

Added javadoc for several files.

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

Legend:

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

    r73 r76  
    240240     * Constructor. Prep new script model, initialize the GUI, and add listeners 
    241241     * for all buttons. 
     242     *  
     243     * @param theIncident the Script Incident which this window will edit. 
    242244     */ 
    243245    public IncidentEditorFrame(ScriptIncident theIncident) 
  • 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    } 
  • trunk/src/scriptbuilder/gui/drawers/TimeSliceDrawer.java

    r53 r76  
    103103     * @param g2d the graphics component 
    104104     * @param slice the timeSlice to draw 
    105      * @param collapsed if true, don't draw the event icons 
    106105     */ 
    107106    public static void DrawScriptBuilderTimeSlice(Graphics2D g2d, TimeSlice slice) 
  • trunk/src/scriptbuilder/gui/panels/IncidentPaletteAddPanel.java

    r64 r76  
    2222{ 
    2323 
     24    /** 
     25     * The script incident represented by this panel. 
     26     */ 
    2427    public ScriptIncident incident; 
    2528 
     
    2730 
    2831    /** 
    29      * Creates new form IncidentPaletteAddPanel 
     32     * Create new IncidentPaletteAddPanel from the form. 
     33     * 
     34     * @param inc the incident to be represented in this panel. 
     35     * @param frame the parent palette which holds this panel. 
    3036     */ 
    3137    public IncidentPaletteAddPanel(ScriptIncident inc, IncidentPaletteFrame frame) 
  • trunk/src/scriptbuilder/gui/panels/TimeStampPanel.java

    r54 r76  
    4141 
    4242    /** 
    43      * Update the length interval and the dimensions of the panel. NOTE: This 
    44      * method implementation is an exact duplication of the update method in 
    45      * panels.TimelineTickPanel. I'm not sure if it actually accomplishes 
    46      * anything here. 
     43     * Update the length interval and the dimensions of the panel. This version 
     44     * of the method is used in the main script builder window. 
    4745     * 
    4846     * @param script The simulation script model 
     
    8987 
    9088    /** 
    91      * Update the length interval and the dimensions of the panel. NOTE: This 
    92      * method implementation is an exact duplication of the update method in 
    93      * panels.TimelineTickPanel. I'm not sure if it actually accomplishes 
    94      * anything here. 
     89     * Update the length interval and the dimensions of the panel. This version 
     90     * of the method is used in the individual incident editor window. 
    9591     * 
    96      * @param script The simulation script model 
     92     * @param incident the incident which this window is editing. 
    9793     */ 
    9894    public void update(ScriptIncident incident) 
  • trunk/src/scriptbuilder/gui/panels/TimelineTickPanel.java

    r74 r76  
    3333    private boolean focused = false; 
    3434 
    35     public void setZoom(float zoom) 
    36     { 
    37         repaint(); 
    38     } 
    39  
     35//    public void setZoom(float zoom) 
     36//    { 
     37//        repaint(); 
     38//    } 
    4039    /** 
    4140     * Listener for the mouse. Is notified when the mouse enters, exits, or 
     
    9998    /** 
    10099     * Update the panel's dimensions based on number of events, zoom level, and 
    101      * which events are collapsed. 
     100     * which events are collapsed. The version of the method is used in the main 
     101     * script builder. 
    102102     * 
    103103     * @param script The main script model 
     
    136136    /** 
    137137     * Update the panel's dimensions based on number of events, zoom level, and 
    138      * which events are collapsed. 
    139      * 
    140      * @param script The main script model 
     138     * which events are collapsed. This version of the method is used in the 
     139     * individual incident editor. 
     140     * 
     141     * @param incident the incident being edited 
    141142     */ 
    142143    public void update(ScriptIncident incident) 
Note: See TracChangeset for help on using the changeset viewer.