@Override public void appendChild( final Position position, final PanelDefinition panel ) { super.appendChild( position, panel ); }
public TemplatePerspectiveDefinitionImpl() { this.root = new PanelDefinitionImpl( PanelType.TEMPLATE ); }
private PerspectiveDefinition buildPerspective() { final PerspectiveDefinitionImpl perspective = new PerspectiveDefinitionImpl( MultiListWorkbenchPanelPresenter.class.getName()); perspective.setName("Plugin Authoring"); return perspective; } }
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; } }
@Before public void setUp() throws Exception { panelDefinition = new PanelDefinitionImpl(); otherPanel = new PanelDefinitionImpl(); parent = new PanelDefinitionImpl(); placeRequest = mock(PlaceRequest.class); part = new PartDefinitionImpl(placeRequest); }
@Perspective public PerspectiveDefinition buildPerspective() { PerspectiveDefinition perspective = new PerspectiveDefinitionImpl( MultiListWorkbenchPanelPresenter.class.getName() ); perspective.setName( "Data Source Authoring" ); final PanelDefinition west = new PanelDefinitionImpl( MultiListWorkbenchPanelPresenter.class.getName() ); west.setWidth( 400 ); west.setMinWidth( 300 ); west.addPart( new PartDefinitionImpl( new DefaultPlaceRequest( DataSourceDefExplorerScreen.SCREEN_ID ) ) ); perspective.getRoot().insertChild( CompassPosition.WEST, west ); return perspective; } }
@Override public PartDefinition addPart(String partSpec) { PartDefinition pd = new PartDefinitionImpl(DefaultPlaceRequest.parse(partSpec)); addPart(pd); return pd; }
public PerspectiveDefinitionImpl(final String panelType) { checkNotNull("type", panelType); PanelDefinitionImpl root = new PanelDefinitionImpl(panelType); root.setRoot(true); this.root = root; }
@Test public void defineParentPanel() throws Exception { PanelDefinitionImpl parentMock = createParentMock(); part.setParentPanel(parentMock); assertEquals(parentMock, part.getParentPanel()); } }
@Test(expected = IllegalStateException.class) public void defineParentPanelWithOldParent() throws Exception { PanelDefinitionImpl parentMock = createParentMock(); part.setParentPanel(parentMock); part.setParentPanel(anotherParent); }
@Override public void appendChild(final PanelDefinition panel) { if (panel == null) { return; } if (children.contains(panel)) { return; } // parent wiring ((PanelDefinitionImpl) panel).setParent(this); children.add(panel); }
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; } }
@Before public void setUp() throws Exception { panelDefinition = new PanelDefinitionImpl(); otherPanel = new PanelDefinitionImpl(); parent = new PanelDefinitionImpl(); placeRequest = mock(PlaceRequest.class); part = new PartDefinitionImpl(placeRequest); }
private PerspectiveDefinition buildPerspective() { final PerspectiveDefinitionImpl perspective = new PerspectiveDefinitionImpl( MultiListWorkbenchPanelPresenter.class.getName()); perspective.setName("Plugin Authoring"); return perspective; } }
PanelDefinition addWorkbenchPanelTo( Position position ) { return new PanelDefinitionImpl( PanelType.ROOT_SIMPLE ); }
@Test public void defineParentPanel() throws Exception { PanelDefinitionImpl parentMock = createParentMock(); part.setParentPanel(parentMock); assertEquals(parentMock, part.getParentPanel()); } }
@Test(expected = IllegalStateException.class) public void defineParentPanelWithOldParent() throws Exception { PanelDefinitionImpl parentMock = createParentMock(); part.setParentPanel(parentMock); part.setParentPanel(anotherParent); }
@Before public void setUp() throws Exception { PlaceRequest placeRequest = mock(PlaceRequest.class); part = new PartDefinitionImpl(placeRequest); parent = new PanelDefinitionImpl(); anotherParent = new PanelDefinitionImpl(); }
@Before public void setUp() throws Exception { PlaceRequest placeRequest = mock(PlaceRequest.class); part = new PartDefinitionImpl(placeRequest); parent = new PanelDefinitionImpl(); anotherParent = new PanelDefinitionImpl(); }