private void highlightEdges(final Collection<DefaultWeightedEdge> edges) {
    // Restore previous display settings for previously highlighted edges
    if (null != previousEdgeHighlight)
      for (final DefaultWeightedEdge edge : previousEdgeHighlight.keySet())
        trackNode.setColor(edge, previousEdgeHighlight.get(edge));

    // Store current color settings
    previousEdgeHighlight = new HashMap<DefaultWeightedEdge, Color>();
    for (final DefaultWeightedEdge edge : edges)
      previousEdgeHighlight.put(edge, trackNode.getColor(edge));

    // Change edge color
    final Color highlightColor = (Color) displaySettings.get(KEY_HIGHLIGHT_COLOR);
    for (final DefaultWeightedEdge edge : edges) trackNode.setColor(edge, highlightColor);
  }
  private void updateTrackColors() {
    final TrackColorGenerator colorGenerator =
        (TrackColorGenerator) displaySettings.get(KEY_TRACK_COLORING);

    for (final Integer trackID : model.getTrackModel().trackIDs(true)) {
      colorGenerator.setCurrentTrackID(trackID);
      for (final DefaultWeightedEdge edge : model.getTrackModel().trackEdges(trackID)) {
        final Color color = colorGenerator.color(edge);
        trackNode.setColor(edge, color);
      }
    }
  }