boolean (@NotNull MouseEvent e, int clickCount) { int row = myTree.getRowForLocation(e.getX(), e.getY()); if (row < 0) return false; Object o = myTree.getPathForRow(row).getLastPathComponent(); if (getTreeRoot() == o || getFile(o) == null) return false; Rectangle rowBounds = myTree.getRowBounds(row); cellRenderer.setBounds(rowBounds); Rectangle checkBounds = cellRenderer.myCheckbox.getBounds(); checkBounds.setLocation(rowBounds.getLocation()); if (checkBounds.height == 0) checkBounds.height = rowBounds.height; if (checkBounds.contains(e.getPoint())) { mySelectionManager.toggleSelection((DefaultMutableTreeNode)o); myTree.revalidate(); myTree.repaint(); } return true; }