LeO - 2008-01-21

Logged In: YES
user_id=703323
Originator: YES

The above patch is unfortunately NOT correct :( (Did not cover all situations.)

Retesting and changing to work brings the following code:

********
public Point getCellForCoordinates(int x, int y) {
Point cell = super.getCellForCoordinates(x, y);
if (cell.x < getFixedColumnCount()) {
return getValidCell(cell.x, cell.y);
} else {
int width = 0;
/* count the width for the fixed cells */
for (int i = 0; width < x && i<= m_Model.getFixedSelectableColumnCount(); i++) {
if (i >= m_Model.getColumnCount())
return new Point(-1, -1);
width += getColumnWidth(i);
if (x < width)
cell.x = i;

}
/* count the width for the non-fixed cells */
for (int i = m_LeftColumn; width < x; i++) {
if (i >= m_Model.getColumnCount())
return new Point(-1, -1);
width += getColumnWidth(i);
if (x < width)
cell.x = i;

}
return getValidCell(cell.x,
cell.y);
}
}

************

Note:

Point cell = super.getCellForCoordinates(x, y);

is required to have the cell.y set, which is done in the Table with getRowForY(y); which is private. Which make the patching either by subclassing your own KTable OR replace the Method.

BTW: Now it works correct, without any problems about the Borders.