use of org.uberfire.workbench.model.impl.PartDefinitionImpl in project kie-wb-common by kiegroup.
the class HomePerspective method buildPerspective.
@Perspective
public PerspectiveDefinition buildPerspective() {
PerspectiveDefinition perspective = new PerspectiveDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
perspective.setName("Home");
perspective.getRoot().addPart(new PartDefinitionImpl(new DefaultPlaceRequest(DiagramPresenterScreen.SCREEN_ID)));
welcomePanel = new PanelDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
welcomePanel.setMinHeight(100);
welcomePanel.setHeight(100);
welcomePanel.addPart(new PartDefinitionImpl(new DefaultPlaceRequest(WelcomeScreen.SCREEN_ID)));
perspective.getRoot().insertChild(CompassPosition.NORTH, welcomePanel);
return perspective;
}
use of org.uberfire.workbench.model.impl.PartDefinitionImpl in project kie-wb-common by kiegroup.
the class LibraryPlaces method goToPreferences.
public void goToPreferences() {
final PreferenceScopeResolutionStrategyInfo customScopeResolutionStrategy = projectScopedResolutionStrategySupplier.get();
final PreferencesCentralInitializationEvent initEvent = new PreferencesCentralInitializationEvent("ProjectPreferences", customScopeResolutionStrategy, null);
final DefaultPlaceRequest placeRequest = new DefaultPlaceRequest(PreferencesRootScreen.IDENTIFIER);
final PartDefinitionImpl part = new PartDefinitionImpl(placeRequest);
part.setSelectable(false);
placeManager.goTo(part, libraryPerspective.getRootPanel());
preferencesCentralInitializationEvent.fire(initEvent);
setupLibraryBreadCrumbsForPreferences();
}
use of org.uberfire.workbench.model.impl.PartDefinitionImpl in project kie-wb-common by kiegroup.
the class LibraryPlaces method goToAddAsset.
public void goToAddAsset() {
final PlaceRequest addAssetScreen = new DefaultPlaceRequest(LibraryPlaces.ADD_ASSET_SCREEN);
final PartDefinitionImpl part = new PartDefinitionImpl(addAssetScreen);
part.setSelectable(false);
placeManager.goTo(part, libraryPerspective.getRootPanel());
}
use of org.uberfire.workbench.model.impl.PartDefinitionImpl in project kie-wb-common by kiegroup.
the class LibraryPlaces method goToProject.
private void goToProject(final Command callback) {
setupLibraryBreadCrumbs(projectContext.getActiveWorkspaceProject().orElseThrow(() -> new IllegalStateException("Cannot go to project when no project is active.")));
final PartDefinitionImpl part = new PartDefinitionImpl(new DefaultPlaceRequest(LibraryPlaces.PROJECT_SCREEN));
part.setSelectable(false);
placeManager.goTo(part, libraryPerspective.getRootPanel());
if (callback != null) {
callback.execute();
}
}
use of org.uberfire.workbench.model.impl.PartDefinitionImpl in project kie-wb-common by kiegroup.
the class LibraryPlaces method goToTrySamples.
public void goToTrySamples() {
if (closeAllPlacesOrNothing()) {
final DefaultPlaceRequest placeRequest = new DefaultPlaceRequest(LibraryPlaces.IMPORT_SAMPLE_PROJECTS_SCREEN);
final PartDefinitionImpl part = new PartDefinitionImpl(placeRequest);
part.setSelectable(false);
placeManager.goTo(part, libraryPerspective.getRootPanel());
setupLibraryBreadCrumbsForTrySamples();
}
}
Aggregations