mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
TableScrollingUtil is deprecated. Use ScrollingUtil
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user