/** * Checks if the mouse event happens for the tree path. * * @param e the mouse event * @param path the tree path * @return true if the mouse event need change the state of the tree node. Otherwise false. */ protected boolean clicksInCheckBox(MouseEvent e, TreePath path) { if (!_tree.isCheckBoxVisible(path)) { return false; } else { Rectangle bounds = _tree.getPathBounds(path); if (_tree.getComponentOrientation().isLeftToRight()) { return e.getX() < bounds.x + _hotspot; } else { return e.getX() > bounds.x + bounds.width - _hotspot; } } }
continue; TreePath childPath = parent.pathByAddingChild(childNode); if (_tree != null && !_tree.isCheckBoxVisible(childPath)) {
if (_tree.isCheckBoxVisible(path) && allChildrenSelected) { addSelectionPaths(new TreePath[]{path}, false);
setBorder(border); treeCellRendererComponent.setBorder(BorderFactory.createEmptyBorder()); if (path == null || !(tree instanceof CheckBoxTree) || ((CheckBoxTree) tree).isCheckBoxVisible(path)) { remove(_emptyBox); add(_checkBox, BorderLayout.BEFORE_LINE_BEGINS);