Package org.waveprotocol.wave.model.conversation

Examples of org.waveprotocol.wave.model.conversation.ConversationThread


    public void onThreadAdded(ObservableConversationThread thread) {
      ObservableConversationBlip parentBlip = thread.getParentBlip();
      BlipView blipView = views.getBlipView(parentBlip);

      if (blipView != null) {
        ConversationThread next = findBefore(thread, parentBlip.getReplyThreads());
        replyHandler.presentAfter(blipView, next, thread);
      } else {
        throw new IllegalStateException("blipView not present");
      }
    }
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);
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

    if (metaUi != null) {
      AnchorView inlineUi = dood.getAnchor();
      metaUi.insertInlineAnchorBefore(ref != null ? ref.getAnchor() : null, inlineUi);

      // Move reply if it exists.
      ConversationThread reply = blip.getReplyThread(dood.getId());
      AnchorView defaultUi = reply != null ? views.getDefaultAnchor(reply) : null;
      InlineThreadView replyUi = defaultUi != null ? defaultUi.getThread() : null;
      if (replyUi != null) {
        defaultUi.detach(replyUi);
        inlineUi.attach(replyUi);
View Full Code Here

    BlipMetaView metaUi = blip != null ? blipUi.getMeta() : null;
    if (metaUi != null) {
      AnchorView inlineUi = dood.getAnchor();

      // Move reply if there is one.
      ConversationThread reply = blip.getReplyThread(dood.getId());
      AnchorView defaultUi = reply != null ? views.getDefaultAnchor(reply) : null;
      InlineThreadView replyUi = inlineUi.getThread();
      if (replyUi != null) {
        inlineUi.detach(replyUi);
        defaultUi.attach(replyUi);
View Full Code Here

    focusAndEdit(views.getBlipView(reply));
  }

  @Override
  public void addContinuation(ThreadView threadUi) {
    ConversationThread thread = views.getThread(threadUi);
    ConversationBlip continuation = thread.appendBlip();
    blipQueue.flush();
    focusAndEdit(views.getBlipView(continuation));
  }
View Full Code Here

    return views.blipUis.inverse().get(blipUi);
  }

  @Override
  public ConversationThread getThread(ThreadView threadUi) {
    ConversationThread inline = views.inlineThreadUis.inverse().get(threadUi);
    return inline != null ? inline : views.rootThreadUis.inverse().get(threadUi);
  }
View Full Code Here

        waveletFactory, waveData.getWaveId(), gen, creator, WaveletConfigurator.ADD_CREATOR);

    // Build a conversation with a root blip.
    ConversationView v = WaveBasedConversationView.create(wave, gen);
    Conversation c = v.createRoot();
    ConversationThread thread = c.getRootThread();
    thread.appendBlip();

    log.info("initial ops=" + ops);

    return ops;
  }
View Full Code Here

    }

    countUpEvent();

    // Handle the event for all parent threads.
    ConversationThread thread = blip.getThread();
    while (thread != null) {
      ThreadReadState state = threadStates.get(thread);
      if (state != null) {
        state.handleBlipAdded(blip);
        registerEventIfMonitored(state);
View Full Code Here

    }

    countUpEvent();

    // Handle the event for all parent threads.
    ConversationThread thread = blip.getThread();
    while (thread != null) {
      ThreadReadState state = threadStates.get(thread);
      if (state != null) {
        state.handleBlipRemoved(blip);
        registerEventIfMonitored(state);
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.model.conversation.ConversationThread

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.