refreshData();
}
}
private void updateStatistics(boolean complete){
SampleStatistics stat = sop.getStatistics();
if (stat == null) {
// statistics are not ready yet.
return;
}
fieldMean.setText(decimalFormat.format(stat.getMean()));
fieldStanDev.setText(decimalFormat.format(stat.getStandardDeviation()));
fieldMoment4.setText(decimalFormat.format(stat.getMoment4()));
fieldMoment3.setText(decimalFormat.format(stat.getMoment3()));
fieldMoment2.setText(decimalFormat.format(stat.getMoment2()));
fieldMoment1.setText(decimalFormat.format(stat.getMean()));
fieldSkew.setText(decimalFormat.format(stat.getSkew()));
fieldCoefVar.setText(decimalFormat.format(stat.getCoefficienfOfVariation()));
fieldVar.setText(decimalFormat.format(stat.getVariance()));
fieldKur.setText(decimalFormat.format(stat.getKurtosis()));
fieldMin.setText(decimalFormat.format(stat.getMin()));
fieldMax.setText(decimalFormat.format(stat.getMax()));
// Set meaningful initial values for option fields.
if (complete) {
if (isEmpty(minValue.getText())) {
minValue.setText(decimalFormat.format(stat.getMin()));
}
if (isEmpty(maxValue.getText())) {
maxValue.setText(decimalFormat.format(stat.getMax()));
}
if (isEmpty(firstSample.getText())) {
firstSample.setText(String.valueOf(measureDefinition.getDiscardedSamples(measureIndex)+1));
}
if (isEmpty(lastSample.getText())) {