| Revision 6,
939 bytes
checked in by jdalbey, 9 years ago
(diff) |
|
Add original prototype to branch
|
| Rev | Line | |
|---|
| 1 | package scriptbuilder.gui.panels; |
|---|
| 2 | |
|---|
| 3 | import java.awt.Graphics; |
|---|
| 4 | import java.awt.Graphics2D; |
|---|
| 5 | import java.util.List; |
|---|
| 6 | import javax.swing.JPanel; |
|---|
| 7 | import scriptbuilder.structures.SimulationScript; |
|---|
| 8 | |
|---|
| 9 | /** |
|---|
| 10 | * |
|---|
| 11 | * @author Greg Eddington <geddingt@calpoly.edu> |
|---|
| 12 | */ |
|---|
| 13 | public 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.