Search in sources :

Example 51 with Screen

use of com.haulmont.cuba.gui.screen.Screen in project cuba by cuba-platform.

the class WebScreens method getActiveWorkAreaScreensStream.

protected Stream<Screen> getActiveWorkAreaScreensStream() {
    Screen rootScreen = getRootScreenOrNull();
    if (rootScreen == null) {
        return Stream.empty();
    }
    WebAppWorkArea workArea = getConfiguredWorkAreaOrNull();
    if (workArea == null) {
        return Stream.empty();
    }
    return workArea.getActiveWorkAreaScreensStream();
}
Also used : WebAppWorkArea(com.haulmont.cuba.web.gui.components.mainwindow.WebAppWorkArea) Screen(com.haulmont.cuba.gui.screen.Screen)

Example 52 with Screen

use of com.haulmont.cuba.gui.screen.Screen in project cuba by cuba-platform.

the class WebScreens method openEditor.

@SuppressWarnings({ "deprecation", "IncorrectCreateGuiComponent" })
@Override
public Window.Editor openEditor(WindowInfo windowInfo, Entity item, OpenType openType, Map<String, Object> params) {
    Screen editor = createEditor(windowInfo, item, openType, params);
    editor.show();
    return editor instanceof Window.Editor ? (Window.Editor) editor : new ScreenEditorWrapper(editor);
}
Also used : GuiDialogWindow(com.haulmont.cuba.web.gui.components.WebDialogWindow.GuiDialogWindow) WebWindow(com.haulmont.cuba.web.gui.WebWindow) WebTabWindow(com.haulmont.cuba.web.gui.components.WebTabWindow) Screen(com.haulmont.cuba.gui.screen.Screen)

Example 53 with Screen

use of com.haulmont.cuba.gui.screen.Screen in project cuba by cuba-platform.

the class WebScreens method openWindow.

@SuppressWarnings({ "IncorrectCreateGuiComponent", "deprecation" })
@Override
public Window openWindow(WindowInfo windowInfo, OpenType openType) {
    Map<String, Object> params = createParametersMap(windowInfo, Collections.emptyMap());
    MapScreenOptions options = new MapScreenOptions(params);
    Screen screen = createScreen(windowInfo, openType.getOpenMode(), options);
    applyOpenTypeParameters(screen.getWindow(), openType);
    show(screen);
    return screen instanceof Window ? (Window) screen : new ScreenWrapper(screen);
}
Also used : GuiDialogWindow(com.haulmont.cuba.web.gui.components.WebDialogWindow.GuiDialogWindow) WebWindow(com.haulmont.cuba.web.gui.WebWindow) WebTabWindow(com.haulmont.cuba.web.gui.components.WebTabWindow) Screen(com.haulmont.cuba.gui.screen.Screen)

Example 54 with Screen

use of com.haulmont.cuba.gui.screen.Screen in project cuba by cuba-platform.

the class WebAppWorkArea method getCurrentBreadcrumbs.

public Collection<Screen> getCurrentBreadcrumbs() {
    TabWindowContainer layout = getCurrentWindowContainer();
    if (layout != null) {
        WindowBreadCrumbs breadCrumbs = layout.getBreadCrumbs();
        List<Screen> screens = new ArrayList<>(breadCrumbs.getWindows().size());
        Iterator<Window> windowIterator = breadCrumbs.getWindows().descendingIterator();
        while (windowIterator.hasNext()) {
            Screen frameOwner = windowIterator.next().getFrameOwner();
            screens.add(frameOwner);
        }
        return screens;
    }
    return Collections.emptyList();
}
Also used : TabWindowContainer(com.haulmont.cuba.web.sys.TabWindowContainer) WebWindow(com.haulmont.cuba.web.gui.WebWindow) Screen(com.haulmont.cuba.gui.screen.Screen) WindowBreadCrumbs(com.haulmont.cuba.web.sys.WindowBreadCrumbs)

Example 55 with Screen

use of com.haulmont.cuba.gui.screen.Screen in project cuba by cuba-platform.

the class WebFtsField method openSearchWindow.

protected void openSearchWindow() {
    String searchTerm = searchField.getValue();
    if (StringUtils.isBlank(searchTerm)) {
        return;
    }
    FtsSearchLauncher searchLauncher = beanLocator.get(FtsSearchLauncher.NAME);
    Screen frameOwner = ComponentsHelper.getWindowNN(this).getFrameOwner();
    searchLauncher.search(frameOwner, searchTerm);
}
Also used : Screen(com.haulmont.cuba.gui.screen.Screen)

Aggregations

Screen (com.haulmont.cuba.gui.screen.Screen)66 WebWindow (com.haulmont.cuba.web.gui.WebWindow)18 NotFoundScreen (com.haulmont.cuba.web.app.ui.navigation.notfoundwindow.NotFoundScreen)11 GuiDialogWindow (com.haulmont.cuba.web.gui.components.WebDialogWindow.GuiDialogWindow)10 WebTabWindow (com.haulmont.cuba.web.gui.components.WebTabWindow)10 EditorScreen (com.haulmont.cuba.gui.screen.EditorScreen)9 NavigationState (com.haulmont.cuba.gui.navigation.NavigationState)8 Nullable (javax.annotation.Nullable)8 Screens (com.haulmont.cuba.gui.Screens)6 WindowInfo (com.haulmont.cuba.gui.config.WindowInfo)6 WebAppWorkArea (com.haulmont.cuba.web.gui.components.mainwindow.WebAppWorkArea)6 FrameOwner (com.haulmont.cuba.gui.screen.FrameOwner)5 AppUI (com.haulmont.cuba.web.AppUI)5 Entity (com.haulmont.cuba.core.entity.Entity)4 com.haulmont.cuba.core.global (com.haulmont.cuba.core.global)4 SelectHandlerAdapter (com.haulmont.cuba.gui.components.compatibility.SelectHandlerAdapter)4 WindowConfig (com.haulmont.cuba.gui.config.WindowConfig)4 OpenMode (com.haulmont.cuba.gui.screen.OpenMode)4 ScreenFragment (com.haulmont.cuba.gui.screen.ScreenFragment)4 UiControllerUtils (com.haulmont.cuba.gui.screen.UiControllerUtils)4