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

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


  private BlipView getNextPre(ThreadView parent, BlipView blip) {
    return blip;
  }

  private BlipView getNextPre(BlipView parent, BlipMetaView meta) {
    AnchorView first = meta.getInlineAnchorAfter(null);
    return first != null ? getNextPre(meta, first) : getNextPost(parent, meta);
  }
View Full Code Here


  private BlipView getNextPre(ThreadView parent, BlipView blip) {
    return blip;
  }

  private BlipView getNextPre(BlipView parent, BlipMetaView meta) {
    AnchorView first = meta.getInlineAnchorAfter(null);
    return first != null ? getNextPre(meta, first) : getNextPost(parent, meta);
  }
View Full Code Here

  private BlipView getNextPost(BlipView parent, BlipMetaView meta) {
    return getNextPost(parent, (AnchorView) null);
  }

  private BlipView getNextPost(BlipView parent, AnchorView anchor) {
    AnchorView next = parent.getDefaultAnchorAfter(anchor);
    return (next != null) ? getNextPre(parent, next) : getNextPost(parent,
        (InlineConversationView) null);
  }
View Full Code Here

    InlineConversationView next = parent.getConversationAfter(conversation);
    return (next != null) ? getNextPre(parent, next) : getNextPost(parent.getParent(), parent);
  }

  private BlipView getNextPost(BlipMetaView parent, AnchorView anchor) {
    AnchorView next = parent.getInlineAnchorAfter(anchor);
    return next != null ? getNextPre(parent, next) : getNextPost(parent.getParent(), parent);
  }
View Full Code Here

    BlipView last = skip(thread) ? null : thread.getBlipBefore(null);
    return last != null ? getPrevPre(thread, last) : getPrevPost(parent, thread);
  }

  private BlipView getPrevPre(BlipView parent, BlipMetaView meta) {
    AnchorView last = meta.getInlineAnchorBefore(null);
    return last != null ? getPrevPre(meta, last) : getPrevPost(parent, meta);
  }
View Full Code Here

  private BlipView getPrevPost(TopConversationView parent, RootThreadView child) {
    return null;
  }

private BlipView getPrevPost(BlipView parent, AnchorView child) {
    AnchorView prev = parent.getDefaultAnchorBefore(child);
    BlipMetaView meta;
    return prev != null ? getPrevPre(parent, prev) // \u2620
        : ((meta = parent.getMeta()) != null) // \u2620
            ? getPrevPre(parent, meta) // \u2620
            : getPrevPost(parent, meta);
View Full Code Here

    InlineConversationView prev = parent.getConversationBefore(child);
    return prev != null ? getPrevPre(parent, prev) : getPrevPost(parent, (AnchorView) null);
  }

  private BlipView getPrevPost(BlipMetaView parent, AnchorView child) {
    AnchorView prev = parent.getInlineAnchorBefore(child);
    return prev != null ? getPrevPre(parent, prev) : getPrevPost(parent.getParent(), parent);
  }
View Full Code Here

  @Override
  public void onAnchorAddedBefore(ConversationBlip blip, ReplyDoodad ref, ReplyDoodad dood) {
    BlipView blipUi = views.getBlipView(blip);
    BlipMetaView metaUi = blipUi != null ? blipUi.getMeta() : null;
    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

  @Override
  public void onAnchorRemoved(ConversationBlip blip, ReplyDoodad dood) {
    BlipView blipUi = views.getBlipView(blip);
    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);
      }

      dood.getAnchor().remove();
    }
  }
View Full Code Here

    }
  }

  public InlineThreadView presentAfter(BlipView blipUi, ConversationThread ref,
      ConversationThread thread) {
    AnchorView refDefault = ref != null ? views.getDefaultAnchor(ref) : null;
    Preconditions.checkArgument(ref == null || refDefault != null, "ref is not rendered");

    // Render thread in default anchor (and move to inline if there is one).
    AnchorView defaultUi = blipUi.insertDefaultAnchorAfter(refDefault, thread);
    InlineThreadView threadUi = defaultUi.getThread();
    AnchorView inlineUi = views.getInlineAnchor(thread);
    if (inlineUi != null) {
      defaultUi.detach(threadUi);
      inlineUi.attach(threadUi);
    }
    return threadUi;
  }
View Full Code Here

TOP

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

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.