I was wondering what would be the correct way to draw a rect on the bounds of a TreeViewItem (only the rect outline)
with setDrawsInLeftMargin to true.
paintBackgroundAndSelection is called without the x and y, and using the graphics local bounds could be wrong if for example
the treeview item is redrawn partially because of some tooltip.
You won't notice the issue if only using fillAll for a solid colored background, but trying to only use a drawRect will exhibits the issue.
So far I've been using
g.drawRect(g.getClipBounds().getX(), 0, width - g.getClipBounds().getX(), height);
but this won't work with partial redraws.
Any idea ?