@Override
  public FormattedCharacterBuffer getLineFormatted(int rowIndex, int columnIndex, int lineIndex) {
    ArrayList<String> field = data.get(rowIndex).get(columnIndex);
    String data;
    if (lineIndex >= field.size()) {
      // Return an empty string of the right size.
      data = padRight("", getColumnWidthInCharacters(columnIndex));
    } else {
      data = padRight(field.get(lineIndex), getColumnWidthInCharacters(columnIndex));
    }
    data = data.substring(0, Math.min(data.length(), getColumnWidthInCharacters(columnIndex)));
    switch (columnIndex) {
      case 0:
        return new FormattedCharacterBuffer(data, fontColumnA, Color.BLACK, Color.LIGHT_GRAY);
      case 1:
        return new FormattedCharacterBuffer(data, fontColumnB, Color.WHITE, Color.DARK_GRAY);
      case 2:
        return new FormattedCharacterBuffer(data, fontColumnC, Color.LIGHT_GRAY, Color.BLACK);
    }
    return null;
  }
The code display is a large array of rows to be displayed. Each row is an array of fields of
length "Columns". Each field is an array of lines.
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/CodeDisplay/CodeDisplayModelExample.java