Search in sources :

Example 1 with DialogWindow

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;
}
Also used : Screen(com.haulmont.cuba.gui.screen.Screen) EditorScreen(com.haulmont.cuba.gui.screen.EditorScreen) NotFoundScreen(com.haulmont.cuba.web.app.ui.navigation.notfoundwindow.NotFoundScreen) RootWindow(com.haulmont.cuba.gui.components.RootWindow) Screens(com.haulmont.cuba.gui.Screens) DialogWindow(com.haulmont.cuba.gui.components.DialogWindow)

Aggregations

Screens (com.haulmont.cuba.gui.Screens)1 DialogWindow (com.haulmont.cuba.gui.components.DialogWindow)1 RootWindow (com.haulmont.cuba.gui.components.RootWindow)1 EditorScreen (com.haulmont.cuba.gui.screen.EditorScreen)1 Screen (com.haulmont.cuba.gui.screen.Screen)1 NotFoundScreen (com.haulmont.cuba.web.app.ui.navigation.notfoundwindow.NotFoundScreen)1