What is the event type for the control click in a table cell in a GWT application? I want to basically change the color of the background when the user does this action.
This part of my code basically just looks like:
public void onBrowserEvent(Event event) {
Element td = getEventTargetCell(event);
if (td == null) return;
Element tr = DOM.getParent(td);
System.out.println("Event " + Event.getCurrentEvent());
switch (DOM.eventGetType(event)) {
case Event.ONMOUSEDOWN: {
//DOM.setStyleAttribute(td, "backgroundColor", "#ffce00");
onRowClick(tr);
break;
}
case Event.ONMOUSEUP: {
//DOM.setStyleAttribute(td, "backgroundColor", "#ffffff");
break;
}
case Event.ONMOUSEOVER: {
//DOM.setStyleAttribute(td, "backgroundColor", "#ffce00");
onRowRollover(tr);
break;
}
case Event.ONMOUSEOUT: {
//DOM.setStyleAttribute(td, "backgroundColor","#ffffff");
break;
}
/*case Event.ONCLICK: {
DOM.setStyleAttribute(td, "backgroundColor", "#ffce00");
break;
}*/
case Event.ONDBLCLICK: {
//DOM.setStyleAttribute(td, "backgroundColor", "#ffffff");
break;
}
case Event.KEYEVENTS: {
//DOM.setStyleAttribute(td, "backgroundColor", "#ffce00");
break;
}
case Event.ONFOCUS: {
//DOM.setStyleAttribute(td, "backgroundColor", "#ffce00");
break;
}
/*case Event. {
DOM.setStyleAttribute(td, "backgroundColor", "#ffce00");
break;
}*/
}
}
What do I need to do to capture this event?
Thanks