pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roger L. Whitcomb" <Roger.Whitc...@actian.com>
Subject RE: IndexOutOfBoundException in TableView when Highlight is set to true
Date Tue, 05 Mar 2013 18:13:40 GMT
> Roger (and all others :-) ) what do you think ?

Looks to me like the code in "getRowAt" should look like this, to make
the fixed and variable height cases work the same way:
        int rowIndex;
        if (variableRowHeight) {
            if (y == 0) {
                rowIndex = 0;
            } else {
                rowIndex = ArrayList.binarySearch(rowBoundaries, y);
                if (rowIndex < 0) {
                    rowIndex = -1;
                }
            }
        } else {
            rowIndex = (y / (fixedRowHeight + 1));

            List<Object> tableData =
(List<Object>)tableView.getTableData();
            if (rowIndex >= tableData.getLength()) {
                rowIndex = -1;
            }
        }

> And maybe then the same even in the getColumnAt() method ...

I think "getColumnAt" is okay as-is.

~Roger

Mime
View raw message