Changeset 255 in tmcsimulator
- Timestamp:
- 02/10/2019 11:46:05 AM (7 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
-
atmsdriver/ConsoleTrafficDriver.java (modified) (1 diff)
-
atmsdriver/trafficeventseditor/TrafficEventsEditor.java (modified) (4 diffs)
-
tmcsim/application.properties (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/atmsdriver/ConsoleTrafficDriver.java
r237 r255 17 17 /** 18 18 * A console application to drive the ATMS Server. 19 * Use for test driving the FEP Simulator. 19 20 * 20 21 * @author jdalbey, John A. Torres -
trunk/src/atmsdriver/trafficeventseditor/TrafficEventsEditor.java
r253 r255 1 /*2 * To change this license header, choose License Headers in Project Properties.3 * To change this template file, choose Tools | Templates4 * and open the template in the editor.5 */6 1 package atmsdriver.trafficeventseditor; 7 2 … … 10 5 import atmsdriver.model.LoopDetector.DOTCOLOR; 11 6 import atmsdriver.model.Station; 7 import timeselector.*; 12 8 import java.io.File; 13 9 import java.util.ArrayList; … … 20 16 import javax.swing.DefaultListSelectionModel; 21 17 import javax.swing.JComboBox; 18 import javax.swing.JDialog; 22 19 import javax.swing.JFileChooser; 20 import javax.swing.JFrame; 23 21 import javax.swing.JList; 24 22 import javax.swing.JOptionPane; 23 import javax.swing.JPanel; 25 24 import javax.swing.JTable; 26 25 import javax.swing.JTextField; … … 995 994 private void addNewTimeFrameButtonClicked(java.awt.event.ActionEvent evt)//GEN-FIRST:event_addNewTimeFrameButtonClicked 996 995 {//GEN-HEADEREND:event_addNewTimeFrameButtonClicked 997 // String name = JOptionPane.showInputDialog(this, "Enter a time frame (HH:MM:SS)"); 998 String[] hourChoices = getTimeChoices(); 999 String[] minChoices = getTimeChoices(); 1000 String[] secChoices = {"00", "30"}; 1001 1002 JComboBox hourCombo = new JComboBox(hourChoices); 1003 JComboBox minCombo = new JComboBox(minChoices); 1004 JComboBox secCombo = new JComboBox(secChoices); 1005 1006 Object[] message = { 1007 "Hour:", hourCombo, 1008 "Minute:", minCombo, 1009 "Second:", secCombo 1010 }; 1011 int option = JOptionPane.showConfirmDialog(this, message, "Enter a time frame:", JOptionPane.OK_CANCEL_OPTION); 1012 if(option == JOptionPane.OK_OPTION) 1013 { 1014 String h = hourCombo.getSelectedItem().toString(); 1015 String m = minCombo.getSelectedItem().toString(); 1016 String s = secCombo.getSelectedItem().toString(); 1017 String cum = h + ":" + m + ":" + s; 1018 timeFrames.addTimeFrame(cum); 1019 } 1020 /*if(name != null) 1021 { 1022 timeFrames.addTimeFrame(name); 1023 }*/ 996 // Obtain the time of the previous time frame 997 int size = timeFrames.frames.size(); 998 if (timeFrames.frames.size() > 0) 999 { 1000 String prevTime = timeFrames.frames.get(size-1).toString(); 1001 } 1002 // Show a dialog for the user to select a time in HH:MM:SS 1003 // TODO: this could be enhanced so it appears with previous time 1004 TimeSelectionDialog dialog = new TimeSelectionDialog((JFrame)this, true); 1005 dialog.setLocation(200,400); 1006 dialog.setVisible(true); 1007 // Add the new time frame 1008 timeFrames.addTimeFrame(dialog.getSelectedTime()); 1009 dialog.dispose(); 1010 1024 1011 }//GEN-LAST:event_addNewTimeFrameButtonClicked 1025 1012 -
trunk/src/tmcsim/application.properties
r248 r255 1 #S at, 09 Feb 2019 09:41:52-08001 #Sun, 10 Feb 2019 13:07:36 -0800 2 2 3 Application.revision=2 473 Application.revision=253 4 4 5 5 Application.buildnumber=91
Note: See TracChangeset
for help on using the changeset viewer.
