Keystrokes on folder list.

This commit is contained in:
Jindra Petřík
2022-12-28 21:18:08 +01:00
parent 571128ab0a
commit f5bee6b8d9
2 changed files with 19 additions and 1 deletions

View File

@@ -122,6 +122,7 @@ public class FolderListPanel extends JPanel {
@Override
public void mousePressed(MouseEvent e) {
requestFocusInWindow();
int width = getWidth();
int cols = width / CELL_WIDTH;
@@ -165,6 +166,7 @@ public class FolderListPanel extends JPanel {
repaint();
}
});
setFocusable(true);
}
public synchronized void setItems(TreePath parentPath, List<TreeItem> items) {
@@ -174,7 +176,7 @@ public class FolderListPanel extends JPanel {
repaint();
selectedItems.clear();
selectedIndex = -1;
((JScrollPane)getParent().getParent()).getVerticalScrollBar().setValue(0);
((JScrollPane)getParent().getParent()).getVerticalScrollBar().setValue(0);
}
public void clear() {