Dendrogram collapse/expand sub-tree

19 views
Skip to first unread message

Nemanja Vukosavljevic

unread,
Apr 5, 2012, 5:10:15 AM4/5/12
to cho...@googlegroups.com
Hi to all!

First I want to thank all the people involved in this project who made it possible to use this awesome tool :)

I've implemented my own example of a dendrogram using Protovis-GWT and I have a need to collapse/expand a sub-tree by clicking on a specific node. Following the code in DendrogramExample I tried to add the event PV.Event.MOUSEDOWN on the line 61 of the class but I don't have an idea how to handle the Event.

Any advice would be helpful. Thanks in advance.

Cheers

Lars Grammel

unread,
Apr 5, 2012, 11:34:21 AM4/5/12
to cho...@googlegroups.com
You can registering a PVEventHandler to handle MOUSEDOWN:

}).event(PV.Event.MOUSEDOWN, new PVEventHandler() {
public void onEvent(Event e, String pvEventType, JsArgs args) {
// your code here
}
}

Lars

> --
> You received this message because you are subscribed to the Google Groups
> "Choosel" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/choosel/-/Sz75nGiYWBcJ.
> To post to this group, send email to cho...@googlegroups.com.
> To unsubscribe from this group, send email to
> choosel+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/choosel?hl=en.

--
Lars Grammel
PhD Candidate, The CHISEL Group, University of Victoria
http://larsgrammel.de
http://twitter.com/lgrammel

Nemanja Vukosavljevic

unread,
Apr 6, 2012, 4:01:06 AM4/6/12
to cho...@googlegroups.com
Thanks for the response. In the end I did the similar thing but with registering PVEventHandler to handle DOUBLE_CLICK similar to the Force Toggle Test.

Nemanja


On Thursday, April 5, 2012 5:34:21 PM UTC+2, Lars Grammel wrote:
You can registering a PVEventHandler to handle MOUSEDOWN:

       }).event(PV.Event.MOUSEDOWN, new PVEventHandler() {
            public void onEvent(Event e, String pvEventType, JsArgs args) {
               // your code here
            }
       }

Lars

On Thu, Apr 5, 2012 at 02:10, Nemanja Vukosavljevic <nema...@gmail.com> wrote:
> Hi to all!
>
> First I want to thank all the people involved in this project who made it
> possible to use this awesome tool :)
>
> I've implemented my own example of a dendrogram using Protovis-GWT and I
> have a need to collapse/expand a sub-tree by clicking on a specific node.
> Following the code in DendrogramExample I tried to add the event
> PV.Event.MOUSEDOWN on the line 61 of the class but I don't have an idea how
> to handle the Event.
>
> Any advice would be helpful. Thanks in advance.
>
> Cheers
>
> --
> You received this message because you are subscribed to the Google Groups
> "Choosel" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/choosel/-/Sz75nGiYWBcJ.
> To post to this group, send email to cho...@googlegroups.com.
> To unsubscribe from this group, send email to

> choosel+unsubscribe@googlegroups.com.


> For more options, visit this group at
> http://groups.google.com/group/choosel?hl=en.

Reply all
Reply to author
Forward
0 new messages