Page 1 of 1

Expand/Collapse Tree

PostPosted: Mon Dec 03, 2018 8:14 pm
by lucdep
Hello,

Is there a method to expand/collapse a tree structure or part of a tree structure (eg down the selected node)?

Thanks for your help.

Luc Depuydt

Re: Expand/Collapse Tree

PostPosted: Tue Dec 04, 2018 1:16 pm
by Support@SIB
Do you have a self-joined tree?

You could use, e.g:

Syntax: [ Download ] [ Hide ]
Object oSearch = rowSearch.getValue("PROGRAM");

DataBookUtil.searchAndSelectRow(rdbMenu,
                                new Equals("PROGRAM", oSearch).or(
                                    new Equals("PROGRAMNUMBER", oSearch)))
 

Re: Expand/Collapse Tree

PostPosted: Tue Dec 04, 2018 4:59 pm
by lucdep
Hi,

Yes, I have a self joined table and filling the tree goes fine.
My problem is when I populate the tree component, the data tree is completely collapsed to the root. I would like to have a button with which the user can expand or open the tree completely to the last child, instead of having to click all the nodes one by one now. I know Windows tree object have such a method that can be invoked, but it is not clear if Swing/Vaadin components support this as well.

Re: Expand/Collapse Tree

PostPosted: Mon Jan 07, 2019 4:27 pm
by lucdep
Hi,

I would like to come back to this unsolved question. Does the Tree object have Expand and Collapse methods that can be used from within the code?

It seems that expandig/collapsing a tree in VisionX/JVx is only implemented for clicking physically with the mouse on a node, but I need expanding/collapsing from within the code. As far as I can see the Vaadin and Swing objects do have the methods. How can I use them?

Regards,,

Luc

Re: Expand/Collapse Tree

PostPosted: Tue Jan 08, 2019 10:28 pm
by rjahn
The UI concept is documented very well: Resource and UI Resource.

This should explain how you can use the technology dependent object. But be careful to keep the technology independence!