Changeset 59 in tmcsimulator for trunk/src/tmcsim/client/cadclientgui/screens/IncidentEditor.java
- Timestamp:
- 03/15/2017 10:20:21 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tmcsim/client/cadclientgui/screens/IncidentEditor.java
r3 r59 1 /*2 * To change this template, choose Tools | Templates3 * and open the template in the editor.4 */5 1 package tmcsim.client.cadclientgui.screens; 6 2 … … 17 13 import java.util.Calendar; 18 14 import java.util.Date; 19 20 15 import javax.swing.BorderFactory; 21 16 import javax.swing.DefaultListModel; … … 30 25 import javax.swing.table.DefaultTableModel; 31 26 import javax.swing.table.TableCellRenderer; 32 27 import tmcsim.client.cadclientgui.enums.CADDataEnums.TABLE; 33 28 import tmcsim.client.cadclientgui.enums.TableHeaders; 34 import tmcsim.client.cadclientgui.enums.CADDataEnums.TABLE;35 29 36 30 /** 37 * This class contains the view and controller for the IncidentEditor screen. The view is built using a GUI builder plug-in, and the controller 38 * uses listeners to control how the view and data act. 31 * This class contains the view and controller for the IncidentEditor screen. 32 * The view is built using a GUI builder plug-in, and the controller uses 33 * listeners to control how the view and data act. 34 * 39 35 * @author Stuart 40 36 */ 41 public class IncidentEditor extends javax.swing.JFrame { 42 43 private final String[] monthNames = { "January", "February", 44 "March", "April", "May", "June", "July", "August", "September", 45 "October", "November", "December"}; 46 47 private final String[] dayNames = { "Sun", "Mon", "Tue", "Wed", 48 "Thu", "Fri", "Sat"}; 49 37 public class IncidentEditor extends javax.swing.JFrame 38 { 39 private final String[] monthNames = 40 { 41 "January", "February", 42 "March", "April", "May", "June", "July", "August", "September", 43 "October", "November", "December" 44 }; 45 private final String[] dayNames = 46 { 47 "Sun", "Mon", "Tue", "Wed", 48 "Thu", "Fri", "Sat" 49 }; 50 50 private DefaultTableModel blankTable; 51 52 51 private JTable calendarTable; 53 52 private int todayRow; … … 57 56 * Creates new form IncidentEditor 58 57 */ 59 public IncidentEditor() { 58 public IncidentEditor() 59 { 60 60 declareComponents(); 61 61 initControllers(); … … 71 71 // <editor-fold defaultstate="collapsed" 72 72 // desc="Generated Code">//GEN-BEGIN:initComponents 73 private void declareComponents() { 73 private void declareComponents() 74 { 74 75 75 76 incidentLogScroll = new javax.swing.JScrollPane(); … … 93 94 toCalendar = new javax.swing.JPanel(); 94 95 } 95 96 public MouseListener newMouseListener(){ 97 return new MouseListener() { 98 public void mouseClicked(MouseEvent e) { 96 97 public MouseListener newMouseListener() 98 { 99 return new MouseListener() 100 { 101 public void mouseClicked(MouseEvent e) 102 { 99 103 viewButton.setEnabled(true); 100 104 } 101 105 102 public void mouseEntered(MouseEvent e) { 103 } 104 105 public void mouseExited(MouseEvent e) { 106 } 107 108 public void mousePressed(MouseEvent e) { 109 } 110 111 public void mouseReleased(MouseEvent e) { 112 } 113 }; 114 } 115 116 public ActionListener newSearchActionListener(){ 117 return new ActionListener() { 118 public void actionPerformed(ActionEvent e) { 106 public void mouseEntered(MouseEvent e) 107 { 108 } 109 110 public void mouseExited(MouseEvent e) 111 { 112 } 113 114 public void mousePressed(MouseEvent e) 115 { 116 } 117 118 public void mouseReleased(MouseEvent e) 119 { 120 } 121 }; 122 } 123 124 public ActionListener newSearchActionListener() 125 { 126 return new ActionListener() 127 { 128 public void actionPerformed(ActionEvent e) 129 { 119 130 ScreenManager.openSearch(); 120 131 } 121 122 }; 123 } 124 125 public ActionListener newViewActionListener(){ 126 return new ActionListener() { 127 public void actionPerformed(ActionEvent e) { 132 }; 133 } 134 135 public ActionListener newViewActionListener() 136 { 137 return new ActionListener() 138 { 139 public void actionPerformed(ActionEvent e) 140 { 128 141 String masterInc = (String) incidentLogTable.getValueAt( 129 142 incidentLogTable.getSelectedRow(), 5); 130 143 int incidentId = 0; 131 try { 144 try 145 { 132 146 incidentId = ScreenManager.theCoordinator 133 147 .getIncidentId(masterInc); 134 } catch (RemoteException e1) { 148 } catch (RemoteException e1) 149 { 135 150 e1.printStackTrace(); 136 151 } … … 139 154 }; 140 155 } 141 142 public ActionListener newRefreshActionListener(){ 143 return new ActionListener() { 144 public void actionPerformed(ActionEvent e) { 156 157 public ActionListener newRefreshActionListener() 158 { 159 return new ActionListener() 160 { 161 public void actionPerformed(ActionEvent e) 162 { 145 163 refreshInformation(); 146 164 } 147 165 }; 148 166 } 149 150 public ActionListener newExitActionListener(){ 151 return new ActionListener() { 152 public void actionPerformed(ActionEvent arg0) { 167 168 public ActionListener newExitActionListener() 169 { 170 return new ActionListener() 171 { 172 public void actionPerformed(ActionEvent arg0) 173 { 153 174 close(); 154 175 } 155 176 }; 156 177 } 157 158 private void initControllers() { 159 178 179 private void initControllers() 180 { 181 160 182 incidentLogTable.addMouseListener(newMouseListener()); 161 183 162 184 searchButton.addActionListener(newSearchActionListener()); 163 185 viewButton.addActionListener(newViewActionListener()); … … 165 187 exitButton.addActionListener(newExitActionListener()); 166 188 } 167 168 private void initLayout() { 189 190 private void initLayout() 191 { 169 192 blankTable = new DefaultTableModel(); 170 193 blankTable.setColumnIdentifiers(TableHeaders.INCIDENT_EDITOR_HEADERS); … … 195 218 196 219 currentDatabaseCombo.setModel(new javax.swing.DefaultComboBoxModel( 197 new String[] { "System" })); 220 new String[] 221 { 222 "System" 223 })); 198 224 currentDatabaseCombo.setEnabled(false); 199 225 … … 202 228 fromCalendar = createCalendar(); 203 229 toCalendar = createCalendar(); 204 230 205 231 reopenButton.setText("ReOpen"); 206 232 reopenButton.setEnabled(false); … … 211 237 212 238 searchButton.setText("Search"); 213 239 214 240 printButton.setText("Print"); 215 241 printButton.setEnabled(false); … … 217 243 viewButton.setText("View"); 218 244 viewButton.setEnabled(false); 219 245 220 246 refreshButton.setText("Refresh"); 221 247 exitButton.setText("Exit"); 222 248 223 249 fromLabel.setText("From..."); 224 250 225 251 toLabel.setText("To..."); 226 252 227 253 javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 228 254 getContentPane().setLayout(layout); 229 255 layout.setHorizontalGroup( 230 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)231 .addComponent(incidentLogScroll)232 .addGroup(layout.createSequentialGroup()256 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 257 .addComponent(incidentLogScroll) 258 .addGroup(layout.createSequentialGroup() 233 259 .addContainerGap() 234 260 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 235 .addComponent(agencyTypeLabel)236 .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)237 .addGroup(layout.createSequentialGroup()238 .addGap(10, 10, 10)239 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)240 .addComponent(currentDatabaseLabel)241 .addComponent(currentDatabaseCombo, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)))242 .addComponent(searchLimitLabel))261 .addComponent(agencyTypeLabel) 262 .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE) 263 .addGroup(layout.createSequentialGroup() 264 .addGap(10, 10, 10) 265 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 266 .addComponent(currentDatabaseLabel) 267 .addComponent(currentDatabaseCombo, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))) 268 .addComponent(searchLimitLabel)) 243 269 .addGap(32, 32, 32) 244 270 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 245 .addComponent(fromLabel)246 .addComponent(fromCalendar, 200, 200, 200))271 .addComponent(fromLabel) 272 .addComponent(fromCalendar, 200, 200, 200)) 247 273 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 45, Short.MAX_VALUE) 248 274 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 249 .addComponent(toLabel)250 .addComponent(toCalendar, 200, 200, 200))275 .addComponent(toLabel) 276 .addComponent(toCalendar, 200, 200, 200)) 251 277 .addGap(25, 25, 25) 252 278 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 253 .addComponent(reopenButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 254 .addComponent(duplicateCellButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 255 .addComponent(searchButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 256 .addComponent(printButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 257 .addComponent(viewButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 258 .addComponent(refreshButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 259 .addComponent(exitButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) 260 ); 279 .addComponent(reopenButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 280 .addComponent(duplicateCellButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 281 .addComponent(searchButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 282 .addComponent(printButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 283 .addComponent(viewButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 284 .addComponent(refreshButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 285 .addComponent(exitButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))); 261 286 layout.setVerticalGroup( 262 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)263 .addGroup(layout.createSequentialGroup()287 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 288 .addGroup(layout.createSequentialGroup() 264 289 .addComponent(incidentLogScroll, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE) 265 290 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 266 291 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 267 .addComponent(agencyTypeLabel)268 .addComponent(reopenButton)269 .addComponent(fromLabel)270 .addComponent(toLabel))292 .addComponent(agencyTypeLabel) 293 .addComponent(reopenButton) 294 .addComponent(fromLabel) 295 .addComponent(toLabel)) 271 296 .addGap(2, 2, 2) 272 297 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 273 .addGroup(layout.createSequentialGroup() 274 .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) 275 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 276 .addComponent(currentDatabaseLabel) 277 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 278 .addComponent(currentDatabaseCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 279 .addGap(18, 18, 18) 280 .addComponent(searchLimitLabel)) 281 .addGroup(layout.createSequentialGroup() 282 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 283 .addComponent(fromCalendar, 150, 150, 150) 284 .addComponent(toCalendar, 150, 150, 150))) 285 .addGroup(layout.createSequentialGroup() 286 .addComponent(duplicateCellButton) 287 .addGap(2, 2, 2) 288 .addComponent(searchButton) 289 .addGap(2, 2, 2) 290 .addComponent(printButton) 291 .addGap(2, 2, 2) 292 .addComponent(viewButton) 293 .addGap(2, 2, 2) 294 .addComponent(refreshButton) 295 .addGap(2, 2, 2) 296 .addComponent(exitButton))) 297 .addGap(0, 41, Short.MAX_VALUE)) 298 ); 298 .addGroup(layout.createSequentialGroup() 299 .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) 300 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 301 .addComponent(currentDatabaseLabel) 302 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 303 .addComponent(currentDatabaseCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 304 .addGap(18, 18, 18) 305 .addComponent(searchLimitLabel)) 306 .addGroup(layout.createSequentialGroup() 307 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 308 .addComponent(fromCalendar, 150, 150, 150) 309 .addComponent(toCalendar, 150, 150, 150))) 310 .addGroup(layout.createSequentialGroup() 311 .addComponent(duplicateCellButton) 312 .addGap(2, 2, 2) 313 .addComponent(searchButton) 314 .addGap(2, 2, 2) 315 .addComponent(printButton) 316 .addGap(2, 2, 2) 317 .addComponent(viewButton) 318 .addGap(2, 2, 2) 319 .addComponent(refreshButton) 320 .addGap(2, 2, 2) 321 .addComponent(exitButton))) 322 .addGap(0, 41, Short.MAX_VALUE))); 299 323 300 324 pack(); 301 325 }// </editor-fold>//GEN-END:initComponents 302 326 303 public JPanel createCalendar(){ 304 327 public JPanel createCalendar() 328 { 329 305 330 JPanel calendarPanel = new JPanel(); 306 331 Calendar now = Calendar.getInstance(); 307 332 calendarPanel.setBorder(new LineBorder(new Color(0, 0, 0))); 308 333 calendarPanel.setLayout(null); 309 334 310 335 JLabel monthLabel = new JLabel("New label"); 311 336 monthLabel.setBounds(0, 0, 140, 20); … … 314 339 monthLabel.setText(monthNames[now.get(Calendar.MONTH)]); 315 340 calendarPanel.add(monthLabel); 316 341 317 342 JLabel yearLabel = new JLabel("New label"); 318 343 yearLabel.setHorizontalAlignment(SwingConstants.CENTER); … … 321 346 yearLabel.setText(Integer.toString(now.get(Calendar.YEAR))); 322 347 calendarPanel.add(yearLabel); 323 348 324 349 Date date = new Date(); 325 350 DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy"); 326 351 String dateString = dateFormat.format(date); 327 352 328 353 JLabel dateLabel1 = new JLabel("New label"); 329 354 dateLabel1.setBounds(0, 130, 60, 20); … … 332 357 dateLabel1.setHorizontalAlignment(JLabel.CENTER); 333 358 calendarPanel.add(dateLabel1); 334 359 335 360 JLabel dateLabel2 = new JLabel("New label"); 336 361 dateLabel2.setBounds(140, 130, 60, 20); … … 339 364 dateLabel2.setHorizontalAlignment(JLabel.CENTER); 340 365 calendarPanel.add(dateLabel2); 341 366 342 367 JScrollBar scrollBar = new JScrollBar(); 343 368 scrollBar.setOrientation(JScrollBar.HORIZONTAL); … … 346 371 scrollBar.setEnabled(false); 347 372 calendarPanel.add(scrollBar); 348 349 calendarTable = new JTable(){ 373 374 calendarTable = new JTable() 375 { 350 376 /* 351 377 * Custom renderer to set different background/foreground colors 352 378 * @see javax.swing.JTable#prepareRenderer(javax.swing.table.TableCellRenderer, int, int) 353 379 */ 354 public Component prepareRenderer(TableCellRenderer renderer, int row, int column){ 380 public Component prepareRenderer(TableCellRenderer renderer, int row, int column) 381 { 355 382 Component comp = super.prepareRenderer(renderer, row, column); 356 if(todayRow == row && todayCol == column){ 383 if (todayRow == row && todayCol == column) 384 { 357 385 comp.setBackground(Color.BLUE); 358 386 comp.setForeground(Color.WHITE); 359 387 } 360 else{ 388 else 389 { 361 390 comp.setBackground(new Color(235, 235, 235)); 362 391 comp.setForeground(Color.BLACK); … … 368 397 DefaultTableCellRenderer centerRenderer = new DefaultTableCellRenderer(); 369 398 centerRenderer.setHorizontalAlignment(JLabel.CENTER); 370 for(int i = 0; i < dayNames.length; i++){ 399 for (int i = 0; i < dayNames.length; i++) 400 { 371 401 calendarTable.getColumnModel().getColumn(i).setCellRenderer(centerRenderer); 372 402 } … … 374 404 calendarTable.setBounds(0, 20, 200, 110); 375 405 calendarPanel.add(calendarTable); 376 406 377 407 return calendarPanel; 378 408 } 379 380 protected DefaultTableModel createDaysModel() { 381 382 String[][] emptyModel = {{"", "", "", "", "", "", ""}, 383 {"", "", "", "", "", "", ""}, 384 {"", "", "", "", "", "", ""}, 385 {"", "", "", "", "", "", ""}, 386 {"", "", "", "", "", "", ""}, 387 {"", "", "", "", "", "", ""}, 388 {"", "", "", "", "", "", ""}, 389 {"", "", "", "", "", "", ""}}; 390 391 String[] emptyHeader = {"", "", "", "", "", "", ""}; 409 410 protected DefaultTableModel createDaysModel() 411 { 412 413 String[][] emptyModel = 414 { 415 { 416 "", "", "", "", "", "", "" 417 }, 418 { 419 "", "", "", "", "", "", "" 420 }, 421 { 422 "", "", "", "", "", "", "" 423 }, 424 { 425 "", "", "", "", "", "", "" 426 }, 427 { 428 "", "", "", "", "", "", "" 429 }, 430 { 431 "", "", "", "", "", "", "" 432 }, 433 { 434 "", "", "", "", "", "", "" 435 }, 436 { 437 "", "", "", "", "", "", "" 438 } 439 }; 440 441 String[] emptyHeader = 442 { 443 "", "", "", "", "", "", "" 444 }; 392 445 DefaultTableModel calendarModel = new DefaultTableModel(emptyModel, emptyHeader); 393 446 int row = 0; 394 447 int col = 0; 395 448 396 449 Calendar today = Calendar.getInstance(); 397 450 int tMonth = today.get(Calendar.MONTH); … … 411 464 maximum.add(Calendar.MONTH, +1); 412 465 413 for (int i = 0; i < dayNames.length; i++) { 466 for (int i = 0; i < dayNames.length; i++) 467 { 414 468 calendarModel.setValueAt(dayNames[i], row, col); 415 469 col++; … … 418 472 row = 1; 419 473 420 while (iterator.getTimeInMillis() < maximum.getTimeInMillis()) { 474 while (iterator.getTimeInMillis() < maximum.getTimeInMillis()) 475 { 421 476 int lMonth = iterator.get(Calendar.MONTH); 422 477 int lYear = iterator.get(Calendar.YEAR); 423 478 424 if ((lMonth == tMonth) && (lYear == tYear)) { 479 if ((lMonth == tMonth) && (lYear == tYear)) 480 { 425 481 int lDay = iterator.get(Calendar.DAY_OF_MONTH); 426 482 calendarModel.setValueAt(Integer.toString(lDay), row, col); 427 if ((tMonth == lMonth) && (tYear == lYear) && (tDay == lDay)) { 483 if ((tMonth == lMonth) && (tYear == lYear) && (tDay == lDay)) 484 { 428 485 todayRow = row; 429 486 todayCol = col; 430 487 } 431 } 488 } 432 489 iterator.add(Calendar.DAY_OF_YEAR, +1); 433 490 434 491 col++; 435 if(col >= calendarModel.getColumnCount()){ 492 if (col >= calendarModel.getColumnCount()) 493 { 436 494 row++; 437 495 col = 0; … … 439 497 } 440 498 441 499 442 500 return calendarModel; 443 501 } 444 445 public void refreshInformation() { 446 try { 502 503 public void refreshInformation() 504 { 505 try 506 { 447 507 incidentLogTable.setModel(ScreenManager.theCoordinator 448 508 .getCadDataTable(TABLE.INCIDENT_EDITOR)); 449 } catch (RemoteException e) { 509 } catch (RemoteException e) 510 { 450 511 e.printStackTrace(); 451 512 } … … 455 516 * Makes screen visible. 456 517 */ 457 public void open() { 518 public void open() 519 { 458 520 incidentLogTable.setModel(blankTable); 459 521 viewButton.setEnabled(false); … … 464 526 * Hides screen. 465 527 */ 466 public void close() { 528 public void close() 529 { 467 530 setVisible(false); 468 531 } 469 470 532 // Variables declaration - do not modify//GEN-BEGIN:variables 471 533 private javax.swing.JLabel agencyTypeLabel;
Note: See TracChangeset
for help on using the changeset viewer.
