for (i = 0; i < getColCount(); i++) {
for (ii = 0; ii < getColCount(); ii++) { i = getDisplayCol(ii);
  protected String[][] toArray() {    int               i;    int               n;    int               x;    int               y;    String[][]        result;    String[][]        tmpResult;    int               cols;    int               rows;    int[]             widths;    boolean           valueExists;    // determine visible cols/rows    rows = getVisibleRowCount();    cols = getVisibleColCount();    if (getShowStdDev())      cols = cols*3;   // mean + stddev + sign.    else      cols = cols*2;   // mean + stddev    result = new String[rows + 2][cols + 1];    // col names    x = 0;    result[0][x] = trimString("Dataset", getRowNameWidth());    x++;    for (i = 0; i < getColCount(); i++) {      if (getColHidden(i))        continue;            result[0][x] = getColName(i);      x++;      // std dev      if (getShowStdDev()) {        result[0][x] = "";        x++;      }      // sign.      result[0][x] = "";      x++;    }    // row names    y = 1;    for (i = 0; i < getRowCount(); i++) {      if (!getRowHidden(i)) {        result[y][0] = trimString(getRowName(i), getRowNameWidth());        y++;      }    }    // fill in mean/std dev    y = 1;    for (i = 0; i < getRowCount(); i++) {      if (getRowHidden(i))        continue;      x = 1;      for (n = 0; n < getColCount(); n++) {        if (getColHidden(n))          continue;        // do we have a value in the matrix?        valueExists = (!Double.isNaN(getMean(n, i)));        // mean        if (!valueExists)          result[y][x] = "";        else          result[y][x] = doubleToString(getMean(n, i), getMeanPrec());        x++;                // stddev        if (getShowStdDev()) {          if (!valueExists)            result[y][x] = "";          else if (Double.isInfinite(getStdDev(n, i)))            result[y][x] = "Inf";          else            result[y][x] = doubleToString(getStdDev(n, i), getStdDevPrec());          x++;        }                // significance        if (!valueExists) {          result[y][x] = "";        }        else {          switch (getSignificance(n, i)) {            case SIGNIFICANCE_TIE:              result[y][x] = TIE_STRING;              break;            case SIGNIFICANCE_WIN:              result[y][x] = WIN_STRING;              break;            case SIGNIFICANCE_LOSS:              result[y][x] = LOSS_STRING;              break;          }        }        x++;      }      y++;    }    // wins/ties/losses    y = result.length - 1;    x = 0;    result[y][0] = LEFT_PARENTHESES + WIN_STRING + "/" + TIE_STRING + "/" + LOSS_STRING + RIGHT_PARENTHESES;    x++;    for (i = 0; i < getColCount(); i++) {      if (getColHidden(i))        continue;      // mean      result[y][x] = "";      x++;      // std dev.      if (getShowStdDev()) {        result[y][x] = "";        x++;      }      // significance      result[y][x] =   LEFT_PARENTHESES                      + getSignificanceCount(i, SIGNIFICANCE_WIN) + "/"                      + getSignificanceCount(i, SIGNIFICANCE_TIE) + "/"                      + getSignificanceCount(i, SIGNIFICANCE_LOSS)                      + RIGHT_PARENTHESES;      x++;    }    // base column has no significance -> remove these columns    tmpResult = new String[result.length][result[0].length - 1];    x = 0;    for (i = 0; i < result[0].length; i++) {      // significance      if (    ((i == 3) && ( getShowStdDev()))           || ((i == 2) && (!getShowStdDev())) )        continue;            for (n = 0; n < result.length; n++)        tmpResult[n][x] = result[n][i];      x++;    }    result = tmpResult;    return result;  }