public void onBrowserEvent(Cell.Context context,
Element elem,
DemandeBean object,
NativeEvent event) { ...}
However the method is called only if i click in the column.
It is not called if i just move over the mouse.
That's one thing.
Another thing is that I want the tool tip only when the user moves the mouse over the column header, not the entire column.
Any idea ?
Thanks
On Tue, May 31, 2011 at 1:49 PM, Celinio <cel975@gmail.com> wrote:
Do you suggest something like this ? It's not firing any event when I move the mouse over ....
Column<myDTO, String> utilisateurVerrouColumn = new Column<myDTO, String>(
new ClickableTextCell(blablaRender)) {
public String getValue(myDTO d) {
return "something";
}
protected void onBrowserEvent(Event event) {
//super.onBrowserEvent(event);switch(DOM.eventGetType(event)) {
String eventType = event.getType();
boolean isMouseover = "mouseover".equals(eventType);
boolean isMouseout = "mouseout".equals(eventType);
// Get the event target.
EventTarget eventTarget = event.getEventTarget();
if (!Element.is(eventTarget)) {
return;
}
case Event.ONMOUSEOVER:
Window.alert("Mouseover");
break;
case Event.ONMOUSEOUT:
Window.alert("Mouseout");
break;
default:
break;
}
}
};
On Tue, May 31, 2011 at 1:23 PM, Juan Pablo Gardella <gardellajuanpablo@gmail.com> wrote:For example in your column.2011/5/31 Celinio <cel975@gmail.com>thanks for your answer.
I had already explored that onBrowserEvent(...) possibility.
Where do i add that OnBrowserEvent(...) method to exactly ?On Tue, May 31, 2011 at 2:31 AM, Juan Pablo Gardella <gardellajuanpablo@gmail.com> wrote:
You must do a event handler (overwrite onBrowserEvent2), CellTable in gwt 2.3.0 doesn't support events. See this example:--@Overrideprotected void onBrowserEvent2(Event event) {super.onBrowserEvent2(event);String eventType = event.getType();boolean isMouseover = "mouseover".equals(eventType);boolean isMouseout = "mouseout".equals(eventType);// Get the event target.EventTarget eventTarget = event.getEventTarget();if (!Element.is(eventTarget)) {return;}final Element target = event.getEventTarget().cast();You can overwrite this method and can open a tooltip.2011/5/30 Celinio <cel975@gmail.com>--hello,
i just have a simple question :
how do i add a tooltip to a column header in a celltable ?
Thanks for helping.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment