Examples of ViewKey


Examples of com.tll.client.mvc.view.ViewKey

   * @return The removed cache element or <code>null</code> if the queue cache
   *         is not yet at capacity.
   */
  CView cache(CView e) {
    assert e != null;
    final ViewKey key = e.getViewKey();

    // add to queue removing it first if present to maintain desired ordering
    Log.debug("ViewCache.cache() - caching queue entry: " + key);
    final int qindex = searchQueue(key);
    if(qindex >= 0) {
View Full Code Here

Examples of com.tll.client.mvc.view.ViewKey

   * @param init The view initializer employed only when the view is not present
   *        in the view cache
   */
  @SuppressWarnings("unchecked")
  void setCurrentView(IViewInitializer init) {
    final ViewKey key = init.getViewKey();
    Log.debug("Setting current view: '" + key + "' ..");

    CView e;
    final ViewOptions options = init.getViewKey().getViewClass().getViewOptions();
    final int cacheIndex = cache.searchQueue(key);
    final boolean showPopped = ((cacheIndex == -1) && options.isInitiallyPopped());

    if(cacheIndex != -1) {
      // existing cached view
      e = cache.removeAt(cacheIndex);
      assert e != null;
      setCurrentView(e, showPopped);
    }
    else {
      Log.debug("Creating and initializing view: " + key + " ..");
      // non-cached view
      final IView<IViewInitializer> view = (IView<IViewInitializer>) key.getViewClass().newView();

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

      e = new CView(new ViewContainer(view, options, key), init);
View Full Code Here

Examples of com.tll.client.mvc.view.ViewKey

      // pop the view
      current.vc.pop(parentViewPanel);

      final CView nextCurrent = findFirstView(current);
      final ViewKey vk = nextCurrent == null ? null : nextCurrent.getViewKey();
      if(vk != null) {
        History.newItem(generateViewKeyHistoryToken(vk));
      }
    }
  }
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.