• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java PerspectiveDefinition类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



PerspectiveDefinition类属于org.uberfire.workbench.model包,在下文中一共展示了PerspectiveDefinition类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: buildPerspective

import org.uberfire.workbench.model.PerspectiveDefinition; //导入依赖的package包/类
@Perspective
public PerspectiveDefinition buildPerspective() {
    final PerspectiveDefinition perspective = new PerspectiveDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    perspective.setName(translationService.getTranslation(AppConstants.AdministrationPerspective_AdministrationPerspective));

    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;
}
 
开发者ID:kiegroup,项目名称:optaplanner-wb,代码行数:18,代码来源:AdministrationPerspective.java


示例2: getPerspectiveWithStartupTest

import org.uberfire.workbench.model.PerspectiveDefinition; //导入依赖的package包/类
@Test
public void getPerspectiveWithStartupTest() {
    this.perspective.onStartup(mock(PlaceRequest.class));

    verify(perspective,
           times(1)).createPerspectiveDefinition();
    verify(perspective,
           times(1)).configurePerspective(any(PlaceRequest.class));

    final PerspectiveDefinition perspectiveDefinition = perspective.getPerspective();

    verify(perspective,
           times(1)).createPerspectiveDefinition();
    verify(perspective,
           times(1)).configurePerspective(any(PlaceRequest.class));

    assertNotNull(perspectiveDefinition);
    assertNotNull(perspectiveDefinition.getName());
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:20,代码来源:SecurityManagementPerspectiveTest.java


示例3: execute

import org.uberfire.workbench.model.PerspectiveDefinition; //导入依赖的package包/类
@Override
public void execute() {
    currentPerspective = perspective;
    if (perspective.isTransient()) {
        //Transient Perspectives are not saved and hence cannot be loaded
        doAfterFetch.execute(perspective.getDefaultPerspectiveLayout());
    } else {

        wbServices.loadPerspective(perspective.getIdentifier(),
                                   new ParameterizedCommand<PerspectiveDefinition>() {
                                       @Override
                                       public void execute(final PerspectiveDefinition response) {

                                           if (isAValidDefinition(response)) {
                                               doAfterFetch.execute(response);
                                           } else {
                                               doAfterFetch.execute(perspective.getDefaultPerspectiveLayout());
                                           }
                                       }
                                   });
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:23,代码来源:PerspectiveManagerImpl.java


示例4: switchToPerspective

import org.uberfire.workbench.model.PerspectiveDefinition; //导入依赖的package包/类
private void switchToPerspective(final PlaceRequest place,
                                 final PerspectiveActivity newPerspectiveActivity,
                                 final ParameterizedCommand<PerspectiveDefinition> closeOldPerspectiveOpenPartsAndExecuteChainedCallback) {
    if (closeAllCurrentPanels()) {
        closeAllSplashScreens();
        addSplashScreenFor(place);
        perspectiveManager.switchToPerspective(place,
                                               newPerspectiveActivity,
                                               closeOldPerspectiveOpenPartsAndExecuteChainedCallback);
    } else {

        // some panels didn't want to close, so not going to launch new perspective. clean up its activity.
        try {
            newPerspectiveActivity.onClose();
        } catch (Exception ex) {
            lifecycleErrorHandler.handle(newPerspectiveActivity,
                                         LifecyclePhase.OPEN,
                                         ex);
        }
        existingWorkbenchActivities.remove(newPerspectiveActivity.getPlace());
        activityManager.destroyActivity(newPerspectiveActivity);
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:24,代码来源:PlaceManagerImpl.java


示例5: shouldNotSaveTransientPerspectives

import org.uberfire.workbench.model.PerspectiveDefinition; //导入依赖的package包/类
@Test
public void shouldNotSaveTransientPerspectives() throws Exception {
    PerspectiveDefinition kansasDefinition = new PerspectiveDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());

    PerspectiveActivity kansas = mock(PerspectiveActivity.class);
    when(kansas.getDefaultPerspectiveLayout()).thenReturn(kansasDefinition);
    when(kansas.getIdentifier()).thenReturn("kansas_perspective");
    when(kansas.isTransient()).thenReturn(true);

    perspectiveManager.switchToPerspective(pr,
                                           kansas,
                                           doWhenFinished);
    perspectiveManager.savePerspectiveState(doWhenFinishedSave);

    verify(wbServices,
           never()).save(any(String.class),
                         eq(kansasDefinition),
                         any(Command.class));
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:20,代码来源:PerspectiveManagerTest.java


示例6: createPerspectiveDefinition

import org.uberfire.workbench.model.PerspectiveDefinition; //导入依赖的package包/类
private PerspectiveDefinition createPerspectiveDefinition() {
    PerspectiveDefinitionImpl perspectiveDefinition = new PerspectiveDefinitionImpl();
    PanelDefinition root = perspectiveDefinition.getRoot();
    partDefinitionsRoot.forEach(p -> root.addPart(p));

    PanelDefinitionImpl rootChild1 = new PanelDefinitionImpl("org.uberfire.client.workbench.panels.impl.MultiTabWorkbenchPanelPresenter");
    partDefinitionRootChild1.forEach(p -> rootChild1.addPart(p));

    PanelDefinitionImpl rootChild2 = new PanelDefinitionImpl("org.uberfire.client.workbench.panels.impl.MultiTabWorkbenchPanelPresenter");
    partDefinitionRootChild2.forEach(p -> rootChild2.addPart(p));

    PanelDefinitionImpl rootChild2Child = new PanelDefinitionImpl("org.uberfire.client.workbench.panels.impl.MultiTabWorkbenchPanelPresenter");

    partDefinitionRootChild2Child.forEach(p -> rootChild2Child.addPart(p));

    root.insertChild(mock(Position.class),
                     rootChild1);
    rootChild2.insertChild(mock(Position.class),
                           rootChild2Child);
    root.insertChild(mock(Position.class),
                     rootChild2);

    return perspectiveDefinition;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:25,代码来源:PerspectiveManagerTest.java


示例7: getDefaultPerspectiveLayout

import org.uberfire.workbench.model.PerspectiveDefinition; //导入依赖的package包/类
@Override
public PerspectiveDefinition getDefaultPerspectiveLayout() {
    PerspectiveDefinition def = new PerspectiveDefinitionImpl(MultiTabWorkbenchPanelPresenter.class.getName());
    def.getRoot().addPart(ResizeTestScreenActivity.class.getName());

    PanelDefinition southPanel = new PanelDefinitionImpl(MultiTabWorkbenchPanelPresenter.class.getName());
    southPanel.addPart(DragAndDropScreen.class.getName());
    def.getRoot().appendChild(CompassPosition.SOUTH,
                              southPanel);

    PanelDefinition eastPanel = new PanelDefinitionImpl(MultiTabWorkbenchPanelPresenter.class.getName());
    eastPanel.addPart(NestingScreen.class.getName());
    def.getRoot().appendChild(CompassPosition.EAST,
                              eastPanel);

    return def;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:18,代码来源:MultiPanelPerspective.java


示例8: getDefaultPerspectiveLayout

import org.uberfire.workbench.model.PerspectiveDefinition; //导入依赖的package包/类
@Override
public PerspectiveDefinition getDefaultPerspectiveLayout() {
    PerspectiveDefinition def = new PerspectiveDefinitionImpl(MultiTabWorkbenchPanelPresenter.class.getName());
    def.getRoot().addPart(ResizeTestScreenActivity.class.getName());

    PanelDefinition southPanel = new PanelDefinitionImpl(MultiTabWorkbenchPanelPresenter.class.getName());
    southPanel.addPart(ResizeTestScreenActivity.class.getName() + "?debugId=south");
    def.getRoot().appendChild(CompassPosition.SOUTH,
                              southPanel);

    PanelDefinition westPanel = new PanelDefinitionImpl(MultiTabWorkbenchPanelPresenter.class.getName());
    westPanel.addPart(ResizeTestScreenActivity.class.getName() + "?debugId=west");
    westPanel.setMinWidth(250);
    westPanel.setWidth(300);
    def.getRoot().appendChild(CompassPosition.WEST,
                              westPanel);

    return def;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:20,代码来源:NonTransientMultiPanelPerspective.java


示例9: getDefaultPerspectiveLayout

import org.uberfire.workbench.model.PerspectiveDefinition; //导入依赖的package包/类
@Override
public PerspectiveDefinition getDefaultPerspectiveLayout() {
    PerspectiveDefinition pd = new PerspectiveDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    pd.getRoot().setElementId("DragAndDropPerspective-list");
    pd.getRoot().addPart(DragAndDropScreen.class.getName() + "?debugId=1");
    pd.getRoot().addPart(DragAndDropScreen.class.getName() + "?debugId=2");

    PanelDefinitionImpl tabPanel = new PanelDefinitionImpl(MultiTabWorkbenchPanelPresenter.class.getName());
    tabPanel.setElementId("DragAndDropPerspective-tab");
    tabPanel.setWidth(300);
    tabPanel.addPart(DragAndDropScreen.class.getName() + "?debugId=3");
    tabPanel.addPart(DragAndDropScreen.class.getName() + "?debugId=4");
    pd.getRoot().appendChild(CompassPosition.WEST,
                             tabPanel);

    PanelDefinitionImpl simplePanel = new PanelDefinitionImpl(SimpleDnDWorkbenchPanelPresenter.class.getName());
    simplePanel.setWidth(175);
    simplePanel.setElementId("DragAndDropPerspective-simple");
    simplePanel.addPart(DragAndDropScreen.class.getName() + "?debugId=5");
    pd.getRoot().appendChild(CompassPosition.EAST,
                             simplePanel);

    return pd;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:25,代码来源:DragAndDropPerspective.java


示例10: buildPerspective

import org.uberfire.workbench.model.PerspectiveDefinition; //导入依赖的package包/类
@Perspective
public PerspectiveDefinition buildPerspective() {

    PerspectiveDefinition perspective = new PerspectiveDefinitionImpl(MultiTabWorkbenchPanelPresenter.class.getName());
    perspective.setName(AppConstants.INSTANCE.salesreportspersp_salesreports());

    perspective.getRoot().addPart(new PartDefinitionImpl(createPlaceRequest(OPPS_ALLOPPS_LISTING)));
    perspective.getRoot().addPart(new PartDefinitionImpl(createPlaceRequest(OPPS_COUNTRY_SUMMARY)));
    return perspective;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:11,代码来源:SalesReportsPerspective.java


示例11: buildPerspective

import org.uberfire.workbench.model.PerspectiveDefinition; //导入依赖的package包/类
@Perspective
public PerspectiveDefinition buildPerspective() {
    final PerspectiveDefinition p = new PerspectiveDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    p.setName("Simple Perspective No Context");
    p.getRoot().addPart("welcome");
    return p;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:8,代码来源:SimplePerspectiveNoContext.java


示例12: buildPerspective

import org.uberfire.workbench.model.PerspectiveDefinition; //导入依赖的package包/类
@Perspective
public PerspectiveDefinition buildPerspective() {
    final PerspectiveDefinition p = new PerspectiveDefinitionImpl(SimpleWorkbenchPanelPresenter.class.getName());
    p.getRoot().addPart(new PartDefinitionImpl(new DefaultPlaceRequest("DynamicScreen")));
    p.setName("Dynamic Perspective");
    return p;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:8,代码来源:DynamicPerspective.java


示例13: getPerspective

import org.uberfire.workbench.model.PerspectiveDefinition; //导入依赖的package包/类
@Perspective
public PerspectiveDefinition getPerspective() {
    if (perspective == null) {
        return createPerspectiveDefinition();
    }

    return perspective;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:9,代码来源:SecurityManagementPerspective.java


示例14: getPerspectiveWithoutStartupTest

import org.uberfire.workbench.model.PerspectiveDefinition; //导入依赖的package包/类
@Test
public void getPerspectiveWithoutStartupTest() {
    final PerspectiveDefinition perspectiveDefinition = perspective.getPerspective();

    verify(perspective).createPerspectiveDefinition();
    verify(perspective,
           never()).configurePerspective(any(PlaceRequest.class));

    assertNotNull(perspectiveDefinition);
    assertNotNull(perspectiveDefinition.getName());
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:12,代码来源:SecurityManagementPerspectiveTest.java


示例15: buildPerspective

import org.uberfire.workbench.model.PerspectiveDefinition; //导入依赖的package包/类
PerspectiveDefinition buildPerspective() {
    PerspectiveDefinition perspective = new PerspectiveDefinitionImpl(StaticWorkbenchPanelPresenter.class.getName());
    perspective.setName("Preferences");

    perspective.getRoot().addPart(new PartDefinitionImpl(new DefaultPlaceRequest(PreferencesRootScreen.IDENTIFIER)));

    return perspective;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:9,代码来源:PreferencesCentralPerspective.java


示例16: buildPerspective

import org.uberfire.workbench.model.PerspectiveDefinition; //导入依赖的package包/类
public PerspectiveDefinition buildPerspective() {
    final PerspectiveDefinition perspectiveDefinition = new PerspectiveDefinitionImpl(getDefaultPanelType());
    perspectiveDefinition.setName(editor.getName());

    final PanelDefinition root = perspectiveDefinition.getRoot();

    final PlaceRequest placeRequest = new DefaultPlaceRequest(screen.getIdentifier());
    final PartDefinition partDefinition = new PartDefinitionImpl(placeRequest);
    root.addPart(partDefinition);

    return perspectiveDefinition;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:13,代码来源:PerspectiveEditorActivity.java


示例17: buildPerspective

import org.uberfire.workbench.model.PerspectiveDefinition; //导入依赖的package包/类
@Perspective
public PerspectiveDefinition buildPerspective() {
    PerspectiveDefinition perspective = new PerspectiveDefinitionImpl(SimpleWorkbenchPanelPresenter.class.getName());
    perspective.setName(WIRES);

    perspective.getRoot().addPart(new PartDefinitionImpl(new DefaultPlaceRequest(BAYESIAN_SCREEN)));

    final PanelDefinition layersPanel = new PanelDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    layersPanel.setMinWidth(MIN_WIDTH_PANEL);
    layersPanel.setWidth(WIDTH_PANEL);
    layersPanel.addPart(new PartDefinitionImpl(new DefaultPlaceRequest(WIRES_LAYERS_SCREEN)));

    final PanelDefinition templatesPanel = new PanelDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    templatesPanel.setMinWidth(MIN_WIDTH_PANEL);
    templatesPanel.setWidth(WIDTH_PANEL);
    templatesPanel.addPart(new PartDefinitionImpl(new DefaultPlaceRequest(WIRES_TEMPLATE_SCREEN)));

    layersPanel.appendChild(CompassPosition.SOUTH,
                            templatesPanel);

    perspective.getRoot().insertChild(CompassPosition.EAST,
                                      layersPanel);

    final PanelDefinition variablesPanel = new PanelDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    variablesPanel.setMinWidth(MIN_WIDTH_PANEL);
    variablesPanel.setWidth(WIDTH_PANEL);
    variablesPanel.addPart(new PartDefinitionImpl(new DefaultPlaceRequest(BAYESIAN_VARIABLES_SCREEN)));

    perspective.getRoot().insertChild(CompassPosition.SOUTH,
                                      variablesPanel);

    return perspective;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:34,代码来源:WiresBayesianPerspective.java


示例18: buildPerspective

import org.uberfire.workbench.model.PerspectiveDefinition; //导入依赖的package包/类
@Perspective
public PerspectiveDefinition buildPerspective() {
    PerspectiveDefinition perspective = new PerspectiveDefinitionImpl(SimpleWorkbenchPanelPresenter.class.getName());
    perspective.setName(WIRES);

    perspective.getRoot().addPart(new PartDefinitionImpl(new DefaultPlaceRequest(WIRES_CANVAS_SCREEN)));

    final PanelDefinition palettePanel = new PanelDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    palettePanel.setMinWidth(MIN_WIDTH_PANEL);
    palettePanel.setWidth(WIDTH_PANEL);
    palettePanel.addPart(new PartDefinitionImpl(new DefaultPlaceRequest(WIRES_PALETTE_SCREEN)));

    final PanelDefinition propertiesPanel = new PanelDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    propertiesPanel.setMinWidth(MIN_WIDTH_PANEL);
    propertiesPanel.setWidth(WIDTH_PANEL);
    propertiesPanel.addPart(new PartDefinitionImpl(new DefaultPlaceRequest(WIRES_PROPERTIES_SCREEN)));
    palettePanel.appendChild(CompassPosition.SOUTH,
                             propertiesPanel);

    perspective.getRoot().insertChild(CompassPosition.WEST,
                                      palettePanel);

    final PanelDefinition layersPanel = new PanelDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    layersPanel.setMinWidth(MIN_WIDTH_PANEL);
    layersPanel.setWidth(WIDTH_PANEL);
    layersPanel.addPart(new PartDefinitionImpl(new DefaultPlaceRequest(WIRES_LAYERS_SCREEN)));

    perspective.getRoot().insertChild(CompassPosition.EAST,
                                      layersPanel);

    return perspective;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:33,代码来源:WiresTreesPerspective.java


示例19: buildPerspective

import org.uberfire.workbench.model.PerspectiveDefinition; //导入依赖的package包/类
@Perspective
public PerspectiveDefinition buildPerspective() {
    PerspectiveDefinition perspective = new PerspectiveDefinitionImpl(SimpleWorkbenchPanelPresenter.class.getName());
    perspective.setName(WIRES);

    perspective.getRoot().addPart(new PartDefinitionImpl(new DefaultPlaceRequest(WIRES_CANVAS_SCREEN)));

    return perspective;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:10,代码来源:WiresGridsDemoPerspective.java


示例20: buildPerspective

import org.uberfire.workbench.model.PerspectiveDefinition; //导入依赖的package包/类
private PerspectiveDefinition buildPerspective() {
    final PerspectiveDefinitionImpl perspective = new PerspectiveDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    perspective.setName(BpmnEditorConstants.INSTANCE.bpmnPerspectiveTitle());

    final PanelDefinition west = new PanelDefinitionImpl(SimpleWorkbenchPanelPresenter.class.getName());
    west.setWidth(300);
    west.setMinWidth(200);
    west.addPart(new PartDefinitionImpl(new DefaultPlaceRequest("BPMN Explorer")));

    perspective.getRoot().insertChild(CompassPosition.WEST,
                                      west);

    return perspective;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:15,代码来源:BpmnPerspective.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java MockFlowExecutionContext类代码示例发布时间:2022-05-23
下一篇:
Java CaptureActivityHandler类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap