Java 类com.google.gwt.event.logical.shared.HasResizeHandlers 实例源码

项目:platypus-js    文件:EventsExecutor.java   
public void setComponentResized(JavaScriptObject aValue) {
    if (componentResized != aValue) {
        if (componentResizedReg != null) {
            componentResizedReg.removeHandler();
            componentResizedReg = null;
        }
        componentResized = aValue;
        if (componentResized != null && component instanceof HasResizeHandlers)
            componentResizedReg = ((HasResizeHandlers) component).addResizeHandler(new ResizeHandler() {
                @Override
                public void onResize(ResizeEvent event) {
                    if (componentResized != null) {
                        executeEvent(componentResized, EventsPublisher.publish(event));
                    }
                }
            });
    }
}