本文整理汇总了Java中org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl类的典型用法代码示例。如果您正苦于以下问题:Java PerspectiveDefinitionImpl类的具体用法?Java PerspectiveDefinitionImpl怎么用?Java PerspectiveDefinitionImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PerspectiveDefinitionImpl类属于org.uberfire.workbench.model.impl包,在下文中一共展示了PerspectiveDefinitionImpl类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: buildPerspective
import org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl; //导入依赖的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: buildPerspective
import org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl; //导入依赖的package包/类
public PerspectiveDefinition buildPerspective() {
final PerspectiveDefinition perspectiveDefinition = new PerspectiveDefinitionImpl(getDefaultPanelType());
perspectiveDefinition.setName(getId());
final String contextId = getContextId();
if (contextId != null) {
perspectiveDefinition.setContextDefinition(new ContextDefinitionImpl(new DefaultPlaceRequest(contextId)));
}
perspectiveDefinition.setContextDisplayMode(getContextDisplayMode());
final JSPanelDefinition view = getView(obj);
final JsArray<JSPartDefinition> parts = view.getParts();
final JsArray<JSPanelDefinition> panels = view.getChildren();
final PanelDefinition root = perspectiveDefinition.getRoot();
buildParts(root,
parts);
buildPanels(root,
panels);
return perspectiveDefinition;
}
开发者ID:kiegroup,项目名称:appformer,代码行数:24,代码来源:JSNativePerspective.java
示例3: setup
import org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Before
public void setup() {
perspectiveDef = new PerspectiveDefinitionImpl();
when(panelManager.getRoot()).thenReturn(mock(PanelDefinition.class));
doAnswer(new Answer<Object>() {
@SuppressWarnings("rawtypes")
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
((ParameterizedCommand) invocation.getArguments()[1]).execute(perspectiveDef);
return null;
}
}).when(wbServices).loadPerspective(any(String.class),
any(ParameterizedCommand.class));
}
开发者ID:kiegroup,项目名称:appformer,代码行数:18,代码来源:AbstractPerspectiveActivityTest.java
示例4: shouldSaveNonTransientPerspectives
import org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl; //导入依赖的package包/类
@Test
public void shouldSaveNonTransientPerspectives() 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(false);
perspectiveManager.switchToPerspective(pr,
kansas,
doWhenFinished);
perspectiveManager.savePerspectiveState(doWhenFinishedSave);
verify(wbServices).save(eq("kansas_perspective"),
eq(kansasDefinition),
eq(doWhenFinishedSave));
}
开发者ID:kiegroup,项目名称:appformer,代码行数:19,代码来源:PerspectiveManagerTest.java
示例5: shouldNotSaveTransientPerspectives
import org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl; //导入依赖的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.impl.PerspectiveDefinitionImpl; //导入依赖的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.impl.PerspectiveDefinitionImpl; //导入依赖的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.impl.PerspectiveDefinitionImpl; //导入依赖的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.impl.PerspectiveDefinitionImpl; //导入依赖的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: getDefaultPerspectiveLayout
import org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl; //导入依赖的package包/类
@Override
public PerspectiveDefinition getDefaultPerspectiveLayout() {
PerspectiveDefinition pd = new PerspectiveDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
pd.getRoot().setElementId(LIST_PANEL_ID);
pd.getRoot().addPart(MaximizeTestScreen.class.getName() + "?debugId=1");
pd.getRoot().addPart(MaximizeTestScreen.class.getName() + "?debugId=2");
PanelDefinitionImpl simplePanel = new PanelDefinitionImpl(SimpleDnDWorkbenchPanelPresenter.class.getName());
simplePanel.setHeight(200);
simplePanel.setElementId(SIMPLE_PANEL_ID);
simplePanel.addPart(MaximizeTestScreen.class.getName() + "?debugId=5");
pd.getRoot().appendChild(CompassPosition.SOUTH,
simplePanel);
PanelDefinitionImpl tabPanel = new PanelDefinitionImpl(MultiTabWorkbenchPanelPresenter.class.getName());
tabPanel.setElementId(TAB_PANEL_ID);
tabPanel.setWidth(300);
tabPanel.addPart(MaximizeTestScreen.class.getName() + "?debugId=3");
tabPanel.addPart(MaximizeTestScreen.class.getName() + "?debugId=4");
pd.getRoot().appendChild(CompassPosition.WEST,
tabPanel);
return pd;
}
开发者ID:kiegroup,项目名称:appformer,代码行数:25,代码来源:MaximizeTestPerspective.java
示例11: getPerspective
import org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl; //导入依赖的package包/类
@Perspective
public PerspectiveDefinition getPerspective() {
final PerspectiveDefinition perspective = new PerspectiveDefinitionImpl( MultiListWorkbenchPanelPresenter.class.getName() );
perspective.setName( constants.administration() );
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,项目名称:kie-wb-distributions,代码行数:17,代码来源:AdministrationPerspective.java
示例12: getPerspective
import org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl; //导入依赖的package包/类
@Perspective
public PerspectiveDefinition getPerspective() {
final PerspectiveDefinition perspective = new PerspectiveDefinitionImpl( MultiListWorkbenchPanelPresenter.class.getName() );
perspective.setName( constants.Administration() );
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,项目名称:kie-wb-distributions,代码行数:17,代码来源:AdministrationPerspective.java
示例13: buildPerspective
import org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl; //导入依赖的package包/类
@Perspective
public PerspectiveDefinition buildPerspective() {
final PerspectiveDefinition perspective = new PerspectiveDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
perspective.setName(AppConstants.INSTANCE.AdministrationPerspectiveName());
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,项目名称:drools-wb,代码行数:18,代码来源:AdministrationPerspective.java
示例14: buildPerspective
import org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl; //导入依赖的package包/类
@Perspective
public PerspectiveDefinition buildPerspective() {
this.perspective = new PerspectiveDefinitionImpl( ROOT_STATIC );
perspective.setName( WIRES );
perspective.getRoot().addPart( new PartDefinitionImpl( new DefaultPlaceRequest( BAYESIAN_SCREEN ) ) );
this.createPanelWithChild( perspective,
Position.EAST );
this.drawPanel( perspective,
Position.SOUTH,
BAYESIAN_SOUTH_SCREEN );
perspective.setTransient( true );
return perspective;
}
开发者ID:Salaboy,项目名称:wires,代码行数:18,代码来源:WiresBayesianPerspective.java
示例15: buildPerspective
import org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl; //导入依赖的package包/类
@Perspective
public PerspectiveDefinition buildPerspective() {
PerspectiveDefinition perspective = new PerspectiveDefinitionImpl( StaticWorkbenchPanelPresenter.class.getName() );
perspective.setName("MainPerspective");
perspective.getRoot().addPart(new PartDefinitionImpl(new DefaultPlaceRequest(Constants.DATA_SERVICES_LIBRARY_SCREEN)));
return perspective;
}
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:9,代码来源:MainPerspective.java
示例16: testPanelHierarchyInsert
import org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl; //导入依赖的package包/类
@Test
public void testPanelHierarchyInsert() {
PerspectiveDefinition perspective = new PerspectiveDefinitionImpl("what.ever.panel.PresenterClass");
perspective.setName("perspective");
PanelDefinition westPanel = new PanelDefinitionImpl("what.ever.panel.PresenterClass");
PanelDefinition eastPanel = new PanelDefinitionImpl("what.ever.panel.PresenterClass");
PartDefinition part1 = new PartDefinitionImpl(new DefaultPlaceRequest("one"));
PartDefinition part2 = new PartDefinitionImpl(new DefaultPlaceRequest("two"));
perspective.getRoot().insertChild(CompassPosition.WEST,
westPanel);
perspective.getRoot().insertChild(CompassPosition.EAST,
eastPanel);
westPanel.addPart(part1);
eastPanel.addPart(part2);
assertTrue(part1.getParentPanel() == westPanel);
assertTrue(westPanel.getParent() == perspective.getRoot()); // TODO: panel equality?
assertTrue(part2.getParentPanel() == eastPanel);
assertTrue(eastPanel.getParent() == perspective.getRoot());
assertTrue(perspective.getRoot().getParent() == null);
}
开发者ID:kiegroup,项目名称:appformer,代码行数:28,代码来源:TestWorkbenchModel.java
示例17: testPanelHierarchyAppend
import org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl; //导入依赖的package包/类
@Test
public void testPanelHierarchyAppend() {
PerspectiveDefinition perspective = new PerspectiveDefinitionImpl("what.ever.panel.PresenterClass");
perspective.setName("perspective");
PanelDefinition westPanel = new PanelDefinitionImpl("what.ever.panel.PresenterClass");
PanelDefinition eastPanel = new PanelDefinitionImpl("what.ever.panel.PresenterClass");
PartDefinition part1 = new PartDefinitionImpl(new DefaultPlaceRequest("one"));
PartDefinition part2 = new PartDefinitionImpl(new DefaultPlaceRequest("two"));
perspective.getRoot().appendChild(CompassPosition.WEST,
westPanel);
perspective.getRoot().appendChild(CompassPosition.EAST,
eastPanel);
westPanel.addPart(part1);
eastPanel.addPart(part2);
assertTrue(part1.getParentPanel() == westPanel);
assertTrue(westPanel.getParent() == perspective.getRoot()); // TODO: panel equality?
assertTrue(part2.getParentPanel() == eastPanel);
assertTrue(eastPanel.getParent() == perspective.getRoot());
assertTrue(perspective.getRoot().getParent() == null);
}
开发者ID:kiegroup,项目名称:appformer,代码行数:28,代码来源:TestWorkbenchModel.java
示例18: buildPerspective
import org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl; //导入依赖的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
示例19: buildPerspective
import org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl; //导入依赖的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
示例20: buildPerspective
import org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl; //导入依赖的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
注:本文中的org.uberfire.workbench.model.impl.PerspectiveDefinitionImpl类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论