Beispiel #1
0
  public UnitTestViewComponent(
      Project project,
      ConsoleView console,
      TestRunState testRunState,
      _FunctionTypes._void_P0_E0 closeListener) {
    myProject = project;
    myTestState = testRunState;
    StatisticsTableModel statisticsModel = new StatisticsTableModel(myTestState);

    myTreeComponent = new TestTree(myTestState, ProjectHelper.toMPSProject(project), this);
    myTestNavigator = new FailedTestOccurrenceNavigator(myTreeComponent);
    myActionToolComponent = new TestToolbarPanel(myTreeComponent, myTestNavigator);

    JComponent leftPanel = createTreeComponent(myActionToolComponent, myTreeComponent);

    myProgressLineComponent = new ProgressLine(myTestState);
    myProgressLineComponent.setMinimumSize(
        new Dimension(0, myProgressLineComponent.getMinimumSize().height));
    myOutputComponent = new TestOutputComponent(myProject, this, console, myTestState);
    myTreeComponent.addTreeSelectionListener(
        new TestTreeSelectionListener(myTreeComponent, statisticsModel, myOutputComponent));
    myTreeComponent.addMouseListener(
        new TestTreeRootMouseListener(myTreeComponent, statisticsModel, myOutputComponent));

    JPanel rightPanel =
        createOutputComponent(
            console, myProgressLineComponent, myOutputComponent.getComponent(), statisticsModel);

    Splitter splitter = new Splitter(false);
    initSplitterProportion(splitter, 0.2f, "tree");
    splitter.setFirstComponent(leftPanel);
    splitter.setSecondComponent(rightPanel);
    setLayout(new BorderLayout());

    add(splitter, BorderLayout.CENTER);

    myTestState.addView(myTreeComponent);
    myTestState.addView(myProgressLineComponent);
    myTestState.addView(myOutputComponent);
    addCloseListener(closeListener);
  }
Beispiel #2
0
 public ProcessListener getProcessListener() {
   return myProgressLineComponent.getProcessListener();
 }