Search in sources :

Example 6 with PartDefinitionImpl

use of org.uberfire.workbench.model.impl.PartDefinitionImpl in project kie-wb-common by kiegroup.

the class SocialHomePagePerspective method buildPerspective.

@Perspective
public PerspectiveDefinition buildPerspective() {
    final PerspectiveDefinition p = new PerspectiveDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    p.setName("Social Home Page Perspective");
    final PanelDefinition west = new PanelDefinitionImpl(SimpleWorkbenchPanelPresenter.class.getName());
    west.setWidth(450);
    west.setMinWidth(450);
    west.addPart(new PartDefinitionImpl(new DefaultPlaceRequest("SocialHomePageSidePresenter")));
    p.getRoot().addPart(new PartDefinitionImpl(new DefaultPlaceRequest("SocialHomePageMainPresenter")));
    p.getRoot().insertChild(CompassPosition.WEST, west);
    return p;
}
Also used : SimpleWorkbenchPanelPresenter(org.uberfire.client.workbench.panels.impl.SimpleWorkbenchPanelPresenter) PartDefinitionImpl(org.uberfire.workbench.model.impl.PartDefinitionImpl) 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 7 with PartDefinitionImpl

use of org.uberfire.workbench.model.impl.PartDefinitionImpl in project kie-wb-common by kiegroup.

the class UserHomePagePerspective method buildPerspective.

@Perspective
public PerspectiveDefinition buildPerspective() {
    final PerspectiveDefinition p = new PerspectiveDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    p.setName(Constants.INSTANCE.PeoplePerspective());
    final PanelDefinition west = new PanelDefinitionImpl(SimpleWorkbenchPanelPresenter.class.getName());
    west.setWidth(350);
    west.setMinWidth(350);
    west.addPart(new PartDefinitionImpl(new DefaultPlaceRequest("UserHomePageSidePresenter")));
    p.getRoot().addPart(new PartDefinitionImpl(new DefaultPlaceRequest("UserHomePageMainPresenter")));
    p.getRoot().insertChild(CompassPosition.WEST, west);
    return p;
}
Also used : SimpleWorkbenchPanelPresenter(org.uberfire.client.workbench.panels.impl.SimpleWorkbenchPanelPresenter) PartDefinitionImpl(org.uberfire.workbench.model.impl.PartDefinitionImpl) 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 8 with PartDefinitionImpl

use of org.uberfire.workbench.model.impl.PartDefinitionImpl in project kie-wb-common by kiegroup.

the class DataSourceManagementPerspective method buildPerspective.

@Perspective
public PerspectiveDefinition buildPerspective() {
    PerspectiveDefinition perspective = new PerspectiveDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    perspective.setName("Data Source Authoring");
    final PanelDefinition west = new PanelDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    west.setWidth(400);
    west.setMinWidth(300);
    west.addPart(new PartDefinitionImpl(new DefaultPlaceRequest(DataSourceDefExplorerScreen.SCREEN_ID)));
    perspective.getRoot().insertChild(CompassPosition.WEST, west);
    return perspective;
}
Also used : PartDefinitionImpl(org.uberfire.workbench.model.impl.PartDefinitionImpl) 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 9 with PartDefinitionImpl

use of org.uberfire.workbench.model.impl.PartDefinitionImpl in project kie-wb-common by kiegroup.

the class LibraryPlaces method goToProjectMetrics.

public void goToProjectMetrics() {
    final PlaceRequest metricsScreen = new DefaultPlaceRequest(LibraryPlaces.PROJECT_METRICS_SCREEN);
    final PartDefinitionImpl part = new PartDefinitionImpl(metricsScreen);
    part.setSelectable(false);
    placeManager.goTo(part, libraryPerspective.getRootPanel());
    setupLibraryBreadCrumbsForProjectMetrics();
    projectMetricsEvent.fire(new WorkbenchProjectMetricsEvent(projectContext.getActiveWorkspaceProject().orElseThrow(() -> new IllegalStateException("Cannot fire event for project metrics without an active project."))));
}
Also used : PathPlaceRequest(org.uberfire.mvp.impl.PathPlaceRequest) DefaultPlaceRequest(org.uberfire.mvp.impl.DefaultPlaceRequest) PlaceRequest(org.uberfire.mvp.PlaceRequest) PartDefinitionImpl(org.uberfire.workbench.model.impl.PartDefinitionImpl) WorkbenchProjectMetricsEvent(org.kie.workbench.common.screens.library.client.events.WorkbenchProjectMetricsEvent) DefaultPlaceRequest(org.uberfire.mvp.impl.DefaultPlaceRequest)

Example 10 with PartDefinitionImpl

use of org.uberfire.workbench.model.impl.PartDefinitionImpl in project kie-wb-common by kiegroup.

the class LibraryPlaces method goToOrganizationalUnits.

public void goToOrganizationalUnits() {
    if (closeAllPlacesOrNothing()) {
        PortablePreconditions.checkNotNull("libraryPerspective.closeAllPlacesOrNothing", libraryPerspective);
        projectContextChangeEvent.fire(new WorkspaceProjectContextChangeEvent());
        final DefaultPlaceRequest placeRequest = new DefaultPlaceRequest(LibraryPlaces.ORGANIZATIONAL_UNITS_SCREEN);
        final PartDefinitionImpl part = new PartDefinitionImpl(placeRequest);
        part.setSelectable(false);
        placeManager.goTo(part, libraryPerspective.getRootPanel());
        setupLibraryBreadCrumbs();
    }
}
Also used : PartDefinitionImpl(org.uberfire.workbench.model.impl.PartDefinitionImpl) DefaultPlaceRequest(org.uberfire.mvp.impl.DefaultPlaceRequest) WorkspaceProjectContextChangeEvent(org.guvnor.common.services.project.context.WorkspaceProjectContextChangeEvent)

Aggregations

DefaultPlaceRequest (org.uberfire.mvp.impl.DefaultPlaceRequest)29 PartDefinitionImpl (org.uberfire.workbench.model.impl.PartDefinitionImpl)29 PanelDefinition (org.uberfire.workbench.model.PanelDefinition)14 PlaceRequest (org.uberfire.mvp.PlaceRequest)12 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 Test (org.junit.Test)9 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 SimpleWorkbenchPanelPresenter (org.uberfire.client.workbench.panels.impl.SimpleWorkbenchPanelPresenter)3 StaticWorkbenchPanelPresenter (org.uberfire.client.workbench.panels.impl.StaticWorkbenchPanelPresenter)3 WorkbenchProjectMetricsEvent (org.kie.workbench.common.screens.library.client.events.WorkbenchProjectMetricsEvent)2 PreferencesCentralInitializationEvent (org.uberfire.ext.preferences.client.event.PreferencesCentralInitializationEvent)2 PreferenceScopeResolutionStrategyInfo (org.uberfire.preferences.shared.impl.PreferenceScopeResolutionStrategyInfo)2 WorkspaceProject (org.guvnor.common.services.project.model.WorkspaceProject)1 OrganizationalUnit (org.guvnor.structure.organizationalunit.OrganizationalUnit)1