Search in sources :

Example 1 with UiEventsMulticaster

use of com.haulmont.cuba.gui.events.sys.UiEventsMulticaster in project cuba by cuba-platform.

the class DesktopWindow method disableEventListeners.

protected void disableEventListeners() {
    Frame wrapper = delegate.getWrapper();
    if (wrapper != null) {
        List<ApplicationListener> uiEventListeners = ((AbstractFrame) wrapper).getUiEventListeners();
        if (uiEventListeners != null) {
            for (ApplicationListener listener : uiEventListeners) {
                UiEventsMulticaster multicaster = App.getInstance().getUiEventsMulticaster();
                multicaster.removeApplicationListener(listener);
            }
        }
    }
}
Also used : TopLevelFrame(com.haulmont.cuba.desktop.TopLevelFrame) Frame(com.haulmont.cuba.gui.components.Frame) ApplicationListener(org.springframework.context.ApplicationListener) UiEventsMulticaster(com.haulmont.cuba.gui.events.sys.UiEventsMulticaster)

Example 2 with UiEventsMulticaster

use of com.haulmont.cuba.gui.events.sys.UiEventsMulticaster in project cuba by cuba-platform.

the class DesktopWindow method enableEventListeners.

protected void enableEventListeners() {
    Frame wrapper = delegate.getWrapper();
    if (wrapper != null) {
        List<ApplicationListener> uiEventListeners = ((AbstractFrame) wrapper).getUiEventListeners();
        if (uiEventListeners != null) {
            for (ApplicationListener listener : uiEventListeners) {
                UiEventsMulticaster multicaster = App.getInstance().getUiEventsMulticaster();
                multicaster.addApplicationListener(listener);
            }
        }
    }
}
Also used : TopLevelFrame(com.haulmont.cuba.desktop.TopLevelFrame) Frame(com.haulmont.cuba.gui.components.Frame) ApplicationListener(org.springframework.context.ApplicationListener) UiEventsMulticaster(com.haulmont.cuba.gui.events.sys.UiEventsMulticaster)

Example 3 with UiEventsMulticaster

use of com.haulmont.cuba.gui.events.sys.UiEventsMulticaster in project cuba by cuba-platform.

the class WebWindow method disableEventListeners.

protected void disableEventListeners() {
    Frame wrapper = delegate.getWrapper();
    if (wrapper != null) {
        List<ApplicationListener> uiEventListeners = ((AbstractFrame) wrapper).getUiEventListeners();
        if (uiEventListeners != null) {
            for (ApplicationListener listener : uiEventListeners) {
                UiEventsMulticaster multicaster = AppUI.getCurrent().getUiEventsMulticaster();
                multicaster.removeApplicationListener(listener);
            }
        }
    }
}
Also used : ApplicationListener(org.springframework.context.ApplicationListener) UiEventsMulticaster(com.haulmont.cuba.gui.events.sys.UiEventsMulticaster)

Example 4 with UiEventsMulticaster

use of com.haulmont.cuba.gui.events.sys.UiEventsMulticaster in project cuba by cuba-platform.

the class WebWindow method enableEventListeners.

protected void enableEventListeners() {
    Frame wrapper = delegate.getWrapper();
    if (wrapper != null) {
        List<ApplicationListener> uiEventListeners = ((AbstractFrame) wrapper).getUiEventListeners();
        if (uiEventListeners != null) {
            for (ApplicationListener listener : uiEventListeners) {
                UiEventsMulticaster multicaster = AppUI.getCurrent().getUiEventsMulticaster();
                multicaster.addApplicationListener(listener);
            }
        }
    }
}
Also used : ApplicationListener(org.springframework.context.ApplicationListener) UiEventsMulticaster(com.haulmont.cuba.gui.events.sys.UiEventsMulticaster)

Example 5 with UiEventsMulticaster

use of com.haulmont.cuba.gui.events.sys.UiEventsMulticaster in project cuba by cuba-platform.

the class DesktopFrame method disableEventListeners.

protected void disableEventListeners() {
    Frame wrapper = getWrapper();
    if (wrapper != null) {
        List<ApplicationListener> uiEventListeners = ((AbstractFrame) wrapper).getUiEventListeners();
        if (uiEventListeners != null) {
            for (ApplicationListener listener : uiEventListeners) {
                UiEventsMulticaster multicaster = App.getInstance().getUiEventsMulticaster();
                multicaster.removeApplicationListener(listener);
            }
        }
    }
}
Also used : DetachedFrame(com.haulmont.cuba.desktop.DetachedFrame) ApplicationListener(org.springframework.context.ApplicationListener) UiEventsMulticaster(com.haulmont.cuba.gui.events.sys.UiEventsMulticaster)

Aggregations

UiEventsMulticaster (com.haulmont.cuba.gui.events.sys.UiEventsMulticaster)9 ApplicationListener (org.springframework.context.ApplicationListener)8 DetachedFrame (com.haulmont.cuba.desktop.DetachedFrame)2 TopLevelFrame (com.haulmont.cuba.desktop.TopLevelFrame)2 Frame (com.haulmont.cuba.gui.components.Frame)2 UiEvent (com.haulmont.cuba.gui.events.UiEvent)1