edges.put(edge.getInternalID(), edge);
}
}
}
EdgeModel currEdge;
for (StatEdge statEdge : dataset.getInterval(interval).getStatEdges()) {
// try to get corresponding Edge element
if ((currEdge = edges.get(statEdge.getId())) != null) {
// line colors
if (colorBox.isSelected()) {
// compute color
Color lowColor = lowButton.color;
Color highColor = highButton.color;
if (dataset.isLaneDataIncluded()) {
// set color depending on lane values
for (int i = 0; i < currEdge.getNoOfLanes(); i++) {
double data = statEdge.getStatLane(i).getValue(
value);
Color color = computeColor(data, lowThresh,
lowColor, highThresh, highColor);
currEdge.getLanes().get(i).setColor(color);
}
} else {// no lane data
// give each lane the same color
// (depending on edge value)
double data = statEdge.getValue(value);
Color color = computeColor(data, lowThresh,
lowColor, highThresh, highColor);
for (LaneModel lane : currEdge.getLanes()) {
lane.setColor(color);
}
}
} else {// color group not checked
// reset lane colors
for (LaneModel lane : currEdge.getLanes()) {
lane.setColor(null);
}
}
// line widths
if (widthBox.isSelected()) {
// compute line width, each lane gets the same width
double data = statEdge.getValue(value);
double widthOffset = computeWidthOffset(data,
lowThresh, (Double) lowWidth.getValue(), highThresh,
(Double) highWidth.getValue());
for (LaneModel lane : currEdge.getLanes()) {
lane.setWidthOffset(widthOffset);
}
} else {// width group not checked
// reset lane widths
for (LaneModel lane : currEdge.getLanes()) {
lane.setWidthOffset(0);
}
}
}// end if currEdge != null
}// end for edges