boolean (@NotNull MouseEvent e) { final TreePath path = myResultList.getPathForLocation(e.getX(), e.getY()); if (path != null && myResultList.isPathSelected(path)) { Object sel = path.getLastPathComponent(); if (sel != null && myResultList.getModel().isLeaf(sel)) { myListener.itemSelected(); return true; } } return false; }