gpt4 book ai didi

org.uberfire.client.workbench.part.WorkbenchPartPresenter.setContextId()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 13:27:05 27 4
gpt4 key购买 nike

本文整理了Java中org.uberfire.client.workbench.part.WorkbenchPartPresenter.setContextId()方法的一些代码示例,展示了WorkbenchPartPresenter.setContextId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WorkbenchPartPresenter.setContextId()方法的具体详情如下:
包路径:org.uberfire.client.workbench.part.WorkbenchPartPresenter
类名称:WorkbenchPartPresenter
方法名:setContextId

WorkbenchPartPresenter.setContextId介绍

暂无

代码示例

代码示例来源:origin: kiegroup/appformer

panelPresenter.getPartType());
partPresenter.setWrappedWidget(uiPart.getWidget());
partPresenter.setContextId(contextId);
mapPartDefinitionToPresenter.put(partDef,
                 partPresenter);

代码示例来源:origin: kiegroup/appformer

never()).setWrappedWidget(uiPart.getWidget());
verify(partPresenter,
    never()).setContextId("rootContextId");

代码示例来源:origin: org.uberfire/uberfire-workbench-client

never()).setWrappedWidget(uiPart.getWidget());
verify(partPresenter,
    never()).setContextId("rootContextId");

代码示例来源:origin: org.uberfire/uberfire-workbench-client

@Test
public void addPartToRootPanelShouldWork() throws Exception {
  PlaceRequest rootPartPlace = new DefaultPlaceRequest("rootPartPlace");
  PartDefinition rootPart = new PartDefinitionImpl(rootPartPlace);
  Menus rootPartMenus = MenuFactory.newContributedMenu("RootPartMenu").endMenu().build();
  UIPart rootUiPart = new UIPart("RootUiPart",
                  null,
                  mock(IsWidget.class));
  panelManager.addWorkbenchPart(rootPartPlace,
                 rootPart,
                 panelManager.getRoot(),
                 rootPartMenus,
                 rootUiPart,
                 "rootContextId",
                 100,
                 200);
  // the presenter should have been created and configured for the rootPart
  verify(partPresenter).setWrappedWidget(rootUiPart.getWidget());
  verify(partPresenter).setContextId("rootContextId");
  // the panel manager should be aware of the place/part mapping for the added part
  assertEquals(rootPart,
         panelManager.getPartForPlace(rootPartPlace));
  // the panel manager should select the place, firing a general notification
  verify(selectPlaceEvent).fire(refEq(new SelectPlaceEvent(rootPartPlace)));
  // the panel manager should have modified the panel or part definitions (this is the responsibility of the parent panel)
  assertEquals(null,
         rootPart.getParentPanel());
  assertFalse(panelManager.getRoot().getParts().contains(rootPart));
}

代码示例来源:origin: kiegroup/appformer

@Test
public void addPartToRootPanelShouldWork() throws Exception {
  PlaceRequest rootPartPlace = new DefaultPlaceRequest("rootPartPlace");
  PartDefinition rootPart = new PartDefinitionImpl(rootPartPlace);
  Menus rootPartMenus = MenuFactory.newContributedMenu("RootPartMenu").endMenu().build();
  UIPart rootUiPart = new UIPart("RootUiPart",
                  null,
                  mock(IsWidget.class));
  panelManager.addWorkbenchPart(rootPartPlace,
                 rootPart,
                 panelManager.getRoot(),
                 rootPartMenus,
                 rootUiPart,
                 "rootContextId",
                 100,
                 200);
  // the presenter should have been created and configured for the rootPart
  verify(partPresenter).setWrappedWidget(rootUiPart.getWidget());
  verify(partPresenter).setContextId("rootContextId");
  // the panel manager should be aware of the place/part mapping for the added part
  assertEquals(rootPart,
         panelManager.getPartForPlace(rootPartPlace));
  // the panel manager should select the place, firing a general notification
  verify(selectPlaceEvent).fire(refEq(new SelectPlaceEvent(rootPartPlace)));
  // the panel manager should have modified the panel or part definitions (this is the responsibility of the parent panel)
  assertEquals(null,
         rootPart.getParentPanel());
  assertFalse(panelManager.getRoot().getParts().contains(rootPart));
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com