Examples of Anchor


Examples of org.pentaho.reporting.engine.classic.core.Anchor

    final String prefix = getAnchorPrefix();
    targetBuffer.append(prefix);
    targetBuffer.append(getGroup());
    targetBuffer.append("%3D");
    targetBuffer.append(count);
    anchor = new Anchor(targetBuffer.toString());
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.Anchor

    }
    if (value instanceof Anchor)
    {
      return value;
    }
    return new Anchor(String.valueOf(value));
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.Conversation.Anchor

  public void testSetAnchorUpdatesManifest() {
    // Anchor target(wavelet1) in alternate (wavelet2).
    WaveletBasedConversation conversation2 = makeConversation();
    populate(conversation2);
    ConversationBlip firstBlip = getFirstBlip(conversation2);
    Anchor anchor = conversation2.createAnchor(firstBlip);
    target.setAnchor(anchor);
    assertEquals(WaveletBasedConversation.idFor(conversation2.getWavelet().getId()),
        getManifestAttribute(manifestDoc, "anchorWavelet"));
    assertEquals(firstBlip.getId(), getManifestAttribute(manifestDoc, "anchorBlip"));
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.Conversation.Anchor

   * un-anchored.
   */
  public void testClearAnchorClearsManifest() {
    WaveletBasedConversation conversation2 = makeConversation();
    populate(conversation2);
    Anchor anchor = conversation2.createAnchor(getFirstBlip(conversation2));
    target.setAnchor(anchor);
    target.setAnchor(null);
    assertNull(getManifestAttribute(manifestDoc, "anchorWavelet"));
    assertNull(getManifestAttribute(manifestDoc, "anchorBlip"));
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.Conversation.Anchor

  }

  public void testCreateAnchor() {
    populate(alternate);
    ConversationBlip blip = getFirstBlip(alternate);
    Anchor anchor = alternate.createAnchor(blip);
    assertTrue(alternate == anchor.getConversation());
    assertTrue(blip == anchor.getBlip());
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.Conversation.Anchor

  }

  public void testSetAnchor() {
    populate(alternate);
    ConversationBlip blip = getFirstBlip(alternate);
    Anchor anchor = alternate.createAnchor(blip);
    target.setAnchor(anchor);
    assertTrue(target.hasAnchor());
    assertEquals(anchor, target.getAnchor());
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.Conversation.Anchor

  }

  public void testAnchorToSelfFails() {
    populate(target);
    ConversationBlip blip = getFirstBlip(target);
    Anchor anchor = target.createAnchor(blip);
    try {
      target.setAnchor(anchor);
      fail("Expected an IllegalArgumentException");
    } catch (IllegalArgumentException expected) {
    }
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.Conversation.Anchor

  }

  public void testClearAnchor() {
    populate(alternate);
    ConversationBlip blip = getFirstBlip(alternate);
    Anchor anchor = alternate.createAnchor(blip);
    target.setAnchor(anchor);
    target.setAnchor(null);
    assertFalse(target.hasAnchor());
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.Conversation.Anchor

  // Regression test for a bug where the manifest was forgotten after
  // any element removed.
  public void testAnchorStillAccessibleAfterBlipAdded() {
    populate(alternate);
    ConversationBlip blip = getFirstBlip(alternate);
    Anchor anchor = alternate.createAnchor(blip);
    target.setAnchor(anchor);

    target.getRootThread().appendBlip();
    target.getRootThread().getFirstBlip().delete();
    assertTrue(target.hasAnchor());
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.Conversation.Anchor

  public void testSetAnchorEventsAreFired() {
    populate(alternate);
    ObservableConversation.AnchorListener listener =
        mock(ObservableConversation.AnchorListener.class);
    target.addListener(listener);
    Anchor anchor1 = alternate.createAnchor(getFirstBlip(alternate));

    // Set anchor from null.
    target.setAnchor(anchor1);
    verify(listener).onAnchorChanged(null, anchor1);

    // Change anchor to different blip.
    Anchor anchor11 = alternate.createAnchor(alternate.getRootThread().getFirstBlip()
        .getReplyThreads().iterator().next().getFirstBlip());
    target.setAnchor(anchor11);
    verify(listener).onAnchorChanged(anchor1, anchor11);

    // Change anchor to different wavelet.
    ObservableConversation alternate2 = makeConversation();
    populate(alternate2);
    Anchor anchor2 = alternate2.createAnchor(getFirstBlip(alternate2));
    target.setAnchor(anchor2);
    verify(listener).onAnchorChanged(anchor11, anchor2);

    // Set anchor to null.
    target.setAnchor(null);
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.