question: private void selectClicked ( MouseEvent e , boolean onlyOutside ) { int index = locationToIndex ( e . getPoint ( ) ) ; Rectangle bounds = getCellBounds ( index , index ) ; if ( bounds != null && bounds . contains ( e . getPoint ( ) ) ) { if ( ! onlyOutside ) { if ( isSelectedIndex ( index ) ) { addSelectionInterval ( index , index ) ; } else { setSelectedIndex ( index ) ; } } } else { clearSelection ( ) ; } }
target:  Adds selection of the clicked element, or removes selection if no element was clicked.