I found this option that appears to work.  I am able to get the title
of the item that I set and then I can compare it and display the panel
that I want.

If there is a better way please let me know.

Thanks,
Doug

    slotTree.addSelectionHandler(new SelectionHandler(){
        @Override
        public void onSelection(SelectionEvent event) {
                TreeItem temp = (TreeItem) event.getSelectedItem();
        }});



On May 29, 3:01 pm, Doug <[email protected]> wrote:
> Good Afternoon,
>
> For items in a tree how do you determine what tree item was clicked
> on?  I have a tree that I am using like a menu and based on the tree
> item selected I would like to display a different panel.  Below is the
> MouseDownHandler that I am working with.  How should I be determining
> what list item the event was fired for?
>
> Thanks,
> Doug
>
>             tree.addMouseDownHandler(new MouseDownHandler(){
>                         @Override
>                         public void onMouseDown(MouseDownEvent event) {
>                                 // TODO display panel for item selected in 
> tree
>                                 
> contentLabel.setText(event.getAssociatedType().toString());
>                                 sp.setWidget(contentPanel);
>                         }});

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to