Search in sources :

Example 1 with HasClickHandlers

use of com.google.gwt.event.dom.client.HasClickHandlers in project ovirt-engine by oVirt.

the class AbstractPopupPresenterWidget method onBind.

@Override
protected void onBind() {
    super.onBind();
    HasClickHandlers closeButton = getView().getCloseButton();
    if (closeButton != null) {
        registerHandler(closeButton.addClickHandler(event -> AbstractPopupPresenterWidget.this.onClose()));
    }
    HasClickHandlers closeIconButton = getView().getCloseIconButton();
    if (closeIconButton != null) {
        registerHandler(closeIconButton.addClickHandler(event -> AbstractPopupPresenterWidget.this.onClose()));
    }
    registerHandler(getView().setPopupKeyPressHandler(event -> AbstractPopupPresenterWidget.this.onKeyPress(event)));
    registerHandler(getEventBus().addHandler(UserLoginChangeEvent.getType(), event -> {
        if (isVisible()) {
            getView().hide();
        }
    }));
    registerHandler(getView().getRepositionOnWindowResizeHandler());
}
Also used : HasClickHandlers(com.google.gwt.event.dom.client.HasClickHandlers) HandlerRegistration(com.google.gwt.event.shared.HandlerRegistration) Scheduler(com.google.gwt.core.client.Scheduler) EventBus(com.google.gwt.event.shared.EventBus) KeyCodes(com.google.gwt.event.dom.client.KeyCodes) PresenterWidget(com.gwtplatform.mvp.client.PresenterWidget) PopupNativeKeyPressHandler(org.ovirt.engine.ui.common.widget.dialog.PopupNativeKeyPressHandler) ElementTooltipUtils(org.ovirt.engine.ui.common.utils.ElementTooltipUtils) UserLoginChangeEvent(org.ovirt.engine.ui.common.auth.UserLoginChangeEvent) PopupView(com.gwtplatform.mvp.client.PopupView) NativeEvent(com.google.gwt.dom.client.NativeEvent) HasClickHandlers(com.google.gwt.event.dom.client.HasClickHandlers)

Aggregations

Scheduler (com.google.gwt.core.client.Scheduler)1 NativeEvent (com.google.gwt.dom.client.NativeEvent)1 HasClickHandlers (com.google.gwt.event.dom.client.HasClickHandlers)1 KeyCodes (com.google.gwt.event.dom.client.KeyCodes)1 EventBus (com.google.gwt.event.shared.EventBus)1 HandlerRegistration (com.google.gwt.event.shared.HandlerRegistration)1 PopupView (com.gwtplatform.mvp.client.PopupView)1 PresenterWidget (com.gwtplatform.mvp.client.PresenterWidget)1 UserLoginChangeEvent (org.ovirt.engine.ui.common.auth.UserLoginChangeEvent)1 ElementTooltipUtils (org.ovirt.engine.ui.common.utils.ElementTooltipUtils)1 PopupNativeKeyPressHandler (org.ovirt.engine.ui.common.widget.dialog.PopupNativeKeyPressHandler)1