- private HTML imageItemHTML(final ImageResource imageProto, final String title) {\r
- final HTML link = new HTML("<a class='hidden-link' href='javascript:;'>" + "<span>" + AbstractImagePrototype.create(imageProto).getHTML() + " " + title + "</span>" + "</a>");\r
+ private HTML imageItemHTML(final ImageResource imageProto, final String title,final TreeItem item) {\r
+ final HTML link = new HTML("<a class='hidden-link' href='javascript:;'>" + "<span>" + AbstractImagePrototype.create(imageProto).getHTML() + " " + title + "</span>" + "</a>"){\r
+ @Override\r
+ public void onBrowserEvent(Event event) {\r
+ switch (DOM.eventGetType(event)) {\r
+ case Event.ONMOUSEDOWN:\r
+ if (DOM.eventGetButton(event) == NativeEvent.BUTTON_RIGHT || DOM.eventGetButton(event) == NativeEvent.BUTTON_LEFT)\r
+ onSelection(item);\r
+ break;\r
+ }\r
+ super.onBrowserEvent(event);\r
+\r
+ }\r
+ };\r
+ link.sinkEvents(Event.ONMOUSEDOWN);\r