Changeset 74 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/gui
- Timestamp:
- 08/25/2017 07:59:58 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/scriptbuilder/gui/panels/TimelineTickPanel.java
r54 r74 1 1 package scriptbuilder.gui.panels; 2 2 3 import java.awt.BorderLayout; 3 4 import java.awt.Dimension; 4 5 import java.awt.Graphics; 5 6 import java.awt.Graphics2D; 6 7 import java.awt.event.MouseEvent; 8 import java.io.File; 9 import javax.swing.JFrame; 7 10 import javax.swing.JPanel; 8 11 import javax.swing.event.MouseInputAdapter; 12 import static junit.framework.Assert.assertEquals; 9 13 import scriptbuilder.gui.IncidentEditorFrame; 10 14 import scriptbuilder.gui.ScriptBuilderFrame; … … 240 244 } 241 245 } 246 247 /** 248 * Local main for viewing this panel only. 249 * 250 * @author jdalbey 251 * @param args not used 252 */ 253 public static void main(String[] args) 254 { 255 JFrame frame = new JFrame("FrameDemo"); 256 257 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 258 259 TimelineTickPanel pnl = new TimelineTickPanel(); 260 // Create a script 261 File inFile = new File("test/scriptbuilder/structures/test_input_file.xml"); 262 SimulationScript instance = new SimulationScript(); 263 instance.loadScriptFromFile(inFile); 264 // update this panel with the script 265 pnl.update(instance); 266 frame.getContentPane().add(pnl, BorderLayout.CENTER); 267 frame.setSize(300, 500); 268 frame.pack(); 269 270 frame.setVisible(true); 271 272 } 242 273 }
Note: See TracChangeset
for help on using the changeset viewer.
