Skip to main content



      Home
Home » Eclipse Projects » NatTable » Bug in CellPainterDecorator
Bug in CellPainterDecorator [message #1018745] Thu, 14 March 2013 07:57 Go to next message
Eclipse UserFriend
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.
Re: Bug in CellPainterDecorator [message #1018758 is a reply to message #1018745] Thu, 14 March 2013 08:24 Go to previous messageGo to next message
Eclipse UserFriend
Sounds reasonable ... have you tested this fix locally or do you have some example to verify that this fixes your issue?
Re: Bug in CellPainterDecorator [message #1018796 is a reply to message #1018758] Thu, 14 March 2013 09:37 Go to previous messageGo to next message
Eclipse UserFriend
Yes.. After changing the code to

Rectangle baseCellPainterBounds = this.paintDecorationDependent ?
getBaseCellPainterBounds(cell, gc, adjustedCellBounds, configRegistry) : adjustedCellBounds;

in getCellPainterAt() method, its working as expected in the table which i am working on.
Re: Bug in CellPainterDecorator [message #1018836 is a reply to message #1018796] Thu, 14 March 2013 10:54 Go to previous message
Eclipse UserFriend
I created a ticket for this and fixed it right away in master.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=403349

Thanks for reporting and validating
Previous Topic:Hyperlinks in cells
Next Topic:Bug in VerticalTextPainter.paintCell()
Goto Forum:
  


Current Time: Wed Jul 23 13:14:51 EDT 2025

Powered by FUDForum. Page generated in 0.05680 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top