// get builds info
ConfigResults configResults = this.results[i];
this.areas[i] = new BarGraphArea(configResults);
BarGraphArea graphArea = this.areas[i];
BuildResults currentBuildResults = configResults.getCurrentBuildResults();
double currentValue = currentBuildResults.getValue();
double currentError = currentBuildResults.getError();
double error = configResults.getError();
boolean singleTest = Double.isNaN(error);
boolean isSignificant = singleTest || error < Utils.STANDARD_ERROR_THRESHOLD;
boolean isCommented = currentBuildResults.getComment() != null;
BuildResults baselineBuildResults = configResults.getBaselineBuildResults();
double baselineValue = baselineBuildResults.getValue();
double baselineError = baselineBuildResults.getError();
// draw baseline build bar
Color whiteref = (Color) this.resources.get("whiteref");
if (whiteref == null) {
whiteref = new Color(DEFAULT_DISPLAY, 240, 240, 248);
this.resources.put("whiteref", whiteref);
}
this.gc.setBackground(whiteref);
double baselineGraphValue = kind == TIME_LOG ? Math.log(baselineValue) : baselineValue;
int baselineBarLength= (int) (baselineGraphValue / max * this.graphWidth);
int baselineErrorLength= (int) (baselineError / max * this.graphWidth / 2);
int labelxpos = MARGIN + baselineBarLength;
if (kind == TIME_LOG || baselineErrorLength <= 1) {
this.gc.fillRectangle(MARGIN, y + (GAP/2), baselineBarLength, BAR_HEIGHT);
Rectangle rec = new Rectangle(MARGIN, y + (GAP/2), baselineBarLength, BAR_HEIGHT);
this.gc.drawRectangle(rec);
graphArea.addArea(rec, "Time for baseline build "+baselineBuildResults.getName()+": "+Util.timeString((long)baselineValue));
} else {
int wr = baselineBarLength - baselineErrorLength;
Rectangle recValue = new Rectangle(MARGIN, y + (GAP/2), wr, BAR_HEIGHT);
this.gc.fillRectangle(recValue);
this.gc.setBackground(YELLOW);
Rectangle recError = new Rectangle(MARGIN+wr, y + (GAP/2), baselineErrorLength*2, BAR_HEIGHT);
this.gc.fillRectangle(recError);
Rectangle rec = new Rectangle(MARGIN, y + (GAP/2), baselineBarLength+baselineErrorLength, BAR_HEIGHT);
this.gc.drawRectangle(rec);
StringBuffer tooltip = new StringBuffer("Time for baseline build ");
tooltip.append(baselineBuildResults.getName());
tooltip.append(": ");
tooltip.append(Util.timeString((long)baselineValue));
tooltip.append(" [±");
tooltip.append(Util.timeString((long)baselineError));
tooltip.append(']');