source: tmcsimulator-scriptbuilder/branches/ScriptBuilder4/src/scriptbuilder/gui/panels/IncidentsPanel.java @ 6

Revision 6, 939 bytes checked in by jdalbey, 9 years ago (diff)

Add original prototype to branch

Line 
1package scriptbuilder.gui.panels;
2
3import java.awt.Graphics;
4import java.awt.Graphics2D;
5import java.util.List;
6import javax.swing.JPanel;
7import scriptbuilder.structures.SimulationScript;
8
9/**
10 *
11 * @author Greg Eddington <geddingt@calpoly.edu>
12 */
13public class IncidentsPanel extends JPanel
14{
15    private SimulationScript script;
16    private TimelineTickPanel timelineTickPanel;
17    private List<IncidentTimelinePanel> incidentPanels;
18    private List<IncidentNumberPanel> numberPanels;
19
20    public void setScript(SimulationScript script)
21    {
22        this.script = script;
23
24        timelineTickPanel.update(script);
25    }
26
27    public IncidentsPanel()
28    {
29        super();
30
31        timelineTickPanel = new TimelineTickPanel();
32        this.add(timelineTickPanel);
33    }
34
35    @Override
36    public void paint(Graphics g)
37    {
38        super.paint(g);
39
40        Graphics2D g2d = (Graphics2D)g;
41        timelineTickPanel.paint(g);
42    }
43}
Note: See TracBrowser for help on using the repository browser.