private void regenerateLine(
      final String text, final Font font, final List<CStyleRunData> textColorStyleRun) {
    m_text = Preconditions.checkNotNull(text, "Error: text argument can not be null");
    Preconditions.checkNotNull(
        textColorStyleRun, "Error: textColorStyleRun argument can not be null");

    m_atext = new AttributedString(text);

    if (!isEmpty()) {
      if (font != null) {
        m_atext.addAttribute(TextAttribute.FONT, font);
      }

      // After the line is created we can process the accumulated style information.
      for (final CStyleRunData data : textColorStyleRun) {
        final int position = data.getStart();

        final int realLength = calculateRealLength(position, data.getLength());

        validatePartialLineArguments(position, realLength);

        m_atext.addAttribute(
            TextAttribute.FOREGROUND, data.getColor(), position, position + realLength);

        if (data.getLineObject() != null) {
          m_lineObjects.add(data.getLineObject());
        }

        if (data.getObject() != null) {
          setObject(position, realLength, data.getObject());
        }
      }

      m_textLayout = new TextLayout(m_atext.getIterator(), m_fontContext);
    }

    if (font != null) {
      updateCharBounds(font);
    }
  }
Highlights the line.

@param gfx The graphics context where the highlighting is drawn.
@param x The x position where the highlighting begins.
@param y The y position where the highlighting begins.
@param width The width of the highlighting area.
@param height The height of the highlighting area.
@param color The color of the highlighting area.
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/zygraph/realizers/ZyLineContent.java