getRowPositionByY(y) is not returning correct row position when the table is scrolled down [message #1006658] |
Fri, 01 February 2013 05:47  |
Eclipse User |
|
|
|
I have extended the class TreeLayer and implemented the function getConfigLabelsByPosition(int columnPosition, int rowPosition). The implementation of the function getRegionLabelsByXY(int x, int y) I have done as below:
public LabelStack getRegionLabelsByXY(int x, int y) {
int columnPositionByX = getColumnPositionByX(x);
int rowPositionByY = getRowPositionByY(y);
return getConfigLabelsByPosition(columnPositionByX, rowPositionByY);
}
Since it is returning the wrong value in getRowPositionByX() when the table is scrolled down, therefore it is attaching wrong labels to the cell and hence my code breaks. Could you tell me a way out of it.
Thanks,
Karishma.
[Updated on: Fri, 01 February 2013 05:52] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: getRowPositionByY(y) is not returning correct row position when the table is scrolled down [message #1007119 is a reply to message #1007102] |
Mon, 04 February 2013 09:26  |
Eclipse User |
|
|
|
Seems I missunderstood your requirement. The MouseEventMatcher only checks the region labels and no cell labels. So it gets activated for a click in a region.
I think what you really need is to register a custom MouseEventMatcher. If this one is evaluating the labels or directly evaluates your business logic should be not important. And with this matcher you need to register your custom action. For this have a look at the DefaultEditBindings.
As I don't know what different behaviour for different checkboxes could be, another solution could be to trigger that behaviour within the IDataProvider.
|
|
|
Powered by
FUDForum. Page generated in 0.05631 seconds