示例#1
0
  public void setTable(DIST distType, double[] parms, int xMin, int xMax) {

    setIniting(true);

    this.setTableModel(distType, parms, xMin, xMax);

    statTable.setStatTable(xMax - xMin + 1, null, 2, getColumnNames());

    DefaultTableModel model = statTable.getModel();
    int x = xMin;
    int row = 0;

    // set the table model with the prob. values for this distribution
    double prob;
    while (x <= xMax) {

      model.setValueAt("" + x, row, 0);
      if (distType != null) {
        prob = getProbManager().probability(x, parms, distType, isCumulative());
        model.setValueAt("" + getProbCalc().format(prob), row, 1);
      }
      x++;
      row++;
    }

    updateFonts(((AppD) getApp()).getPlainFont());

    // need to get focus so that the table will finish resizing columns (not
    // sure why)
    statTable.getTable().requestFocus();
    setIniting(false);
  }