Search in sources :

Example 1 with BeforeCloseWithCloseButtonEvent

use of com.haulmont.cuba.gui.components.Window.BeforeCloseWithCloseButtonEvent in project cuba by cuba-platform.

the class WebWindowManager method isCloseWithCloseButtonPrevented.

protected boolean isCloseWithCloseButtonPrevented(Window currentWindow) {
    WebWindow webWindow = (WebWindow) ComponentsHelper.getWindowImplementation(currentWindow);
    if (webWindow != null) {
        BeforeCloseWithCloseButtonEvent event = new BeforeCloseWithCloseButtonEvent(webWindow);
        webWindow.fireBeforeCloseWithCloseButton(event);
        return event.isClosePrevented();
    }
    return false;
}
Also used : BeforeCloseWithCloseButtonEvent(com.haulmont.cuba.gui.components.Window.BeforeCloseWithCloseButtonEvent) WebWindow(com.haulmont.cuba.web.gui.WebWindow)

Aggregations

BeforeCloseWithCloseButtonEvent (com.haulmont.cuba.gui.components.Window.BeforeCloseWithCloseButtonEvent)1 WebWindow (com.haulmont.cuba.web.gui.WebWindow)1