private void changeDataField(final int row, final int col, final boolean check) {
        if (row < 0 || row >= rows.length || col < 0 || col >= cols.length) {
            return;
        }
        if (data[row][col] == check) {
            return;
        }
        data[row][col] = check;
        cntRow[row] += check ? 1 : -1;
        cntCol[col] += check ? 1 : -1;
        cntAll += check ? 1 : -1;

        cbData[row][col].setChecked(check);
    }
(re-)initializes the matrix with given data. Matrix data is deleted in the process
main/src/main/java/cgeo/geocaching/ui/CheckboxMatrixView.java