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


Ignore:
Timestamp:
02/28/2019 10:21:36 AM (7 years ago)
Author:
jdalbey
Message:

Station.java: Add getColorName method, comment out dead code.

File:
1 edited

Legend:

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

    r274 r285  
    510510                { 
    511511                    //lineout.append("" + dir.getLetter() + stat.postmile); 
    512                     lineout.append(stat.getColorByDirection(dir)); 
     512                    lineout.append(stat.getColor()); 
    513513                    //lineout.append("  "); 
    514514                } 
     
    543543        Scanner s = new Scanner(fis).useDelimiter("\\A"); 
    544544        pmList.load(s); 
     545         
    545546        String header = "{\n" + 
    546547        "  \"type\": \"FeatureCollection\",\n" + 
     
    573574                        String outString = currentPM.toJson(); 
    574575                        // replace the color code with the color name 
    575                         String colorName=""; 
    576                         switch (stat.getColorByDirection(stat.direction)) 
    577                         { 
    578                             case '@': colorName = "red";break; 
    579                             case '+': colorName = "yellow"; break; 
    580                             case '-': colorName = "lime";break; 
    581                             case ' ': colorName = "lime";break; 
    582                         } 
     576                        String colorName=stat.getColorName(); 
    583577                        outString = outString.replace("desiredcolor",colorName); 
    584578                        lineout.append(outString); 
Note: See TracChangeset for help on using the changeset viewer.