TableScrollingUtil is deprecated. Use ScrollingUtil

This commit is contained in:
Konstantin Bulenkov
2015-08-17 15:14:34 +02:00
parent d4434da689
commit 87e1ab64e7
@@ -259,7 +259,7 @@ public class ShowUsagesAction extends AnAction implements PopupAction {
addUsageNodes(usageView.getRoot(), usageView, new ArrayList<UsageNode>());
TableScrollingUtil.installActions(table);
ScrollingUtil.installActions(table);
final List<UsageNode> data = collectData(usages, visibleNodes, usageView, presentation);
setTableModel(table, usageView, data, outOfScopeUsages, options.searchScope);
@@ -1008,13 +1008,13 @@ public class ShowUsagesAction extends AnAction implements PopupAction {
int newSelection = updateModel(tableModel, existingData, data, row == -1 ? 0 : row);
if (newSelection < 0 || newSelection >= tableModel.getRowCount()) {
TableScrollingUtil.ensureSelectionExists(table);
ScrollingUtil.ensureSelectionExists(table);
newSelection = table.getSelectedRow();
}
else {
table.getSelectionModel().setSelectionInterval(newSelection, newSelection);
}
TableScrollingUtil.ensureIndexIsVisible(table, newSelection, 0);
ScrollingUtil.ensureIndexIsVisible(table, newSelection, 0);
if (popup != null) {
setSizeAndDimensions(table, popup, popupPosition, data);
@@ -1059,7 +1059,7 @@ public class ShowUsagesAction extends AnAction implements PopupAction {
Dimension dimension = new Dimension(newWidth, table.getRowHeight() * rowsToShow);
Rectangle rectangle = fitToScreen(dimension, popupPosition, table);
if (!data.isEmpty()) {
TableScrollingUtil.ensureSelectionExists(table);
ScrollingUtil.ensureSelectionExists(table);
}
table.setSize(rectangle.getSize());
//table.setPreferredSize(dimension);
@@ -1184,7 +1184,7 @@ public class ShowUsagesAction extends AnAction implements PopupAction {
private static class MyTable extends JBTableWithHintProvider implements DataProvider {
public MyTable() {
TableScrollingUtil.installActions(this);
ScrollingUtil.installActions(this);
}
@Override