Den 08.06.2011 16:02, skrev Greg Brown:
Well, of course I can't force you to use the renderer approach. ;-) But I'm curious to know why you think calling a single method is more work than creating an offscreen buffer and painting a clipped, translated view of a tree view into it.
The renderer is what actually paints the node content, so you're basically 
indirectly doing the same thing with your current approach, only with more 
steps.
OK, I tried :)

TreeViewNodeRenderer renderer = (TreeViewNodeRenderer) getNodeRenderer();
            TreeNode node = (TreeNode) getSelectedNode();
            Sequence.Tree.Path path = getSelectedPath();
renderer.render(node, path, getRowIndex(path), PageTreeView.this, isBranchExpanded(path), isNodeSelected(path), getNodeCheckState(path), true, false);
            return renderer;

This paints the wrong node (two nodes higher). I tried creating a new TreeViewNodeRenderer, but then it paints nothing. Please advice :)

-- Edvin

Reply via email to