pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Bartlett <cbartlet...@googlemail.com>
Subject Re: trasversing a TreeView
Date Wed, 30 Jun 2010 16:34:43 GMT
Would this help?
org.apache.pivot.collections.Sequence.Tree.depthFirstIterator(Sequence<T>
sequence)

It is in use here in the 'Event Log' at the bottom of the screen (to
check/uncheck child nodes)
http://pivot.apache.org/demos/component-explorer.html

Source code here
http://svn.apache.org/repos/asf/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/EventLoggerSkin.java

Chris

On Wed, Jun 30, 2010 at 11:16 PM, Martin Jimenez-Salazar <
excalibur506@gmail.com> wrote:

> I started developing with pivot recently, and very enthusiastic about it!
>
> What the best way to check/uncheck all children descendand of a node base
> upon the selection of the parent, e.g. if the parent is selected then all
> the descendans should be too.
>
> so far I have -
>
>         mant_tree.getTreeViewNodeStateListeners().add(new
> TreeViewNodeStateListener() {
>             @Override
>             public void nodeCheckStateChanged(TreeView tree,
> Sequence.Tree.Path path, TreeView.NodeCheckState previousCheckState) {
>                 check_or_uncheck_tree(path, tree.getNodeCheckState(path));
>             }
>         });
>
>

Mime
View raw message