Search in sources :

Example 1 with EntityInfoWindow

use of io.jmix.datatoolsui.screen.entityinfo.EntityInfoWindow in project jmix by jmix-framework.

the class EditorScreenShowEntityInfoAction method execute.

@Override
public void execute(Screen screen) {
    if (!(screen instanceof EditorScreen)) {
        throw new IllegalArgumentException("Screen must be instance of EditorScreen");
    }
    Object entity = ((EditorScreen<?>) screen).getEditedEntity();
    Screens screens = UiControllerUtils.getScreenContext(screen).getScreens();
    EntityInfoWindow infoWindow = screens.create(EntityInfoWindow.class);
    infoWindow.setEntity(entity);
    infoWindow.show();
}
Also used : EntityInfoWindow(io.jmix.datatoolsui.screen.entityinfo.EntityInfoWindow) EditorScreen(io.jmix.ui.screen.EditorScreen) Screens(io.jmix.ui.Screens)

Example 2 with EntityInfoWindow

use of io.jmix.datatoolsui.screen.entityinfo.EntityInfoWindow in project jmix by jmix-framework.

the class ShowEntityInfoAction method showInfo.

public void showInfo(Object entity, Component.BelongToFrame component) {
    Screens screens = ComponentsHelper.getScreenContext(component).getScreens();
    EntityInfoWindow screen = screens.create(EntityInfoWindow.class);
    screen.setEntity(entity);
    screen.show();
}
Also used : EntityInfoWindow(io.jmix.datatoolsui.screen.entityinfo.EntityInfoWindow) Screens(io.jmix.ui.Screens)

Aggregations

EntityInfoWindow (io.jmix.datatoolsui.screen.entityinfo.EntityInfoWindow)2 Screens (io.jmix.ui.Screens)2 EditorScreen (io.jmix.ui.screen.EditorScreen)1