Ignore:
Timestamp:
12/20/2017 02:15:21 AM (8 years ago)
Author:
jtorres
Message:

TrafficEventsEditor?: added direction column to station selection. Added direction status label to current selection panel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/atmsdriver/trafficeventseditor/TrafficEventsEditor.java

    r238 r239  
    270270    private class StationTableModel extends AbstractTableModel 
    271271    { 
    272         String[] columnNames = {"lds_id", "postmile", "location"}; 
     272        String[] columnNames = {"lds_id", "direction", "postmile", "location"}; 
    273273        String[][] data; 
    274274        Highway hwy; 
     
    279279        { 
    280280            hwy = TrafficEventsEditor.this.timeFrames.currentHighway; 
    281             cols = 3; 
     281            cols = columnNames.length; 
    282282            rows = hwy != null ? hwy.stations.size() : 0; 
    283283            data = new String[rows][cols]; 
     
    285285            { 
    286286                data[i][0] = Integer.toString(hwy.stations.get(i).ldsID); 
    287                 data[i][1] = Double.toString(hwy.stations.get(i).postmile); 
    288                 data[i][2] = hwy.stations.get(i).location; 
     287                data[i][1] = hwy.stations.get(i).direction.getLetter(); 
     288                data[i][2] = Double.toString(hwy.stations.get(i).postmile); 
     289                data[i][3] = hwy.stations.get(i).location; 
    289290            } 
    290291        } 
     
    370371        CurrentLoopDetectorDescLabel = new javax.swing.JLabel(); 
    371372        jLabel8 = new javax.swing.JLabel(); 
     373        jLabel9 = new javax.swing.JLabel(); 
     374        CurrentStationDirectionLabel = new javax.swing.JLabel(); 
    372375        jPanel7 = new javax.swing.JPanel(); 
    373376        GreenButton = new javax.swing.JRadioButton(); 
     
    536539        jLabel8.setText("Desc:"); 
    537540 
     541        jLabel9.setText("Direction:"); 
     542 
     543        CurrentStationDirectionLabel.setText("null"); 
     544 
    538545        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9); 
    539546        jPanel9.setLayout(jPanel9Layout); 
     
    550557                        .addGap(6, 6, 6) 
    551558                        .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     559                            .addComponent(jLabel9) 
    552560                            .addComponent(jLabel5) 
    553561                            .addComponent(jLabel4) 
     
    556564                .addGap(18, 18, 18) 
    557565                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    558                     .addComponent(CurrentLoopDetectorDescLabel) 
    559566                    .addComponent(CurrentLoopDetectorTypeLabel) 
    560567                    .addComponent(CurrentLoopDetectorLabel) 
    561                     .addComponent(CurrentStationPostmileLabel) 
     568                    .addComponent(CurrentStationLocationLabel) 
     569                    .addComponent(CurrentStationDirectionLabel) 
    562570                    .addComponent(CurrentStationLabel) 
    563571                    .addComponent(CurrentHighwayLabel) 
    564572                    .addComponent(CurrentTimeFrameLabel) 
    565                     .addComponent(CurrentStationLocationLabel)) 
     573                    .addComponent(CurrentStationPostmileLabel) 
     574                    .addComponent(CurrentLoopDetectorDescLabel)) 
    566575                .addContainerGap(239, Short.MAX_VALUE)) 
    567576        ); 
     
    583592                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    584593                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     594                    .addComponent(jLabel9) 
     595                    .addComponent(CurrentStationDirectionLabel)) 
     596                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     597                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    585598                    .addComponent(jLabel4) 
    586599                    .addComponent(CurrentStationPostmileLabel)) 
     
    601614                    .addComponent(jLabel8) 
    602615                    .addComponent(CurrentLoopDetectorDescLabel)) 
    603                 .addContainerGap(31, Short.MAX_VALUE)) 
     616                .addContainerGap(12, Short.MAX_VALUE)) 
    604617        ); 
    605618 
     
    665678                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    666679                .addComponent(DeleteEventButton) 
    667                 .addContainerGap(22, Short.MAX_VALUE)) 
     680                .addContainerGap(25, Short.MAX_VALUE)) 
    668681        ); 
    669682 
     
    11061119    private javax.swing.JLabel CurrentLoopDetectorLabel; 
    11071120    private javax.swing.JLabel CurrentLoopDetectorTypeLabel; 
     1121    private javax.swing.JLabel CurrentStationDirectionLabel; 
    11081122    private javax.swing.JLabel CurrentStationLabel; 
    11091123    private javax.swing.JLabel CurrentStationLocationLabel; 
     
    11381152    private javax.swing.JLabel jLabel7; 
    11391153    private javax.swing.JLabel jLabel8; 
     1154    private javax.swing.JLabel jLabel9; 
    11401155    private javax.swing.JPanel jPanel1; 
    11411156    private javax.swing.JPanel jPanel10; 
     
    11721187                ? Double.toString(timeFrames.currentStation.postmile) 
    11731188                : ""); 
     1189        CurrentStationDirectionLabel.setText(timeFrames.currentStation != null 
     1190                ? timeFrames.currentStation.direction.getLetter() 
     1191                : ""); 
    11741192        CurrentStationLocationLabel.setText(timeFrames.currentStation != null 
    11751193                ? timeFrames.currentStation.location 
Note: See TracChangeset for help on using the changeset viewer.