Package org.waveprotocol.wave.client.wavepanel.view

Examples of org.waveprotocol.wave.client.wavepanel.view.ThreadView


    // If focus is on a blip inside the blip being deleted, don't worry about it
    // (checking could get too expensive).
    if (blipUi.equals(focus.getFocusedBlip())) {
      // Move to next blip in thread if there is one, otherwise previous blip in
      // thread, otherwise previous blip in traversal order.
      ThreadView parentUi = blipUi.getParent();
      BlipView nextUi = parentUi.getBlipAfter(blipUi);
      if (nextUi == null) {
        nextUi = parentUi.getBlipBefore(blipUi);
      }
      if (nextUi != null) {
        focus.focus(nextUi);
      } else {
        focus.moveUp();
View Full Code Here


  @Override
  public void onReadStateChanged(IdentitySet<ConversationThread> threads) {
    threads.each(new Proc<ConversationThread>() {
      @Override
      public void apply(ConversationThread thread) {
        ThreadView threadUi = null;
       
        // NOTE: The isInline function had meaning when we had non-inline reply threads.  We
        // don't have them at this point.  Right now if a thread has a parent blip, then it
        // is an inline reply.  If not it must be a root thread.  Since the 'inline' attribute
        // doesn't have official meaning we can't rely on it at this point.  It should probably
        // be removed from the API, since it still exists, this note was left to explain why
        // it is not being used here.
       
        // if (thread.isInline()) {
        if (thread.getParentBlip() != null) {
          threadUi = views.getInlineThreadView(thread);
        } else {
          threadUi = views.getRootThreadView(thread);
        }
        threadUi.setUnreadBlipCount(readMonitor.getUnreadCount(thread));
      }
    });
  }
View Full Code Here

    }

    if (TypeCodes.kind(Type.REPLY_BOX).equals(
        context.getAttribute(BuilderHelper.KIND_ATTRIBUTE))) {
      ReplyBoxView indicatorView = panel.asReplyBox(context);
      ThreadView threadView = indicatorView.getParent();
      actions.addContinuation(threadView);
    } else if (TypeCodes.kind(Type.CONTINUATION_INDICATOR).equals(
        context.getAttribute(BuilderHelper.KIND_ATTRIBUTE))) {
      ContinuationIndicatorView indicatorView = panel.asContinuationIndicator(context);
      ThreadView threadView = indicatorView.getParent();
      actions.addContinuation(threadView);
    }

    event.preventDefault();
    return true;
View Full Code Here

    return true;
  }

  @Override
  public void onSessionStart(Editor e, BlipView blipUi) {
    ThreadView threadUi = blipUi.getParent();
    if (threadUi.getBlipAfter(blipUi) == null) {
      // Editing has commenced on the last blip in thread.
      threadUi.getReplyIndicator().disable();
    }
  }
View Full Code Here

    }

    @Override
    public void onBlipAdded(ObservableConversationBlip blip) {
      ConversationThread parentThread = blip.getThread();
      ThreadView threadView = viewOf(parentThread);
      if (threadView != null) {
        ConversationBlip ref = findBefore(blip, parentThread.getBlips());
        BlipView refView = viewOf(ref);

        // Render the new blip.
        threadView.insertBlipAfter(refView, blip);
        bubbleBlipCountUpdate(blip);
      } else {
        throw new IllegalStateException("threadView not present");
      }
    }
View Full Code Here

      bubbleBlipCountUpdate(blip);
    }

    private void bubbleBlipCountUpdate(ConversationBlip blip) {
      ConversationThread thread = blip.getThread();
      ThreadView threadUi = viewOf(thread);
      threadUi.setTotalBlipCount(readMonitor.getTotalCount(thread));
      ConversationBlip parentBlip = thread.getParentBlip();
      if (parentBlip != null) {
        bubbleBlipCountUpdate(parentBlip);
      }
    }
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.client.wavepanel.view.ThreadView

Copyright © 2018 www.massapicom. 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.