Class CustomTestResultViewer

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public abstract class CustomTestResultViewer extends JPanel
Base class defines custom viewers for test results. For example custom viewers can be used for representation of test benchmark.
See Also:
  • Constructor Details

    • CustomTestResultViewer

      public CustomTestResultViewer()
  • Method Details

    • setResult

      public abstract void setResult(TestResult currTestResult)
      This method is called by the harness and it indicates to the viewer that it should check the given TestResult object for changes.
      There can be three possible cases:
      • TestResult is a different test, therefore the viewer should fully update the panel
      • TestResult is the current test, the viewer should check the result for updates
      • TestResult is null. There is no selected test.
      Parameters:
      currTestResult - Test result object which should be rendered in this panel immediately. May or may not be the one currently displayed.
    • getTitle

      public abstract String getTitle()
      Returns the name of this CustomTestResultViewer.
      Returns:
      title for the viewer. Return value can't be null or empty String
    • getDescription

      public abstract String getDescription()
      Returns the description of the current CustomTestResultViewer. Get the long description of this CustomTestResultViewer's purpose. May be multiple sentences if desired. The return value should be localized.
      Returns:
      description for the viewer. Return value can't be null or empty String
    • isViewerVisible

      public boolean isViewerVisible()
      Determines whether this viewer should be visible when its parent is visible
      Returns:
      true if the viewer is visible, false otherwise
    • setViewerVisible

      public void setViewerVisible(boolean aFlag)
      Makes the viewer visible or invisible.
      Parameters:
      aFlag - true to make the viewer visible; false to make it invisible
    • onCangedTestResult

      public void onCangedTestResult(TestResult newTR, boolean isActive)
      This method is called when a new test from the test tree is selected by user. It does nothing by default. Subclasses might override this method, e.g. to change the TestResult object to observe upon.
      Parameters:
      newTR - is a TestResult object for selected test.
      isActive - true if this CustomTestResultViewer is currently selected otherwise false