Changeset 138 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/structures/TimeSlice.java


Ignore:
Timestamp:
11/29/2017 10:06:59 AM (8 years ago)
Author:
bmcguffin
Message:

Added support for incident color. Color is now read from the xml file; if no color field exists, it picks a random one. Upon saving the file, color is written out in RGB format. The DTD now contains a new field, COLOR, with three attributes: r, g, b.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/scriptbuilder/structures/TimeSlice.java

    r111 r138  
    221221        output += XMLWriter.openTag(ELEMENT.INCIDENT.tag + " LogNum=\"" + thisIncident.number + "\""); 
    222222        output += thisIncident.name + XMLWriter.closeTag(ELEMENT.INCIDENT.tag); 
     223        output += XMLWriter.emptyTag(ELEMENT.COLOR.tag  
     224                + " r=\"" + thisIncident.color.getRed() + "\"" 
     225                + " g=\"" + thisIncident.color.getGreen() + "\"" 
     226                + " b=\"" + thisIncident.color.getBlue() + "\""); 
    223227 
    224228        if ((cadData != null && cadData.hasCadData()) || containsCADIncidentEvent()) 
Note: See TracChangeset for help on using the changeset viewer.