Bug PaddingDecorator? [message #1042558] |
Tue, 16 April 2013 15:17 |
|
Hi,
I'm using NatTable as a table which is able to display a TreeList. Therefore i used a configuration which is based on the tree example, with the difference, that i wrapped the TreeImagePainter within a PaddingDecorator with a left padding of 5px. The reason for this was, that i thought it would be nicer if the '+' of the tree is not painted directly at the left column border. With this setup i noticed, that clicking the '+' does not expand the tree anymore. Instead, i have to click where the '+' would have been without the padding. After debugging I found out that the PaddingDecorator does not override 'getWrappedPainterBounds()' and thus is not able to determine the clicked TreeImagePainter. I 'fixed' this in my implementation by overriding the method and calling 'getInteriorBounds()' and i was wondering if this is correct or it might have some unexpected side effects...
Regards, Ralf
final PaddingDecorator paddingDecorator = new PaddingDecorator(indentedTreeImagePainter, 0, 0, 0, 5) {
@Override
public Rectangle getWrappedPainterBounds(ILayerCell cell, GC gc, Rectangle bounds, IConfigRegistry configRegistry) {
return getInteriorBounds(bounds);
}
};
|
|
|
|
Re: Bug PaddingDecorator? [message #1043073 is a reply to message #1043045] |
Wed, 17 April 2013 08:32 |
|
Hi Dirk,
thanks a lot for the quick reply and for the even quicker fix!
Sorry about the topic headline. I wasn't quite sure if this was really a problem, or if there was something wrong in how i use the decorator (hence the question mark at the end). And since I'm pretty new as a NatTable user, i didn't want to file a bugzilla report for a issue that i was not completely sure about being a bug
Ralf
|
|
|
|
Powered by
FUDForum. Page generated in 0.02539 seconds