当前位置: 首页>>代码示例>>Java>>正文


Java PartDefinitionImpl.setSelectable方法代码示例

本文整理汇总了Java中org.uberfire.workbench.model.impl.PartDefinitionImpl.setSelectable方法的典型用法代码示例。如果您正苦于以下问题:Java PartDefinitionImpl.setSelectable方法的具体用法?Java PartDefinitionImpl.setSelectable怎么用?Java PartDefinitionImpl.setSelectable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.uberfire.workbench.model.impl.PartDefinitionImpl的用法示例。


在下文中一共展示了PartDefinitionImpl.setSelectable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setupLibraryPerspective

import org.uberfire.workbench.model.impl.PartDefinitionImpl; //导入方法依赖的package包/类
private void setupLibraryPerspective() {
    OrganizationalUnit activeOu = projectContext.getActiveOrganizationalUnit()
                                                .orElseThrow(() -> new IllegalStateException("Cannot setup library perspective without active organizational unit."));
    PortablePreconditions.checkNotNull("libraryPerspective",
                                       libraryPerspective);

    final PlaceRequest placeRequest = new DefaultPlaceRequest(LibraryPlaces.LIBRARY_SCREEN);
    final PartDefinitionImpl part = new PartDefinitionImpl(placeRequest);
    part.setSelectable(false);

    if (!projectContext.getActiveWorkspaceProject().isPresent()) {
        projectContextChangeEvent.fire(new WorkspaceProjectContextChangeEvent(activeOu));
    }

    closeLibraryPlaces();
    placeManager.goTo(part,
                      libraryPerspective.getRootPanel());

    setupLibraryBreadCrumbsWithoutProject();

    hideDocks();
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:23,代码来源:LibraryPlaces.java

示例2: goToImportProjects

import org.uberfire.workbench.model.impl.PartDefinitionImpl; //导入方法依赖的package包/类
public void goToImportProjects(final String repositoryUrl) {
    if (closeAllPlacesOrNothing()) {
        Map<String, String> params = new HashMap<>();
        params.put("title",
                   ts.getTranslation(LibraryConstants.ImportProjects));
        if (repositoryUrl != null) {
            params.put("repositoryUrl",
                       repositoryUrl);
        }
        final DefaultPlaceRequest placeRequest = new DefaultPlaceRequest(LibraryPlaces.IMPORT_PROJECTS_SCREEN,
                                                                         params);
        final PartDefinitionImpl part = new PartDefinitionImpl(placeRequest);
        part.setSelectable(false);

        placeManager.goTo(part,
                          libraryPerspective.getRootPanel());
        setupLibraryBreadCrumbsForImportProjects(repositoryUrl);
    }
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:20,代码来源:LibraryPlaces.java

示例3: goToPreferences

import org.uberfire.workbench.model.impl.PartDefinitionImpl; //导入方法依赖的package包/类
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();
    }
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:19,代码来源:LibraryPlaces.java

示例4: goToOrganizationalUnitsTest

import org.uberfire.workbench.model.impl.PartDefinitionImpl; //导入方法依赖的package包/类
@Test
public void goToOrganizationalUnitsTest() {
    final PlaceRequest placeRequest = new DefaultPlaceRequest(LibraryPlaces.ORGANIZATIONAL_UNITS_SCREEN);
    final PartDefinitionImpl part = new PartDefinitionImpl(placeRequest);
    part.setSelectable(false);

    libraryPlaces.goToOrganizationalUnits();

    verify(projectContextChangeEvent).fire(projectContextChangeEventArgumentCaptor.capture());
    assertNull(projectContextChangeEventArgumentCaptor.getValue().getOrganizationalUnit());

    final ArgumentCaptor<WorkspaceProjectContextChangeEvent> eventArgumentCaptor = ArgumentCaptor.forClass(WorkspaceProjectContextChangeEvent.class);
    verify(projectContextChangeEvent).fire(eventArgumentCaptor.capture());
    final WorkspaceProjectContextChangeEvent event = eventArgumentCaptor.getValue();
    assertNull(event.getOrganizationalUnit());
    assertNull(event.getWorkspaceProject());
    verify(placeManager).closeAllPlacesOrNothing();
    verify(placeManager).goTo(eq(part),
                              any(PanelDefinition.class));
    verify(libraryPlaces).setupLibraryBreadCrumbs();
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:22,代码来源:LibraryPlacesTest.java

示例5: goToLibraryWithDefaultOrganizationalUnitTest

import org.uberfire.workbench.model.impl.PartDefinitionImpl; //导入方法依赖的package包/类
@Test
public void goToLibraryWithDefaultOrganizationalUnitTest() {
    when(projectContext.getActiveOrganizationalUnit()).thenReturn(Optional.empty())
                                                      .thenReturn(Optional.of(mock(OrganizationalUnit.class)));
    doReturn(Optional.empty()).when(projectContext).getActiveWorkspaceProject();
    doReturn(Optional.empty()).when(projectContext).getActiveModule();

    final PlaceRequest placeRequest = new DefaultPlaceRequest(LibraryPlaces.LIBRARY_SCREEN);
    final PartDefinitionImpl part = new PartDefinitionImpl(placeRequest);
    part.setSelectable(false);

    libraryPlaces.goToLibrary();

    verify(libraryPlaces).closeLibraryPlaces();
    verify(placeManager).goTo(eq(part),
                              any(PanelDefinition.class));
    verify(libraryPlaces).setupLibraryBreadCrumbsWithoutProject();
    verify(projectContextChangeEvent,
           times(2)).fire(any(WorkspaceProjectContextChangeEvent.class));
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:21,代码来源:LibraryPlacesTest.java

示例6: goToLibraryFromOrganizationalUnitsScreenTest

import org.uberfire.workbench.model.impl.PartDefinitionImpl; //导入方法依赖的package包/类
@Test
public void goToLibraryFromOrganizationalUnitsScreenTest() {
    doReturn(Optional.of(activeOrganizationalUnit)).when(projectContext).getActiveOrganizationalUnit();
    doReturn(Optional.empty()).when(projectContext).getActiveWorkspaceProject();
    doReturn(Optional.empty()).when(projectContext).getActiveModule();

    final PlaceRequest placeRequest = new DefaultPlaceRequest(LibraryPlaces.LIBRARY_SCREEN);
    final PartDefinitionImpl part = new PartDefinitionImpl(placeRequest);
    part.setSelectable(false);

    libraryPlaces.goToLibrary();

    verify(libraryPlaces).closeLibraryPlaces();
    verify(placeManager).goTo(eq(part),
                              any(PanelDefinition.class));
    verify(libraryPlaces).setupLibraryBreadCrumbsWithoutProject();
    verify(projectContextChangeEvent,
           times(1)).fire(any(WorkspaceProjectContextChangeEvent.class));
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:20,代码来源:LibraryPlacesTest.java

示例7: goToLibraryWhenGoingBackFromProjectTest

import org.uberfire.workbench.model.impl.PartDefinitionImpl; //导入方法依赖的package包/类
@Test
public void goToLibraryWhenGoingBackFromProjectTest() {
    doReturn(Optional.of(activeOrganizationalUnit)).when(projectContext).getActiveOrganizationalUnit();
    activeProject = new WorkspaceProject(activeOrganizationalUnit,
                                         activeRepository,
                                         activeBranch,
                                         activeModule);
    doReturn(Optional.of(activeProject)).when(projectContext).getActiveWorkspaceProject();
    doReturn(Optional.of(activeModule)).when(projectContext).getActiveModule();

    final PlaceRequest placeRequest = new DefaultPlaceRequest(LibraryPlaces.LIBRARY_SCREEN);
    final PartDefinitionImpl part = new PartDefinitionImpl(placeRequest);
    part.setSelectable(false);

    libraryPlaces.goToLibrary();

    verify(libraryPlaces).closeLibraryPlaces();
    verify(placeManager).goTo(eq(part),
                              any(PanelDefinition.class));
    verify(libraryPlaces).setupLibraryBreadCrumbsWithoutProject();
    verify(projectContextChangeEvent,
           never()).fire(any(WorkspaceProjectContextChangeEvent.class));
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:24,代码来源:LibraryPlacesTest.java

示例8: goToTrySamplesTest

import org.uberfire.workbench.model.impl.PartDefinitionImpl; //导入方法依赖的package包/类
@Test
public void goToTrySamplesTest() {
    doReturn(true).when(libraryPlaces).closeAllPlacesOrNothing();

    Map<String, String> params = new HashMap<>();
    params.put("trySamples",
               "true");
    final PlaceRequest trySamplesScreen = new DefaultPlaceRequest(LibraryPlaces.IMPORT_PROJECTS_SCREEN,
                                                                  params);
    final PartDefinitionImpl part = new PartDefinitionImpl(trySamplesScreen);
    part.setSelectable(false);

    libraryPlaces.goToTrySamples();

    verify(libraryPlaces).closeAllPlacesOrNothing();
    verify(placeManager).goTo(eq(part),
                              any(PanelDefinition.class));
    verify(libraryPlaces).setupLibraryBreadCrumbsForTrySamples();
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:20,代码来源:LibraryPlacesTest.java

示例9: goToImportProjectsTest

import org.uberfire.workbench.model.impl.PartDefinitionImpl; //导入方法依赖的package包/类
@Test
public void goToImportProjectsTest() {
    doReturn(true).when(libraryPlaces).closeAllPlacesOrNothing();

    Map<String, String> params = new HashMap<>();
    params.put("title",
               null);
    params.put("repositoryUrl",
               "repositoryUrl");
    final PlaceRequest importProjectsScreen = new DefaultPlaceRequest(LibraryPlaces.IMPORT_PROJECTS_SCREEN,
                                                                  params);
    final PartDefinitionImpl part = new PartDefinitionImpl(importProjectsScreen);
    part.setSelectable(false);

    libraryPlaces.goToImportProjects("repositoryUrl");

    verify(libraryPlaces).closeAllPlacesOrNothing();
    verify(placeManager).goTo(eq(part),
                              any(PanelDefinition.class));
    verify(libraryPlaces).setupLibraryBreadCrumbsForImportProjects("repositoryUrl");
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:22,代码来源:LibraryPlacesTest.java

示例10: goToPreferencesTest

import org.uberfire.workbench.model.impl.PartDefinitionImpl; //导入方法依赖的package包/类
@Test
public void goToPreferencesTest() {
    final PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo = mock(PreferenceScopeResolutionStrategyInfo.class);
    doReturn(scopeResolutionStrategyInfo).when(projectScopedResolutionStrategySupplier).get();

    final DefaultPlaceRequest placeRequest = new DefaultPlaceRequest(PreferencesRootScreen.IDENTIFIER);
    final PartDefinitionImpl part = new PartDefinitionImpl(placeRequest);
    part.setSelectable(false);

    libraryPlaces.goToPreferences();

    verify(placeManager).goTo(eq(part),
                              any(PanelDefinition.class));
    verify(preferencesCentralInitializationEvent).fire(new PreferencesCentralInitializationEvent("ProjectPreferences",
                                                                                                 scopeResolutionStrategyInfo,
                                                                                                 null));
    verify(libraryPlaces).setupLibraryBreadCrumbsForPreferences();
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:19,代码来源:LibraryPlacesTest.java

示例11: resizePanelBodyForUnselectablePart

import org.uberfire.workbench.model.impl.PartDefinitionImpl; //导入方法依赖的package包/类
@Test
public void resizePanelBodyForUnselectablePart() {
    final PartDefinitionImpl partDefinition = new PartDefinitionImpl(mock(PlaceRequest.class));
    partDefinition.setSelectable(false);
    listBar.currentPart = new Pair<>(partDefinition,
                                     mock(FlowPanel.class));

    listBar.resizePanelBody();

    verify(listBar.content.getElement().getStyle()).setProperty("height",
                                                                "100%");
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:13,代码来源:ListBarWidgetImplTest.java

示例12: resizePanelBodyForSelectablePart

import org.uberfire.workbench.model.impl.PartDefinitionImpl; //导入方法依赖的package包/类
@Test
public void resizePanelBodyForSelectablePart() {
    final PartDefinitionImpl partDefinition = new PartDefinitionImpl(mock(PlaceRequest.class));
    partDefinition.setSelectable(true);
    listBar.currentPart = new Pair<>(partDefinition,
                                     mock(FlowPanel.class));
    doReturn(10).when(listBar.header).getOffsetHeight();

    listBar.resizePanelBody();

    verify(listBar.content.getElement().getStyle()).setProperty("height",
                                                                "calc(100% - 10px)");
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:14,代码来源:ListBarWidgetImplTest.java

示例13: goToOrganizationalUnits

import org.uberfire.workbench.model.impl.PartDefinitionImpl; //导入方法依赖的package包/类
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();
    }
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:16,代码来源:LibraryPlaces.java

示例14: goToProject

import org.uberfire.workbench.model.impl.PartDefinitionImpl; //导入方法依赖的package包/类
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();
    }
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:15,代码来源:LibraryPlaces.java

示例15: goToOrgUnitsMetrics

import org.uberfire.workbench.model.impl.PartDefinitionImpl; //导入方法依赖的package包/类
public void goToOrgUnitsMetrics() {
    final PlaceRequest metricsScreen = new DefaultPlaceRequest(LibraryPlaces.ORG_UNITS_METRICS_SCREEN);
    final PartDefinitionImpl part = new PartDefinitionImpl(metricsScreen);
    part.setSelectable(false);
    placeManager.goTo(part,
                      libraryPerspective.getRootPanel());
    setupLibraryBreadCrumbsForOrgUnitsMetrics();
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:9,代码来源:LibraryPlaces.java


注:本文中的org.uberfire.workbench.model.impl.PartDefinitionImpl.setSelectable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。