use of com.haulmont.cuba.gui.components.DialogWindow in project cuba by cuba-platform.
the class WebUrlRouting method notAttachedToUi.
protected boolean notAttachedToUi(Screen screen) {
boolean notAttached;
Screens.OpenedScreens openedScreens = ui.getScreens().getOpenedScreens();
if (screen.getWindow() instanceof RootWindow) {
Screen rootScreen = openedScreens.getRootScreenOrNull();
notAttached = rootScreen == null || rootScreen != screen;
} else if (screen.getWindow() instanceof DialogWindow) {
notAttached = !openedScreens.getDialogScreens().contains(screen);
} else {
notAttached = !openedScreens.getActiveScreens().contains(screen);
}
return notAttached;
}
Aggregations