- Timestamp:
- 07/07/2019 11:13:00 AM (7 years ago)
- Location:
- trunk/src/tmcsim
- Files:
-
- 4 edited
-
application.properties (modified) (1 diff)
-
cadsimulator/Coordinator.java (modified) (1 diff)
-
client/CADlogDisplay.java (modified) (7 diffs)
-
simulationmanager/IncidentHistoryPanel.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tmcsim/application.properties
r425 r432 1 # Mon, 24 Jun 2019 18:00:23 -07001 #Sun, 07 Jul 2019 11:28:33 -0700 2 2 3 Application.revision=4 243 Application.revision=431 4 4 5 Application.buildnumber=14 25 Application.buildnumber=145 -
trunk/src/tmcsim/cadsimulator/Coordinator.java
r416 r432 116 116 private static SimulationManagerInterface simMgr = null; 117 117 private static LinkedList<CADClientInterface> clientList; 118 /** 'database' of cad Data shared by all clients and the sim mgr */ 118 119 private static CADData cadData; 120 /** The 'rolodex' of contact info */ 119 121 private static CardfileData cardfileData; 122 /** The model for the state of the CAD Server */ 120 123 private CADSimulatorState cadModel; 121 124 -
trunk/src/tmcsim/client/CADlogDisplay.java
r425 r432 4 4 import java.awt.event.ActionListener; 5 5 import java.io.FileInputStream; 6 import java.io.FileWriter; 7 import java.io.PrintWriter; 6 8 import java.rmi.Naming; 7 9 import java.rmi.RemoteException; … … 38 40 private static Logger cadClientLogger = Logger.getLogger("tmcsim.client"); 39 41 40 @Override 41 public void refresh() throws RemoteException 42 { 43 throw new UnsupportedOperationException("Not supported yet."); 44 } 42 private static final String CONFIG_FILE_NAME = "cad_client_config.properties"; 43 private static final String LOG_FILE_NAME = "CADcomments.log"; 44 private final static int TEN_SECONDS = 10000; 45 45 46 46 /** … … 82 82 */ 83 83 private CADClientInterface client = this; 84 private static final String CONFIG_FILE_NAME = "cad_client_config.properties"; 85 private final static int TEN_SECONDS = 10000; 84 /* 85 * PrintWriter handle for sending log to a file 86 */ 87 private PrintWriter writer; 86 88 87 89 /** … … 103 105 cadClientProp.getProperty(PROPERTIES.CAD_RMI_PORT.name).trim()); 104 106 105 //theView = new ClockView();106 //theView.setVisible(true);107 108 107 // Create a timer that fetches the simulation time every second. 109 108 Timer timer = new Timer(TEN_SECONDS, new ActionListener() 110 109 { 111 public void actionPerformed(ActionEvent e )110 public void actionPerformed(ActionEvent evt) 112 111 { 113 112 try 114 113 { 115 114 Vector<Incident> incList = theCoorInt.getIncidentList(); 116 StringBuffer sb= new StringBuffer();115 StringBuffer output = new StringBuffer(); 117 116 118 117 for (Incident incident: incList) … … 120 119 // DefaultTableModel noteTable = (DefaultTableModel) theCoorInt.getCadDataIncidentTable(INC_TABLE.COMMENTS_NOTES, incident.getLogNum()); 121 120 // Output noteTable 122 sb.append("Incident # " + incident.logNum + "\n");123 121 // Retrieve the table of comments/notes the users created 124 122 DefaultTableModel notesTable = incident.getCommentsNotesTable(); … … 127 125 { 128 126 // Combine the fields into one export entry 129 sb.append(notesTable.getValueAt(row,1) + " "); // time130 String initials = (String) notesTable.getValueAt(row,2); // initials127 //sb.append(notesTable.getValueAt(row,1) + " "); // time 128 String initials = (String) notesTable.getValueAt(row,2); // user initials 131 129 // If there are user intials, include this item. 132 // Zero length initials mean it's a scripted item 130 // Zero length initials mean it's a scripted item, ignore it. 133 131 if (initials.length() > 0) 134 { 135 sb.append(initials + " "); 136 sb.append(notesTable.getValueAt(row,4) + "\n"); // notes 132 {//CAD Log Entry, Incident #187, Sharon: REQUEST EXTRA ANCHOVIES 133 output.append("CAD log entry, "); 134 output.append("Incident #" + incident.logNum + ", "); 135 output.append(initials + ": "); 136 output.append(notesTable.getValueAt(row,4) + "\n"); // notes 137 137 } 138 138 } 139 139 } 140 System.out.println(sb); 140 System.out.print(output); 141 // Write output to a file 142 try 143 { 144 writer = new PrintWriter(new FileWriter(LOG_FILE_NAME)); 145 writer.print(output); 146 writer.close(); 147 } catch (Exception exc) { 148 exc.printStackTrace(); 149 } 150 141 151 //long simtime = theCoorInt.getCurrentSimulationTime(); 142 152 //theView.updateTime("" + formatInterval(simtime)); … … 256 266 } 257 267 268 @Override 269 public void refresh() throws RemoteException 270 { 271 throw new UnsupportedOperationException("Not supported yet."); 272 } 273 258 274 /** 259 275 * Construct the CADClient with the properties file path, either from the -
trunk/src/tmcsim/simulationmanager/IncidentHistoryPanel.java
r11 r432 114 114 logScrollPane.setViewportView(eventHistoryTable); 115 115 logScrollPane.setBorder(BorderFactory.createTitledBorder( 116 BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), " Log Entries"));116 BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), "CAD Log Entries")); 117 117 118 118
Note: See TracChangeset
for help on using the changeset viewer.
