Search in sources :

Example 26 with DefaultPlaceRequest

use of org.uberfire.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.

the class HomePerspective method getPerspective.

@Perspective
public PerspectiveDefinition getPerspective() {
    final PerspectiveDefinition p = new PerspectiveDefinitionImpl(StaticWorkbenchPanelPresenter.class.getName());
    p.setName(translationService.format(HomeConstants.HomePerspectiveName));
    p.getRoot().addPart(new PartDefinitionImpl(new DefaultPlaceRequest("org.kie.workbench.common.screens.home.client.HomePresenter")));
    return p;
}
Also used : PartDefinitionImpl(org.uberfire.workbench.model.impl.PartDefinitionImpl) PerspectiveDefinitionImpl(org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl) PerspectiveDefinition(org.uberfire.workbench.model.PerspectiveDefinition) StaticWorkbenchPanelPresenter(org.uberfire.client.workbench.panels.impl.StaticWorkbenchPanelPresenter) DefaultPlaceRequest(org.uberfire.mvp.impl.DefaultPlaceRequest) Perspective(org.uberfire.client.annotations.Perspective) WorkbenchPerspective(org.uberfire.client.annotations.WorkbenchPerspective)

Example 27 with DefaultPlaceRequest

use of org.uberfire.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.

the class AdministrationPerspective method buildPerspective.

@Perspective
public PerspectiveDefinition buildPerspective() {
    final PerspectiveDefinition perspective = new PerspectiveDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    perspective.setName(AppConstants.INSTANCE.AdministrationPerspectiveName());
    perspective.getRoot().addPart(new PartDefinitionImpl(new DefaultPlaceRequest("RepositoriesEditor")));
    final PanelDefinition west = new PanelDefinitionImpl(SimpleWorkbenchPanelPresenter.class.getName());
    west.setWidth(300);
    west.setMinWidth(200);
    west.addPart(new PartDefinitionImpl(new DefaultPlaceRequest("FileExplorer")));
    perspective.getRoot().insertChild(CompassPosition.WEST, west);
    return perspective;
}
Also used : PartDefinitionImpl(org.uberfire.workbench.model.impl.PartDefinitionImpl) SimpleWorkbenchPanelPresenter(org.uberfire.client.workbench.panels.impl.SimpleWorkbenchPanelPresenter) PerspectiveDefinitionImpl(org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl) PanelDefinition(org.uberfire.workbench.model.PanelDefinition) PerspectiveDefinition(org.uberfire.workbench.model.PerspectiveDefinition) PanelDefinitionImpl(org.uberfire.workbench.model.impl.PanelDefinitionImpl) DefaultPlaceRequest(org.uberfire.mvp.impl.DefaultPlaceRequest) MultiListWorkbenchPanelPresenter(org.uberfire.client.workbench.panels.impl.MultiListWorkbenchPanelPresenter) Perspective(org.uberfire.client.annotations.Perspective) WorkbenchPerspective(org.uberfire.client.annotations.WorkbenchPerspective)

Example 28 with DefaultPlaceRequest

use of org.uberfire.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.

the class CanvasPerspective method buildPerspective.

@Perspective
public PerspectiveDefinition buildPerspective() {
    PerspectiveDefinition perspective = new PerspectiveDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    perspective.setName("Canvas only");
    perspective.getRoot().addPart(new PartDefinitionImpl(new DefaultPlaceRequest(DiagramsNavigatorScreen.SCREEN_ID)));
    return perspective;
}
Also used : PartDefinitionImpl(org.uberfire.workbench.model.impl.PartDefinitionImpl) PerspectiveDefinitionImpl(org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl) PerspectiveDefinition(org.uberfire.workbench.model.PerspectiveDefinition) DefaultPlaceRequest(org.uberfire.mvp.impl.DefaultPlaceRequest) MultiListWorkbenchPanelPresenter(org.uberfire.client.workbench.panels.impl.MultiListWorkbenchPanelPresenter) Perspective(org.uberfire.client.annotations.Perspective) WorkbenchPerspective(org.uberfire.client.annotations.WorkbenchPerspective)

Example 29 with DefaultPlaceRequest

use of org.uberfire.mvp.impl.DefaultPlaceRequest 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;
}
Also used : PartDefinitionImpl(org.uberfire.workbench.model.impl.PartDefinitionImpl) PerspectiveDefinitionImpl(org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl) PerspectiveDefinition(org.uberfire.workbench.model.PerspectiveDefinition) PanelDefinitionImpl(org.uberfire.workbench.model.impl.PanelDefinitionImpl) DefaultPlaceRequest(org.uberfire.mvp.impl.DefaultPlaceRequest) MultiListWorkbenchPanelPresenter(org.uberfire.client.workbench.panels.impl.MultiListWorkbenchPanelPresenter) Perspective(org.uberfire.client.annotations.Perspective) WorkbenchPerspective(org.uberfire.client.annotations.WorkbenchPerspective)

Example 30 with DefaultPlaceRequest

use of org.uberfire.mvp.impl.DefaultPlaceRequest 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();
}
Also used : PartDefinitionImpl(org.uberfire.workbench.model.impl.PartDefinitionImpl) PreferenceScopeResolutionStrategyInfo(org.uberfire.preferences.shared.impl.PreferenceScopeResolutionStrategyInfo) PreferencesCentralInitializationEvent(org.uberfire.ext.preferences.client.event.PreferencesCentralInitializationEvent) DefaultPlaceRequest(org.uberfire.mvp.impl.DefaultPlaceRequest)

Aggregations

DefaultPlaceRequest (org.uberfire.mvp.impl.DefaultPlaceRequest)46 PartDefinitionImpl (org.uberfire.workbench.model.impl.PartDefinitionImpl)29 Test (org.junit.Test)17 PlaceRequest (org.uberfire.mvp.PlaceRequest)15 PanelDefinition (org.uberfire.workbench.model.PanelDefinition)14 PathPlaceRequest (org.uberfire.mvp.impl.PathPlaceRequest)12 Perspective (org.uberfire.client.annotations.Perspective)11 WorkbenchPerspective (org.uberfire.client.annotations.WorkbenchPerspective)11 PerspectiveDefinition (org.uberfire.workbench.model.PerspectiveDefinition)11 PerspectiveDefinitionImpl (org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl)11 MultiListWorkbenchPanelPresenter (org.uberfire.client.workbench.panels.impl.MultiListWorkbenchPanelPresenter)8 WorkspaceProjectContextChangeEvent (org.guvnor.common.services.project.context.WorkspaceProjectContextChangeEvent)7 PanelDefinitionImpl (org.uberfire.workbench.model.impl.PanelDefinitionImpl)7 HashMap (java.util.HashMap)4 UberfireDock (org.uberfire.client.workbench.docks.UberfireDock)3 PlaceGainFocusEvent (org.uberfire.client.workbench.events.PlaceGainFocusEvent)3 SimpleWorkbenchPanelPresenter (org.uberfire.client.workbench.panels.impl.SimpleWorkbenchPanelPresenter)3 StaticWorkbenchPanelPresenter (org.uberfire.client.workbench.panels.impl.StaticWorkbenchPanelPresenter)3 ArrayList (java.util.ArrayList)2 WorkbenchProjectMetricsEvent (org.kie.workbench.common.screens.library.client.events.WorkbenchProjectMetricsEvent)2