Java 类com.google.gwt.event.dom.client.HasMouseOutHandlers 实例源码

项目:firefly    文件:BasicPagingImageGrid.java   
public void add(Widget widget) {
    if (widget instanceof HasClickHandlers && clickHandler!=null) {
        ((HasClickHandlers) widget).addClickHandler(clickHandler);
    }
    if (widget instanceof HasDoubleClickHandlers && doubleClickHandler!=null) {
        ((HasDoubleClickHandlers) widget).addDoubleClickHandler(doubleClickHandler);
    }
    if (widget instanceof HasErrorHandlers && errorHandler!=null) {
        ((HasErrorHandlers) widget).addErrorHandler(errorHandler);
    }
    if (widget instanceof HasMouseOutHandlers && mouseOutHandler!=null) {
        ((HasMouseOutHandlers) widget).addMouseOutHandler(mouseOutHandler);
    }
    if (widget instanceof HasMouseOverHandlers && mouseOverHandler!=null) {
        ((HasMouseOverHandlers) widget).addMouseOverHandler(mouseOverHandler);
    }
    flowpanel.add(widget);
}
项目:platypus-js    文件:EventsExecutor.java   
public void setMouseExited(JavaScriptObject aValue) {
    if (mouseExited != aValue) {
        if (mouseOutReg != null) {
            mouseOutReg.removeHandler();
            mouseOutReg = null;
        }
        mouseExited = aValue;
        if (mouseExited != null) {
            MouseOutHandler handler = new MouseOutHandler() {
                @Override
                public void onMouseOut(MouseOutEvent event) {
                    if (mouseExited != null) {
                        event.stopPropagation();
                        executeEvent(mouseExited, EventsPublisher.publish(event));
                    }
                }
            };
            if (component instanceof Widget) {
                mouseOutReg = ((Widget) component).addDomHandler(handler, MouseOutEvent.getType());
            } else if (component instanceof HasMouseOutHandlers) {
                mouseOutReg = ((HasMouseOutHandlers) component).addMouseOutHandler(handler);
            }
        }
    }
}