Search in sources :

Example 1 with UberfireDock

use of org.uberfire.client.workbench.docks.UberfireDock in project kie-wb-common by kiegroup.

the class StunnerDocksHandler method provideDocks.

@Override
public Collection<UberfireDock> provideDocks(String perspectiveIdentifier) {
    List<UberfireDock> result = new ArrayList<>();
    result.add(new UberfireDock(UberfireDockPosition.EAST, "PENCIL_SQUARE_O", new DefaultPlaceRequest("ProjectDiagramPropertiesScreen"), perspectiveIdentifier).withSize(450).withLabel(constants.DocksStunnerPropertiesTitle()));
    result.add(new UberfireDock(UberfireDockPosition.EAST, "EYE", new DefaultPlaceRequest("ProjectDiagramExplorerScreen"), perspectiveIdentifier).withSize(450).withLabel(constants.DocksStunnerExplorerTitle()));
    return result;
}
Also used : ArrayList(java.util.ArrayList) UberfireDock(org.uberfire.client.workbench.docks.UberfireDock) DefaultPlaceRequest(org.uberfire.mvp.impl.DefaultPlaceRequest)

Example 2 with UberfireDock

use of org.uberfire.client.workbench.docks.UberfireDock in project kie-wb-common by kiegroup.

the class AuthoringWorkbenchDocks method setup.

public void setup(String authoringPerspectiveIdentifier, PlaceRequest projectExplorerPlaceRequest) {
    this.authoringPerspectiveIdentifier = authoringPerspectiveIdentifier;
    projectExplorerDock = new UberfireDock(UberfireDockPosition.WEST, IconType.ADJUST.toString(), projectExplorerPlaceRequest, authoringPerspectiveIdentifier).withSize(400).withLabel(constants.DocksProjectExplorerTitle());
    componentPaletteDock = new UberfireDock(UberfireDockPosition.WEST, IconType.CUBES.toString(), new DefaultPlaceRequest(LayoutComponentPaletteScreen.SCREEN_ID), authoringPerspectiveIdentifier).withSize(400).withLabel(constants.LayoutEditorComponentPalette());
    uberfireDocks.add(projectExplorerDock);
    uberfireDocks.hide(UberfireDockPosition.EAST, authoringPerspectiveIdentifier);
}
Also used : UberfireDock(org.uberfire.client.workbench.docks.UberfireDock) DefaultPlaceRequest(org.uberfire.mvp.impl.DefaultPlaceRequest)

Example 3 with UberfireDock

use of org.uberfire.client.workbench.docks.UberfireDock in project kie-wb-common by kiegroup.

the class AuthoringWorkbenchDocksTest method createNewWorkbenchDocksHandler.

protected TestWorkbenchDocksHandler createNewWorkbenchDocksHandler() {
    List<UberfireDock> docks = new ArrayList<>();
    docks.add(new UberfireDock(UberfireDockPosition.EAST, "RANDOM", placeRequest, AUTHORING_PERSPECTIVE));
    docks.add(new UberfireDock(UberfireDockPosition.EAST, "RANDOM", placeRequest, AUTHORING_PERSPECTIVE));
    return new TestWorkbenchDocksHandler(docks);
}
Also used : TestWorkbenchDocksHandler(org.kie.workbench.common.workbench.client.docks.test.TestWorkbenchDocksHandler) ArrayList(java.util.ArrayList) UberfireDock(org.uberfire.client.workbench.docks.UberfireDock)

Example 4 with UberfireDock

use of org.uberfire.client.workbench.docks.UberfireDock in project kie-wb-common by kiegroup.

the class DataModellerDocksHandler method provideDocks.

@Override
public Collection<UberfireDock> provideDocks(String perspectiveIdentifier) {
    List<UberfireDock> result = new ArrayList<>();
    if (lastActiveContext == null) {
        lastActiveContext = dataModelerWBContext.getActiveContext();
    }
    if (isGraphicMode(lastActiveContext)) {
        result.add(new UberfireDock(UberfireDockPosition.EAST, "RANDOM", new DefaultPlaceRequest("DroolsDomainScreen"), perspectiveIdentifier).withSize(450).withLabel(constants.DocksDroolsJBPMTitle()));
        result.add(new UberfireDock(UberfireDockPosition.EAST, "BRIEFCASE", new DefaultPlaceRequest("JPADomainScreen"), perspectiveIdentifier).withSize(450).withLabel(constants.DocksPersistenceTitle()));
        result.add(new UberfireDock(UberfireDockPosition.EAST, "COG", new DefaultPlaceRequest("AdvancedDomainScreen"), perspectiveIdentifier).withSize(450).withLabel(constants.DocksAdvancedTitle()));
        if (authorizationManager.authorize(WorkbenchFeatures.PLANNER_AVAILABLE, sessionInfo.getIdentity())) {
            result.add(new UberfireDock(UberfireDockPosition.EAST, WorkbenchImageResources.INSTANCE.optaPlannerDisabledIcon(), WorkbenchImageResources.INSTANCE.optaPlannerEnabledIcon(), new DefaultPlaceRequest("PlannerDomainScreen"), perspectiveIdentifier).withSize(450).withLabel(constants.DocksOptaPlannerTitle()));
        }
    }
    return result;
}
Also used : ArrayList(java.util.ArrayList) UberfireDock(org.uberfire.client.workbench.docks.UberfireDock) DefaultPlaceRequest(org.uberfire.mvp.impl.DefaultPlaceRequest)

Aggregations

UberfireDock (org.uberfire.client.workbench.docks.UberfireDock)4 ArrayList (java.util.ArrayList)3 DefaultPlaceRequest (org.uberfire.mvp.impl.DefaultPlaceRequest)3 TestWorkbenchDocksHandler (org.kie.workbench.common.workbench.client.docks.test.TestWorkbenchDocksHandler)1