protected CounterPanel createCounterPanel() { return new CounterPanel(); }
public void addToGrid(Component comp, int gridx, int gridy, int gridwidth, int gridheight, double weightx, double weighty, int anchor, int fill, Insets insets) { GridBagConstraints constraints= new GridBagConstraints(); constraints.gridx= gridx; constraints.gridy= gridy; constraints.gridwidth= gridwidth; constraints.gridheight= gridheight; constraints.weightx= weightx; constraints.weighty= weighty; constraints.anchor= anchor; constraints.fill= fill; constraints.insets= insets; add(comp, constraints); }
public void reset() { setLabelValue(fNumberOfErrors, 0); setLabelValue(fNumberOfFailures, 0); setLabelValue(fNumberOfRuns, 0); fTotal= 0; }
public CounterPanel() { super(new GridBagLayout()); fNumberOfErrors= createOutputField(5); fNumberOfFailures= createOutputField(5); fNumberOfRuns= createOutputField(9); addToGrid(new JLabel("Runs:", SwingConstants.CENTER), 0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0)); addToGrid(fNumberOfRuns, 1, 0, 1, 1, 0.33, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 8, 0, 0)); addToGrid(new JLabel("Errors:", fErrorIcon, SwingConstants.LEFT), 2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 8, 0, 0)); addToGrid(fNumberOfErrors, 3, 0, 1, 1, 0.33, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 8, 0, 0)); addToGrid(new JLabel("Failures:", fFailureIcon, SwingConstants.LEFT), 4, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 8, 0, 0)); addToGrid(fNumberOfFailures, 5, 0, 1, 1, 0.33, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 8, 0, 0)); }
public void run() { switch (status) { case TestRunListener.STATUS_ERROR: fCounterPanel.setErrorValue(fTestResult.errorCount()); appendFailure(test, t); break; case TestRunListener.STATUS_FAILURE: fCounterPanel.setFailureValue(fTestResult.failureCount()); appendFailure(test, t); break; } } }
public void run() { int total= test.countTestCases(); fProgressIndicator.start(total); fCounterPanel.setTotal(total); } }
protected void reset() { fCounterPanel.reset(); fProgressIndicator.reset(); fRerunButton.setEnabled(false); fFailureView.clear(); fFailures.clear(); }
public void run() { if (fTestResult != null) { fCounterPanel.setRunValue(fTestResult.runCount()); fProgressIndicator.step(fTestResult.runCount(), fTestResult.wasSuccessful()); } } }
public void setFailureValue(int value) { setLabelValue(fNumberOfFailures, value); }
public void setErrorValue(int value) { setLabelValue(fNumberOfErrors, value); }