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();
}
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);
}
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);
}
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();
}
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);
}
Aggregations