public PostfixTemplatesListPanel(@NotNull List<PostfixTemplate> templates) {
    ColumnInfo[] columns = generateColumns(templates);
    ListTableModel<PostfixTemplate> templatesTableModel =
        new ListTableModel<PostfixTemplate>(columns, templates, 0);
    templatesTableModel.setSortable(true);
    myTemplatesTableView = new TableView<PostfixTemplate>();
    myTemplatesTableView.setModelAndUpdateColumns(templatesTableModel);
    myTemplatesTableView.setAutoCreateRowSorter(true);
    myTemplatesTableView.setShowGrid(false);
    myTemplatesTableView.setBorder(null);

    new TableViewSpeedSearch<PostfixTemplate>(myTemplatesTableView) {
      @Override
      protected String getItemText(@NotNull PostfixTemplate template) {
        return template.getPresentableName();
      }
    };

    myPanelWithTableView =
        ToolbarDecorator.createDecorator(myTemplatesTableView)
            .setAsUsualTopToolbar()
            .disableAddAction()
            .disableRemoveAction()
            .disableUpDownActions()
            .createPanel();
  }
 protected void showSelectedProxyInTestsTree() {
   final Collection<SMTestProxy> proxies = myStatisticsTableView.getSelection();
   if (proxies.isEmpty()) {
     return;
   }
   final SMTestProxy proxy = proxies.iterator().next();
   myStatisticsTableView.clearSelection();
   fireOnPropagateSelection(proxy);
 }
 @Override
 protected JComponent createCenterPanel() {
   final TableView<FileExtension> table = new TableView<FileExtension>(myModel);
   final Dimension preferredSize = table.getPreferredSize();
   final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(table);
   final Dimension scrollPaneSize = scrollPane.getPreferredSize();
   scrollPaneSize.width = preferredSize.width;
   scrollPane.setPreferredSize(scrollPaneSize);
   return scrollPane;
 }
  public StatisticsPanel(final Project project, final TestFrameworkRunningModel model) {
    myProject = project;
    myTableModel = new StatisticsTableModel();
    myStatisticsTableView.setModelAndUpdateColumns(myTableModel);
    myFrameworkRunningModel = model;

    final Runnable gotoSuiteOrParentAction = createGotoSuiteOrParentAction();
    new DoubleClickListener() {
      @Override
      protected boolean onDoubleClick(MouseEvent e) {
        gotoSuiteOrParentAction.run();
        return true;
      }
    }.installOn(myStatisticsTableView);

    // Fire selection changed and move focus on SHIFT+ENTER
    final KeyStroke shiftEnterKey =
        KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, InputEvent.SHIFT_MASK);
    SMRunnerUtil.registerAsAction(
        shiftEnterKey,
        "select-test-proxy-in-test-view",
        new Runnable() {
          public void run() {
            showSelectedProxyInTestsTree();
          }
        },
        myStatisticsTableView);

    // Expand selected or go to parent on ENTER
    final KeyStroke enterKey = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0);
    SMRunnerUtil.registerAsAction(
        enterKey, "go-to-selected-suite-or-parent", gotoSuiteOrParentAction, myStatisticsTableView);
    // Contex menu in Table
    PopupHandler.installPopupHandler(
        myStatisticsTableView, IdeActions.GROUP_TESTTREE_POPUP, ActionPlaces.TESTTREE_VIEW_POPUP);
    // set this statistic tab as dataprovider for test's table view
    DataManager.registerDataProvider(myStatisticsTableView, this);
  }
 public void setEnabled(boolean enabled) {
   myTemplatesTableView.setEnabled(enabled);
 }
 public void selectTemplate(@NotNull PostfixTemplate template) {
   myTemplatesTableView.setSelection(Arrays.asList(template));
 }
 @Nullable
 protected SMTestProxy getSelectedItem() {
   return myStatisticsTableView.getSelectedObject();
 }