Re: BeanTreeView and duplicated Node

Tim Boudreau <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <CA+qecROGwwD1yWXEMP6-Qw1NDsYPsVoMa4PQaBJ2X=eCsLrS4A@mail.gmail.com>
You want FilterNode:

new FilterNode (originalNode);

A node can only have one parent (you can display the node in as many UI
components as you want, which is what Geertjan referred you to).
FilterNode lets you make a node that's a wrapper for the original but can
belong to a different parent (and override whatever attributes of the
original you want - different children, name, icon, properties, context
menu items - whatever).  If you just create a new FilterNode over an
existing node, you get something that walks and talks exactly like the
original, but belongs to a different parent.

-Tim


On Mon, Mar 7, 2016 at 6:24 AM, rsobies <[email protected]> wrote:

> hello
> let's say i want to display list of user groups and users.
> a user can be a member of more then one group.
> is there a nice solution to display the same Node twice in two different
> groups?
> i tried to pass the same reference during creation of children but i got
> exception that threre is already owner of the Node.
>
> best ragards
> radek
>
>
>
>
>


-- 
http://timboudreau.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.