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


Java PanelDefinition.appendChild方法代码示例

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


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

示例1: appendChild

import org.uberfire.workbench.model.PanelDefinition; //导入方法依赖的package包/类
@Override
public void appendChild(final Position position,
                        final PanelDefinition panel) {

    if (panel == null) {
        return;
    }
    if (children.contains(panel)) {
        return;
    }
    checkPosition(position);
    panel.setPosition(position);
    final PanelDefinition existingChild = getChild(position);
    if (existingChild == null) {

        // parent wiring
        ((PanelDefinitionImpl) panel).setParent(this);

        children.add(panel);
    } else {
        existingChild.appendChild(position,
                                  panel);
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:25,代码来源:PanelDefinitionImpl.java

示例2: buildPerspective

import org.uberfire.workbench.model.PanelDefinition; //导入方法依赖的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

示例3: buildPerspective

import org.uberfire.workbench.model.PanelDefinition; //导入方法依赖的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

示例4: shouldDestroyAllOldPanelsWhenSwitchingRoot

import org.uberfire.workbench.model.PanelDefinition; //导入方法依赖的package包/类
@Test
public void shouldDestroyAllOldPanelsWhenSwitchingRoot() throws Exception {
    PerspectiveDefinition fooPerspectiveDef = new PerspectiveDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    PanelDefinition rootPanel = fooPerspectiveDef.getRoot();
    PanelDefinition fooPanel = new PanelDefinitionImpl(SimpleWorkbenchPanelPresenter.class.getName());
    PanelDefinition fooChildPanel = new PanelDefinitionImpl(SimpleWorkbenchPanelPresenter.class.getName());
    PanelDefinition barPanel = new PanelDefinitionImpl(SimpleWorkbenchPanelPresenter.class.getName());
    PanelDefinition bazPanel = new PanelDefinitionImpl(SimpleWorkbenchPanelPresenter.class.getName());

    rootPanel.appendChild(fooPanel);
    rootPanel.appendChild(barPanel);
    rootPanel.appendChild(bazPanel);

    fooPanel.appendChild(fooChildPanel);

    PerspectiveActivity fooPerspective = mock(PerspectiveActivity.class);
    when(fooPerspective.getDefaultPerspectiveLayout()).thenReturn(fooPerspectiveDef);
    when(fooPerspective.isTransient()).thenReturn(true);

    perspectiveManager.switchToPerspective(pr,
                                           fooPerspective,
                                           doWhenFinished);
    perspectiveManager.switchToPerspective(pr,
                                           oz,
                                           doWhenFinished);

    verify(panelManager).removeWorkbenchPanel(fooPanel);
    verify(panelManager).removeWorkbenchPanel(fooChildPanel);
    verify(panelManager).removeWorkbenchPanel(barPanel);
    verify(panelManager).removeWorkbenchPanel(bazPanel);
    verify(panelManager,
           never()).removeWorkbenchPanel(rootPanel);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:34,代码来源:PerspectiveManagerTest.java

示例5: buildPerspective

import org.uberfire.workbench.model.PanelDefinition; //导入方法依赖的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 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 actionsPanel = new PanelDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    actionsPanel.setMinWidth(MIN_WIDTH_PANEL);
    actionsPanel.setWidth(WIDTH_PANEL);
    actionsPanel.addPart(new PartDefinitionImpl(new DefaultPlaceRequest(WIRES_ACTIONS_SCREEN)));

    layersPanel.appendChild(CompassPosition.SOUTH,
                            actionsPanel);

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

    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);

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

示例6: shouldAddAllPanelsToPanelManager

import org.uberfire.workbench.model.PanelDefinition; //导入方法依赖的package包/类
@Test
public void shouldAddAllPanelsToPanelManager() throws Exception {
    PanelDefinition westPanel = new PanelDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    PanelDefinition eastPanel = new PanelDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    PanelDefinition northPanel = new PanelDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    PanelDefinition southPanel = new PanelDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
    PanelDefinition southWestPanel = new PanelDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());

    ozDefinition.getRoot().appendChild(CompassPosition.WEST,
                                       westPanel);
    ozDefinition.getRoot().appendChild(CompassPosition.EAST,
                                       eastPanel);
    ozDefinition.getRoot().appendChild(CompassPosition.NORTH,
                                       northPanel);
    ozDefinition.getRoot().appendChild(CompassPosition.SOUTH,
                                       southPanel);
    southPanel.appendChild(CompassPosition.WEST,
                           southWestPanel);

    // we assume this will be set correctly (verified elsewhere)
    when(panelManager.getRoot()).thenReturn(ozDefinition.getRoot());

    perspectiveManager.switchToPerspective(pr,
                                           oz,
                                           doWhenFinished);

    verify(panelManager).addWorkbenchPanel(ozDefinition.getRoot(),
                                           westPanel,
                                           CompassPosition.WEST);
    verify(panelManager).addWorkbenchPanel(ozDefinition.getRoot(),
                                           eastPanel,
                                           CompassPosition.EAST);
    verify(panelManager).addWorkbenchPanel(ozDefinition.getRoot(),
                                           northPanel,
                                           CompassPosition.NORTH);
    verify(panelManager).addWorkbenchPanel(ozDefinition.getRoot(),
                                           southPanel,
                                           CompassPosition.SOUTH);
    verify(panelManager).addWorkbenchPanel(southPanel,
                                           southWestPanel,
                                           CompassPosition.WEST);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:43,代码来源:PerspectiveManagerTest.java


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