Changeset 266 in tmcsimulator for trunk/src/atmsdriver/model/Highways.java


Ignore:
Timestamp:
02/16/2019 03:22:09 PM (7 years ago)
Author:
jdalbey
Message:

PostmileCoords?.java: Add cross street name attribute and modified toJson to include it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/atmsdriver/model/Highways.java

    r260 r266  
    556556                            + stat.postmile; 
    557557                    PostmileCoords.Postmile currentPM = pmList.find(pmID); 
     558                    if (currentPM == null) 
     559                    {  
     560                    Logger.getLogger(Highways.class.getName()).log(Level.INFO,  
     561                            "Postmile Coords lookup couldn't find Station: "+pmID, 
     562                            " "); 
     563                    } 
    558564                    if (currentPM != null) 
    559565                    {     
    560                     //lineout.append("" + dir.getLetter() + stat.postmile); 
    561                     //lineout.append(stat.getColorByDirection(dir)); 
    562                     String outString = currentPM.toJson(); 
    563                     // replace the color code with the color name 
    564                     String colorName=""; 
    565                     switch (stat.getColorByDirection(stat.direction)) 
    566                     { 
    567                         case '@': colorName = "red";break; 
    568                         case '+': colorName = "yellow"; break; 
    569                         case '-': colorName = "lime";break; 
    570                         case ' ': colorName = "lime";break; 
    571                     } 
    572                     outString = outString.replace("desiredcolor",colorName); 
    573                     lineout.append(outString); 
    574                     lineout.append("  "); 
     566                        //lineout.append("" + dir.getLetter() + stat.postmile); 
     567                        //lineout.append(stat.getColorByDirection(dir)); 
     568                        String outString = currentPM.toJson(); 
     569                        // replace the color code with the color name 
     570                        String colorName=""; 
     571                        switch (stat.getColorByDirection(stat.direction)) 
     572                        { 
     573                            case '@': colorName = "red";break; 
     574                            case '+': colorName = "yellow"; break; 
     575                            case '-': colorName = "lime";break; 
     576                            case ' ': colorName = "lime";break; 
     577                        } 
     578                        outString = outString.replace("desiredcolor",colorName); 
     579                        lineout.append(outString); 
     580                        lineout.append("  "); 
    575581                    } 
    576582                } 
Note: See TracChangeset for help on using the changeset viewer.