Bug in CellPainterDecorator [message #1018745] |
Thu, 14 March 2013 11:57 |
karishma Agarwal Messages: 28 Registered: June 2011 |
Junior Member |
|
|
I think this is a bug in CellPainterDecorator class.
public void paintCell(ILayerCell cell, GC gc, Rectangle adjustedCellBounds, IConfigRegistry configRegistry) {
Rectangle baseCellPainterBounds = this.paintDecorationDependent ?
getBaseCellPainterBounds(cell, gc, adjustedCellBounds, configRegistry) : adjustedCellBounds;
*********
}
The paintCell function considers the value of paintDecorationDependent while calculating the value of baseCellPainterBounds .
However the getCellPainterAt() method does not consider the value of paintDecorationDependent while calculation of the same.
public ICellPainter getCellPainterAt(int x, int y, ILayerCell cell, GC gc, Rectangle adjustedCellBounds, IConfigRegistry configRegistry) {
***********
} else {
Rectangle baseCellPainterBounds = getBaseCellPainterBounds(cell, gc, adjustedCellBounds, configRegistry);
***********
}
Due to this,suppose if I am combining two TreeCheckBoxPainters and passing the value of paintDecorationDependent as false, then the getCellPainterAt() method calculates the wrong bounds and hence if we click on the base checkBox, matches function in CellPainterMouseEventMatcher class returns false.
Thanks,
Karishma.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02848 seconds