if (BasicTreeUI.this.tree.isVisible(path))
if (clickCount == 2)
		public void mouseClicked(MouseEvent e)		{			Point click = e.getPoint();			int row = ((int) click.getY() / getRowHeight()) - 1;         TreePath path = BasicTreeUI.this.tree.getPathForRow(row);         if (path == null)         {            // nothing should be selected if user clicks outside of tree            BasicTreeUI.this.tree.getSelectionModel().clearSelection();            BasicTreeUI.this.tree.repaint();         }         if (BasicTreeUI.this.tree.isVisible(path))         {            if (BasicTreeUI.this.tree.isExpanded(path))            {               BasicTreeUI.this.tree.collapsePath(path);               BasicTreeUI.this.tree.fireTreeCollapsed(path);            }            else            {               BasicTreeUI.this.tree.expandPath(path);               BasicTreeUI.this.tree.fireTreeExpanded(path);            }						if (BasicTreeUI.this.tree.isRowSelected(row))				BasicTreeUI.this.tree.removeSelectionRow(row);			else if (BasicTreeUI.this.tree.getSelectionModel()                  .getSelectionMode() == TreeSelectionModel.SINGLE_TREE_SELECTION)			{				BasicTreeUI.this.tree.getSelectionModel().clearSelection();				BasicTreeUI.this.tree.addSelectionRow(row);			}			else if (BasicTreeUI.this.tree.getSelectionModel()                  .getSelectionMode() == TreeSelectionModel.CONTIGUOUS_TREE_SELECTION)			{               // TODO			}			else			{               BasicTreeUI.this.tree.getSelectionModel().setSelectionMode(                     TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);				BasicTreeUI.this.tree.addSelectionRow(row);			}		}      }