public void reset() { fProgressX= 1; fProgress= 0; fError= false; paint(getGraphics()); }
public void paint(Graphics g) { paintBackground(g); paintStatus(g); }
public void paintStatus(Graphics g) { g.setColor(getStatusColor()); Rectangle r= new Rectangle(0, 0, fProgressX, getBounds().height); g.fillRect(1, 1, r.width-1, r.height-2); }
public void start(int total) { fTotal= total; reset(); }
public int scale(int value) { if (fTotal > 0) return Math.max(1, value*(getBounds().width-1)/fTotal); return value; }
fProgressIndicator= new ProgressBar();
protected void reset() { setLabelValue(fNumberOfErrors, 0); setLabelValue(fNumberOfFailures, 0); setLabelValue(fNumberOfRuns, 0); fProgressIndicator.reset(); fRerunButton.setEnabled(false); fFailureList.removeAll(); fExceptions= new Vector(10); fFailedTests= new Vector(10); fTraceArea.setText(""); }
public void paintBackground(Graphics g) { g.setColor(SystemColor.control); Rectangle r= getBounds(); g.fillRect(0, 0, r.width, r.height); g.setColor(Color.darkGray); g.drawLine(0, 0, r.width-1, 0); g.drawLine(0, 0, 0, r.height-1); g.setColor(Color.white); g.drawLine(r.width-1, 0, r.width-1, r.height-1); g.drawLine(0, r.height-1, r.width-1, r.height-1); }