addOnClickHandler(tabElement, new Handler<Event>() {
public void handle(Event event) {
handleOnClick();
}
});
EventUtils.addMouseHoverHandler(tabElement, new HoverHandler() {
public void onMouseOver(Event event) {
handleMouseOver();
}
public void onMouseOut(Event event) {
handleMouseOut();
}
});
if (closeButtonElement != null) {
addOnClickHandler(closeButtonElement, new Handler<Event>() {
public void handle(Event event) {
handleOnClose();
DOM.eventCancelBubble(event, true);
}
});
EventUtils.addMouseHoverHandler(closeButtonElement, new HoverHandler() {
public void onMouseOver(Event event) {
setStyleName(closeButtonElement, "tab-close-button-hover", true);
}
public void onMouseOut(Event event) {