private void findAndSelectInTable(final SMTestProxy proxy) { SMRunnerUtil.addToInvokeLater( new Runnable() { public void run() { final int rowIndex = myTableModel.getIndexOf(proxy); if (rowIndex >= 0) { myStatisticsTableView.setRowSelectionInterval(rowIndex, rowIndex); } } }); }
/** Selects row in table */ protected void selectRowOf(final SMTestProxy proxy) { SMRunnerUtil.addToInvokeLater( new Runnable() { public void run() { final int rowIndex = myTableModel.getIndexOf(proxy); myStatisticsTableView.setRowSelectionInterval(rowIndex, rowIndex >= 0 ? rowIndex : 0); // Scroll to visible TableUtil.scrollSelectionToVisible(myStatisticsTableView); } }); }
/** * Selects row in table * * @param rowIndex Row's index */ protected void selectRow(final int rowIndex) { SMRunnerUtil.addToInvokeLater( new Runnable() { public void run() { // updates model myStatisticsTableView.setRowSelectionInterval(rowIndex, rowIndex); // Scroll to visible TableUtil.scrollSelectionToVisible(myStatisticsTableView); } }); }
public void selectProxy( @Nullable final SMTestProxy selectedTestProxy, @NotNull final Object sender, final boolean requestFocus) { SMRunnerUtil.addToInvokeLater( new Runnable() { public void run() { // Select tab if focus was requested if (requestFocus) { IdeFocusManager.getInstance(myProject).requestFocus(myStatisticsTableView, true); } // Select proxy in table selectProxy(selectedTestProxy); } }); }