Examples of ViewContainer


Examples of com.tll.client.ui.view.ViewContainer

      final IView<IViewInitializer> view = (IView<IViewInitializer>) key.getViewClass().newView();

      // initialize the view
      view.initialize(init);

      e = new CView(new ViewContainer(view, options, key), init);
      setCurrentView(e, showPopped);

      view.apply(e.vc, e.vc.getToolbar());

      // load the view
View Full Code Here

Examples of com.tll.client.ui.view.ViewContainer

   * Sets the current view given a presently cached view container.
   * @param e primary cache element
   * @param showPopped show popped or pinned?
   */
  private void setCurrentView(CView e, boolean showPopped) {
    final ViewContainer vc = e.vc;

    // set the view
    if(showPopped) {
      // NOTE: the view history is not affected!
      vc.pop(parentViewPanel);
    }
    else {
      final boolean sameView = (current != null && current.equals(e));
      final boolean pndgIsPopped = e.vc.isPopped();
      final boolean crntIsPopped = current != null && current.vc.isPopped();

      final boolean rmvCrnt = current != null && ((!sameView && !crntIsPopped) || (sameView && pndgIsPopped));
      final boolean pinPndg = (rmvCrnt || (sameView && crntIsPopped) || !sameView || !e.vc.isAttached());

      if(rmvCrnt) {
        // remove current pinned view
        current.vc.removeFromParent();
      }
      if(pinPndg) {
        // pin the view
        vc.pin(parentViewPanel);
      }
      // set as current
      current = e;
    }

View Full Code Here

Examples of com.tll.client.ui.view.ViewContainer

    final IView<IViewInitializer> view = (IView<IViewInitializer>) init.getViewKey().getViewClass().newView();

    // initialize the view
    view.initialize(init);

    e = new CView(new ViewContainer(view, init.getViewKey().getViewClass().getViewOptions(), init.getViewKey()), init);

    cacheView(e);

    view.apply(e.vc, e.vc.getToolbar());
View Full Code Here

Examples of com.tll.client.ui.view.ViewContainer

      final IView<IViewInitializer> view = (IView<IViewInitializer>) key.getViewClass().newView();

      // initialize the view
      view.initialize(init);

      e = new CView(new ViewContainer(view, options, key), init);
      setCurrentView(e);

      view.apply(e.vc, e.vc.getToolbar());

      // load the view
View Full Code Here

Examples of com.tll.client.ui.view.ViewContainer

  /**
   * Sets the current view given a presently cached view container.
   * @param e primary cache element
   */
  private void setCurrentView(CView e) {
    final ViewContainer vc = e.vc;
    final ViewOptions options = e.init.getViewKey().getViewClass().getViewOptions();

    final boolean rmvCrnt = current != null;
    final boolean pinPndg = rmvCrnt || (!e.vc.isAttached() || !e.vc.isVisible());

    if(rmvCrnt) {
      // remove or hide the current pinned view
      if(current.init.getViewKey().getViewClass().getViewOptions().isKeepInDom()) {
        current.vc.setVisible(false);
      }
      else {
        current.vc.removeFromParent();
      }
      RootPanel.get().removeStyleName(current.vc.getView().getViewClass().getName());
    }
    if(pinPndg) {
      // add the current view's view class name to the root panel
      RootPanel.get().addStyleName(e.vc.getView().getViewClass().getName());

      // ** pin the view (the current view in the dom) **
      // vc.makePinReady();

      if(options.isKeepInDom() && parentViewPanel.panel.getWidgetIndex(vc) >= 0) {
        vc.setVisible(true);
      }
      else {
        parentViewPanel.panel.add(vc);
      }
    }
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.