Пример #1
0
 private void setAttributes() {
   remoteObject.set(PROPERTY_PARENT, uiRenderer.getRemoteUIId());
   remoteObject.set(PROPERTY_TOP_LEVEL, descriptor.isTopLevel());
   if (descriptor.getPageStyle() != null && descriptor.getPageStyle().length > 0) {
     remoteObject.set(PROPERTY_STYLE, createPageStyleParameter(descriptor.getPageStyle()));
   }
   setImage();
 }
Пример #2
0
 private RemotePage createPage() {
   PageDescriptor descriptor = spy(new PageDescriptor("foo", TestPage.class));
   UI ui = mock(UI.class);
   RemoteUI uiRenderer = mock(RemoteUI.class);
   when(uiRenderer.getRemoteUIId()).thenReturn("foo");
   RemotePage renderer2 = new RemotePage(ui, uiRenderer, descriptor, mock(PageData.class));
   renderer2.createControl(shell);
   return spy(renderer2);
 }