A.U.S Cristian Rinaldi Teléfono Móvil: (0342) 155 238 083 www.logikas.com Lisandro de la Torre 2643 Of 5 - 3000 - Santa Fe Teléfono Fijo: (0342) 483 5138 |
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/fjfy_S3KZ0wJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Hello:The real question is: I have a widget to inherits of ComplexWidget with the following declarations:private Element root = Document.get().createDivElement();private LayoutPanel header = new LayoutPanel();private Image imgUp = new Image(getDefaultResources().imageUp());header.add(label);..........root.appendChild(header.getElement());
..........setElement(root);sinkEvents(Event.ONCLICK);Now I add a domHadler for image (the only event that interests me), but, sinkEvents(Event.ONCLICK) register the event at level of element root, I don't know how propagate the event at image, so that only the image, treats you, and not the other elements of the widget.I made this:imgUp.addDomHandler(new ClickHandler() {@Overridepublic void onClick(ClickEvent event) {header.setWidgetTopHeight(imgUp, 0, PX, 0, PX);header.setWidgetTopHeight(imgDown, 0, PX, 30, PX);collapsed = !collapsed;collapseBody(collapsed);}}, ClickEvent.getType());But entire the widget treats the event.Any idea?