Examples of PageRenderer


Examples of com.eclipsesource.tabris.internal.ui.rendering.PageRenderer

  @Test
  public void testCreatePageRenderer() {
    PageDescriptor descriptor = mock( PageDescriptor.class );
    doReturn( TestPage.class ).when( descriptor ).getPageType();

    PageRenderer renderer = rendererFactory.createPageRenderer( ui, uiRenderer, descriptor, new PageData() );

    assertTrue( renderer instanceof WebPage );
  }
View Full Code Here

Examples of com.eclipsesource.tabris.internal.ui.rendering.PageRenderer

  private void createTopLevelPageRenderer( UIImpl ui, List<PageDescriptor> pages ) {
    for( PageDescriptor descriptor : pages ) {
      if( !exist( descriptor ) ) {
        RendererFactory rendererFactory = uiDescriptor.getRendererFactory();
        PageRenderer renderer = rendererFactory.createPageRenderer( ui, uiRenderer, descriptor, new PageData() );
        topLevelPageRenderers.put( descriptor, renderer );
        renderer.createControl( pageParent );
      }
    }
  }
View Full Code Here

Examples of com.eclipsesource.tabris.internal.ui.rendering.PageRenderer

      showPage( ui, newPageDescriptor, data );
    }
  }

  void showRoot( UIImpl ui, PageDescriptor newPageDescriptor, PageData data ) {
    PageRenderer oldRoot = null;
    PageRenderer newRoot = topLevelPageRenderers.get( newPageDescriptor );
    newRoot.getData().addData( data );
    if( currentFlow != null ) {
      oldRoot = cleanupOldRoot( ui, newRoot );
    }
    initializeNewRoot( ui, oldRoot, newRoot );
  }
View Full Code Here

Examples of com.eclipsesource.tabris.internal.ui.rendering.PageRenderer

    }
    initializeNewRoot( ui, oldRoot, newRoot );
  }

  private PageRenderer cleanupOldRoot( UIImpl ui, PageRenderer root ) {
    PageRenderer oldRoot = currentFlow.getCurrentRenderer();
    fireTransitionBeforeEvent( ui, oldRoot, root );
    oldRoot.destroyActions();
    oldRoot.getPage().deactivate();
    currentFlow.destroy();
    return oldRoot;
  }
View Full Code Here

Examples of com.eclipsesource.tabris.internal.ui.rendering.PageRenderer

    makeControlVisible( currentFlow.getCurrentRenderer().getControl() );
    fireTransitionAfterEvent( ui, oldRoot, newRoot );
  }

  PageRenderer showPage( UIImpl ui, PageDescriptor newPage, PageData data ) {
    PageRenderer oldPageRenderer = cleanupOldPageRenderer( ui );
    return initializeNewPage( ui, newPage, oldPageRenderer, data );
  }
View Full Code Here

Examples of com.eclipsesource.tabris.internal.ui.rendering.PageRenderer

    PageRenderer oldPageRenderer = cleanupOldPageRenderer( ui );
    return initializeNewPage( ui, newPage, oldPageRenderer, data );
  }

  private PageRenderer cleanupOldPageRenderer( UIImpl ui ) {
    PageRenderer oldPageRenderer = currentFlow.getCurrentRenderer();
    oldPageRenderer.destroyActions();
    oldPageRenderer.getPage().deactivate();
    return oldPageRenderer;
  }
View Full Code Here

Examples of com.eclipsesource.tabris.internal.ui.rendering.PageRenderer

                                          PageDescriptor newPage,
                                          PageRenderer oldPageRenderer,
                                          PageData data )
  {
    RendererFactory rendererFactory = uiDescriptor.getRendererFactory();
    PageRenderer newPageRenderer = rendererFactory.createPageRenderer( ui, uiRenderer, newPage, data  );
    fireTransitionBeforeEvent( ui, oldPageRenderer, newPageRenderer );
    currentFlow.add( newPageRenderer );
    newPageRenderer.createActions( uiDescriptor.getRendererFactory(), actionsParent );
    newPageRenderer.createControl( pageParent );
    uiRenderer.activate( newPageRenderer );
    newPageRenderer.getPage().activate();
    makeControlVisible( newPageRenderer.getControl() );
    fireTransitionAfterEvent( ui, oldPageRenderer, newPageRenderer );
    return newPageRenderer;
  }
View Full Code Here

Examples of com.eclipsesource.tabris.internal.ui.rendering.PageRenderer

    return false;
  }

  private void restorePreviousPage( UIImpl ui, PageRenderer previousPageRenderer ) {
    fireTransitionBeforeEvent( ui, currentFlow.getCurrentRenderer(), previousPageRenderer );
    PageRenderer removedPage = cleanUpCurrentPage( ui );
    initializePreviousPage( ui, previousPageRenderer );
    fireTransitionAfterEvent( ui, removedPage, previousPageRenderer );
  }
View Full Code Here

Examples of com.eclipsesource.tabris.internal.ui.rendering.PageRenderer

    initializePreviousPage( ui, previousPageRenderer );
    fireTransitionAfterEvent( ui, removedPage, previousPageRenderer );
  }

  private PageRenderer cleanUpCurrentPage( UIImpl ui ) {
    PageRenderer removedPage = currentFlow.getCurrentRenderer();
    removedPage.getPage().deactivate();
    removedPage.destroy();
    removedPage.destroyActions();
    currentFlow.pop();
    return removedPage;
  }
View Full Code Here

Examples of com.eclipsesource.tabris.internal.ui.rendering.PageRenderer

    pageParent.layout( true );
  }

  public void setTitle( Page page, String title ) {
    if( currentFlow != null ) {
      PageRenderer rendererToModify = null;
      List<PageRenderer> allPageRenderes = currentFlow.getAllRenderers();
      for( PageRenderer renderer : allPageRenderes ) {
        if( renderer.getPage().equals( page ) ) {
          rendererToModify = renderer;
          break;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.