Edvin,

I'm not totally sure that I understand your problem, but the following might
help.

The root nodes of a TreeView are simply the elements of the List that the
TreeView uses as its data model which is accessible via
treeView.getTreeData();

If you are looking to treat the root nodes in the same way as any other
node, I think you should be able to use a TreeBranch as the root node (as it
implements org.apache.pivot.collections.List<TreeNode>). This assumes that
you are using the provided org.apache.pivot.wtk.content.TreeBranch and
org.apache.pivot.wtk.content.TreeNode classes rather than custom ones.

Chris

On 7 June 2011 14:17, Edvin Syse <[email protected]> wrote:

> Updating a node that has a parent, even changing it from a TreeNode to a
> BranchNode is trivial via det node.getParent().update() method. But when a
> node is at the root of the hierarchy, I don't have a parent to call update
> on. I guess I need to invoke some listener on the TreeView itselv, but how?
> :)
>
> -- Edvin
>

Reply via email to