public void mouseReleased(MouseEvent e) { if (e.isConsumed()) { return; } if (!_list.isCheckBoxEnabled()) { return; } if (!_list.isClickInCheckBoxOnly() || clicksInCheckBox(e)) { e.consume(); } }
public void mousePressed(MouseEvent e) { if (e.isConsumed()) { return; } if (!_list.isCheckBoxEnabled()) { return; } if (!_list.isClickInCheckBoxOnly() || clicksInCheckBox(e)) { int index = _list.locationToIndex(e.getPoint()); toggleSelection(index); e.consume(); } }