use of io.jmix.ui.sys.event.UiEventsMulticaster in project jmix by jmix-framework.
the class CompositeComponent method enableEventListeners.
@Internal
protected void enableEventListeners() {
List<ApplicationListener> listeners = getUiEventListeners();
if (CollectionUtils.isNotEmpty(listeners)) {
AppUI ui = AppUI.getCurrent();
UiEventsMulticaster multicaster = ui.getUiEventsMulticaster();
for (ApplicationListener listener : uiEventListeners) {
multicaster.addApplicationListener(listener);
}
}
}
use of io.jmix.ui.sys.event.UiEventsMulticaster in project jmix by jmix-framework.
the class CompositeComponent method disableEventListeners.
@Internal
protected void disableEventListeners() {
List<ApplicationListener> listeners = getUiEventListeners();
if (CollectionUtils.isNotEmpty(listeners)) {
AppUI ui = AppUI.getCurrent();
UiEventsMulticaster multicaster = ui.getUiEventsMulticaster();
for (ApplicationListener listener : uiEventListeners) {
multicaster.removeApplicationListener(listener);
}
}
}
use of io.jmix.ui.sys.event.UiEventsMulticaster in project jmix by jmix-framework.
the class WindowImpl method enableEventListeners.
protected void enableEventListeners() {
List<ApplicationListener> uiEventListeners = UiControllerUtils.getUiEventListeners(frameOwner);
if (uiEventListeners != null) {
AppUI ui = AppUI.getCurrent();
UiEventsMulticaster multicaster = ui.getUiEventsMulticaster();
for (ApplicationListener listener : uiEventListeners) {
multicaster.addApplicationListener(listener);
}
}
}
use of io.jmix.ui.sys.event.UiEventsMulticaster in project jmix by jmix-framework.
the class WindowImpl method disableEventListeners.
protected void disableEventListeners() {
List<ApplicationListener> uiEventListeners = UiControllerUtils.getUiEventListeners(frameOwner);
if (uiEventListeners != null) {
AppUI ui = AppUI.getCurrent();
UiEventsMulticaster multicaster = ui.getUiEventsMulticaster();
for (ApplicationListener listener : uiEventListeners) {
multicaster.removeApplicationListener(listener);
}
}
}
Aggregations