public int selectByMouse(int index, int method) {
		if (index != -1) {
			if (mAnchor >= 0 && (method & MOUSE_EXTEND) == MOUSE_EXTEND) {
				select(mAnchor, index, true);
			} else if ((method & MOUSE_FLIP) == MOUSE_FLIP) {
				if (isSelected(index)) {
					deselect(index);
				} else {
					select(index, true);
				}
			} else if (!isSelected(index)) {
				select(index, false);
			} else if (getCount() != 1) {
				// Index was selected prior to this... note
				// that it might be eligible for becoming
				// the sole selection if it wasn't already
				return index;
			}
		} else {
			deselect();
		}
		return -1;
	}